Fix for issue 646 (Tidal Warrior)
This commit is contained in:
@@ -67300,6 +67300,16 @@ power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Tidal Warrior
|
||||
auto={T}:ueot loseabilities && losesubtypesof(land) && transforms((island)) target(land)
|
||||
text={T}: Target land becomes an Island until end of turn.
|
||||
mana={U}
|
||||
type=Creature
|
||||
subtype=Merfolk Warrior
|
||||
power=1
|
||||
toughness=1
|
||||
[/card]
|
||||
[card]
|
||||
name=Tidal Wave
|
||||
auto=token(Wall,Creature Wall,5/5,defender,treason,blue)
|
||||
text=Put a 5/5 blue Wall creature token with defender onto the battlefield. Sacrifice it at the beginning of the next end step.
|
||||
|
||||
@@ -539,6 +539,7 @@ thellon_of_havenwood.txt
|
||||
threaten.txt
|
||||
throne_of_bone.txt
|
||||
thunder-thrash_elder.txt
|
||||
tidal_warrior_i646.txt
|
||||
titanic_ultimatum.txt
|
||||
tolsimir_wolfblood.txt
|
||||
torture.txt
|
||||
|
||||
18
projects/mtg/bin/Res/test/tidal_warrior_i646.txt
Normal file
18
projects/mtg/bin/Res/test/tidal_warrior_i646.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
#Testing Tidal Warrior's "target becomes island" ability
|
||||
#see http://code.google.com/p/wagic/issues/detail?id=646
|
||||
[INIT]
|
||||
FIRSTMAIN
|
||||
[PLAYER1]
|
||||
inplay:Forest, Tidal Warrior
|
||||
[PLAYER2]
|
||||
[DO]
|
||||
Tidal Warrior
|
||||
Forest
|
||||
Forest
|
||||
[ASSERT]
|
||||
FIRSTMAIN
|
||||
[PLAYER1]
|
||||
inplay:Forest, Tidal Warrior
|
||||
manapool:{U}
|
||||
[PLAYER2]
|
||||
[END]
|
||||
@@ -922,6 +922,7 @@ public:
|
||||
MultiAbility(int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost);
|
||||
int Add(MTGAbility * ability);
|
||||
int resolve();
|
||||
int addToGame();
|
||||
const char * getMenuText();
|
||||
MultiAbility * clone() const;
|
||||
~MultiAbility();
|
||||
@@ -1747,6 +1748,7 @@ public:
|
||||
int addToGame()
|
||||
{
|
||||
ability->forceDestroy = -1;
|
||||
ability->target = target; //Might have changed since initialization
|
||||
ability->addToGame();
|
||||
return InstantAbility::addToGame();
|
||||
}
|
||||
|
||||
@@ -2079,7 +2079,6 @@ int MultiAbility::resolve()
|
||||
continue;
|
||||
Targetable * backup = abilities[i]->target;
|
||||
|
||||
|
||||
if (target && target != source && abilities[i]->target == abilities[i]->source)
|
||||
{
|
||||
abilities[i]->target = target;
|
||||
@@ -2087,16 +2086,27 @@ int MultiAbility::resolve()
|
||||
}
|
||||
abilities[i]->resolve();
|
||||
abilities[i]->target = backup;
|
||||
if(dynamic_cast<APhaseActionGeneric *> (abilities[i]))
|
||||
{
|
||||
if(Phaseactiontarget != NULL)
|
||||
dynamic_cast<APhaseActionGeneric *> (abilities[i])->target = Phaseactiontarget;
|
||||
}
|
||||
|
||||
if(Phaseactiontarget && dynamic_cast<APhaseActionGeneric *> (abilities[i]))
|
||||
abilities[i]->target = Phaseactiontarget;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int MultiAbility::addToGame()
|
||||
{
|
||||
for (unsigned int i = 0; i < abilities.size(); i++)
|
||||
{
|
||||
if (abilities[i] == NULL)
|
||||
continue;
|
||||
|
||||
MTGAbility * a = abilities[i]->clone();
|
||||
a->target = target;
|
||||
a->addToGame();
|
||||
}
|
||||
MTGAbility::addToGame();
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char * MultiAbility::getMenuText()
|
||||
{
|
||||
if (abilities.size())
|
||||
|
||||
Reference in New Issue
Block a user