Laurent - Added deluge (10E) also added "all" to the tap parser, tested and work, not compatible with cost at the moment. Test suite before R486 was running fine on this update.

This commit is contained in:
wagic.laurent
2009-06-17 20:50:21 +00:00
parent 53b1b5e9ec
commit ba83a42fa4
4 changed files with 303 additions and 282 deletions
+10
View File
@@ -486,6 +486,16 @@ type=Sorcery
mana={B}
[/card]
[card]
text=Tap all creatures without flying.
id=135223
name=Deluge
auto=tap all(creature[-flying])
rarity=U
color=Blue
type=Instant
mana={2}{U}
[/card]
[card]
text=Destroy target artifact or land.
target=artifact,land
auto=destroy
-9
View File
@@ -311,15 +311,6 @@ mana={3}{U}
subtype=Aura
[/card]
[card]
text=Tap all creatures without flying.
id=135223
name=Deluge
rarity=U
color=Blue
type=Instant
mana={2}{U}
[/card]
[card]
text=When Denizen of the Deep comes into play, return each other creature you control to its owner's hand.
id=135250
name=Denizen of the Deep
+1
View File
@@ -233,6 +233,7 @@ class AbilityFactory{
int destroyAllInPlay(TargetChooser * tc, int bury = 0);
int moveAll(TargetChooser * tc, string destinationZone);
int damageAll(TargetChooser * tc, int damage);
int TapAll(TargetChooser * tc);
void addAbilities(int _id, Spell * spell);
};
+23 -4
View File
@@ -87,6 +87,21 @@ int AbilityFactory::moveAll(TargetChooser * tc, string destinationZone){
}
int AbilityFactory::TapAll(TargetChooser * tc){
MTGCardInstance * source = tc->source;
tc->source = NULL; // This is to prevent protection from...
GameObserver * g = GameObserver::GetInstance();
for (int i = 0; i < 2 ; i++){
for (int j = g->players[i]->game->inPlay->nb_cards-1; j >=0 ; j--){
MTGCardInstance * current = g->players[i]->game->inPlay->cards[j];
if (tc->canTarget(current)){
current->tapped = 1;
}
}
}
tc->source = source; //restore source
return 1;
}
int AbilityFactory::putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p){
@@ -931,10 +946,14 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
break;
}
if (tc){
game->addObserver(NEW ATapper(id, card, cost, tc));
}else{
target->tapped = 1;
}
if (all){
TapAll(tc);
}else{
game->addObserver(NEW ATapper(id, card, cost, tc));
}
}else{
target->tapped = 1;
}
result++;
continue;
}