diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 9bd88df8e..d5701472c 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -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 diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 538dbf4da..c9fe5e22c 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -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")) diff --git a/projects/mtg/include/MTGGameZones.h b/projects/mtg/include/MTGGameZones.h index 97687d006..7662311d0 100644 --- a/projects/mtg/include/MTGGameZones.h +++ b/projects/mtg/include/MTGGameZones.h @@ -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); diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 24203ed99..bcae61f0c 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -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 :/