fix urza lands

the alias is used for checking of "urzatron". revised this because when
using if then else in the activation makes the mana ability goes to the
stack
This commit is contained in:
Anthony Calosa
2015-10-12 13:00:05 +08:00
parent c7b9e6f9b8
commit 94620504da
4 changed files with 32 additions and 4 deletions

View File

@@ -80872,7 +80872,8 @@ toughness=1
[/card]
[card]
name=River of Tears
auto={t}:name(Add Mana) if type(land[fresh]|mybattlefield)~morethan~0 then add{B} else add{U}
auto=aslongas(land[fresh]|mybattlefield) {T}:add{B} >0
auto=aslongas(land[fresh]|mybattlefield) {T}:add{U} <1
text={T}: Add {U} to your mana pool. If you played a land this turn, add {B} to your mana pool instead.
type=Land
[/card]
@@ -106988,21 +106989,27 @@ type=Artifact
[/card]
[card]
name=Urza's Mine
auto={t}:name(Add Mana) if type(Urza's Tower|mybattlefield)~morethan~0,type(Urza's Power Plant|mybattlefield)~morethan~0 then add{2} else add{1}
alias=4192
auto=this(variable{urzatron} >0) produceextra:{1}
auto={T}:add{1}
text={T}: Add {1} to your mana pool. If you control an Urza's Power-Plant and an Urza's Tower, add {2} to your mana pool instead.
type=Land
subtype=Urza's Mine
[/card]
[card]
name=Urza's Power Plant
auto={t}:name(Add Mana) if type(Urza's Tower|mybattlefield)~morethan~0,type(Urza's Mine|mybattlefield)~morethan~0 then add{2} else add{1}
alias=4193
auto=this(variable{urzatron} >0) produceextra:{1}
auto={T}:add{1}
text={T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead.
type=Land
subtype=Urza's Power-Plant
[/card]
[card]
name=Urza's Tower
auto={t}:name(Add Mana) if type(Urza's Power Plant|mybattlefield)~morethan~0,type(Urza's Mine|mybattlefield)~morethan~0 then add{3} else add{1}
alias=4194
auto=this(variable{urzatron} >0) produceextra:{2}
auto={T}:add{1}
text={T}: Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead.
type=Land
subtype=Urza's Tower

View File

@@ -688,6 +688,13 @@ private:
{
intValue = target->controller()->opponent()->game->hand->nb_cards;
}
else if (s == "urzatron")//Urza lands
{
if(card->controller()->game->battlefield->hasAlias(4192) && card->controller()->game->battlefield->hasAlias(4193) && card->controller()->game->battlefield->hasAlias(4194))
intValue = 1;
else
intValue = 0;
}
else if (s == "worshipped")//Worship
{
if(card->controller()->game->battlefield->hasType("creature"))

View File

@@ -103,6 +103,8 @@ class MTGGameZone {
//returns true if one of the cards in the zone has the ability
bool hasAbility(int ability);
//returns true if one of the cards in the zone has the alias
bool hasAlias(int alias);
//returns true if one of the cards in the zone has the type
bool hasType(const char * value);

View File

@@ -764,6 +764,18 @@ bool MTGGameZone::hasAbility(int ability)
return false;
}
bool MTGGameZone::hasAlias(int alias)
{
for (int i = 0; i < (nb_cards); i++)
{
if (cards[i]->alias == alias)
{
return true;
}
}
return false;
}
int MTGGameZone::seenThisTurn(TargetChooser * tc, int castMethod, bool lastTurn)
{
//The following 2 lines modify the passed TargetChooser. Call this function with care :/