Fix for issue 646 (Tidal Warrior)
This commit is contained in:
@@ -67300,6 +67300,16 @@ power=1
|
|||||||
toughness=1
|
toughness=1
|
||||||
[/card]
|
[/card]
|
||||||
[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
|
name=Tidal Wave
|
||||||
auto=token(Wall,Creature Wall,5/5,defender,treason,blue)
|
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.
|
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
|
threaten.txt
|
||||||
throne_of_bone.txt
|
throne_of_bone.txt
|
||||||
thunder-thrash_elder.txt
|
thunder-thrash_elder.txt
|
||||||
|
tidal_warrior_i646.txt
|
||||||
titanic_ultimatum.txt
|
titanic_ultimatum.txt
|
||||||
tolsimir_wolfblood.txt
|
tolsimir_wolfblood.txt
|
||||||
torture.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);
|
MultiAbility(int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost);
|
||||||
int Add(MTGAbility * ability);
|
int Add(MTGAbility * ability);
|
||||||
int resolve();
|
int resolve();
|
||||||
|
int addToGame();
|
||||||
const char * getMenuText();
|
const char * getMenuText();
|
||||||
MultiAbility * clone() const;
|
MultiAbility * clone() const;
|
||||||
~MultiAbility();
|
~MultiAbility();
|
||||||
@@ -1747,6 +1748,7 @@ public:
|
|||||||
int addToGame()
|
int addToGame()
|
||||||
{
|
{
|
||||||
ability->forceDestroy = -1;
|
ability->forceDestroy = -1;
|
||||||
|
ability->target = target; //Might have changed since initialization
|
||||||
ability->addToGame();
|
ability->addToGame();
|
||||||
return InstantAbility::addToGame();
|
return InstantAbility::addToGame();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2079,7 +2079,6 @@ int MultiAbility::resolve()
|
|||||||
continue;
|
continue;
|
||||||
Targetable * backup = abilities[i]->target;
|
Targetable * backup = abilities[i]->target;
|
||||||
|
|
||||||
|
|
||||||
if (target && target != source && abilities[i]->target == abilities[i]->source)
|
if (target && target != source && abilities[i]->target == abilities[i]->source)
|
||||||
{
|
{
|
||||||
abilities[i]->target = target;
|
abilities[i]->target = target;
|
||||||
@@ -2087,16 +2086,27 @@ int MultiAbility::resolve()
|
|||||||
}
|
}
|
||||||
abilities[i]->resolve();
|
abilities[i]->resolve();
|
||||||
abilities[i]->target = backup;
|
abilities[i]->target = backup;
|
||||||
if(dynamic_cast<APhaseActionGeneric *> (abilities[i]))
|
if(Phaseactiontarget && dynamic_cast<APhaseActionGeneric *> (abilities[i]))
|
||||||
{
|
abilities[i]->target = Phaseactiontarget;
|
||||||
if(Phaseactiontarget != NULL)
|
|
||||||
dynamic_cast<APhaseActionGeneric *> (abilities[i])->target = Phaseactiontarget;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return 1;
|
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()
|
const char * MultiAbility::getMenuText()
|
||||||
{
|
{
|
||||||
if (abilities.size())
|
if (abilities.size())
|
||||||
|
|||||||
Reference in New Issue
Block a user