diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 322d335c7..5b32f54f6 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -3065,7 +3065,7 @@ type=Artifact [/card] [card] name=Amulet of Vigor -auto=lord(*|mybattlefield) transforms((,newability[untap])) forever +auto=lord(*[recent]|mybattlefield) transforms((,newability[untap])) forever text=Whenever a permanent enters the battlefield tapped and under your control, untap it. mana={1} type=Artifact @@ -109171,7 +109171,7 @@ toughness=2 [/card] [card] name=Spirespine -auto=mustblock +abilities=mustblock auto=bestow bstw auto=bestow teach(creature) mustblock auto=bestow teach(creature) +3/+2 diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 5ed82919d..1f33f2319 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1125,14 +1125,29 @@ public: int countManaProducedby(int color, MTGCardInstance * target, Player * player) { int count = 0; - for (size_t i = 0; i < target->getObserver()->mLayers->actionLayer()->manaObjects.size(); i++) + MTGGameZone * zone = player->game->battlefield; + for(int k = 0; k < zone->nb_cards; k++) + { + MTGCardInstance * card = zone->cards[k]; + if(card->isLand() && (card != target) && card->hasSubtype("forest") && color == 1) + count++; + if(card->isLand() && (card != target) && card->hasSubtype("island") && color == 2) + count++; + if(card->isLand() && (card != target) && card->hasSubtype("mountain") && color == 3) + count++; + if(card->isLand() && (card != target) && card->hasSubtype("swamp") && color == 4) + count++; + if(card->isLand() && (card != target) && card->hasSubtype("plains") && color == 5) + count++; + if(card->isLand() && (card != target) && card->cardsAbilities.size()) { - if (dynamic_cast (((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i])) && - (dynamic_cast (((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i])))->source->isLand() && - (dynamic_cast (((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i])))->source->controller() == player && - (dynamic_cast (((MTGAbility *) target->getObserver()->mLayers->actionLayer()->manaObjects[i])))->output->hasColor(color)) - count += 1; + for(unsigned int j = 0; j < card->cardsAbilities.size(); j++) + { + if(dynamic_cast (card->cardsAbilities[j]) && dynamic_cast (card->cardsAbilities[j])->output->hasColor(color) ) + count++; + } } + } return count; } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 76b289166..15287c569 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -3760,21 +3760,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG bool doesntEmptyTilueot = s.find("doesntempty") != string::npos; ManaCost * output = ManaCost::parseManaCost(s.substr(found),NULL,card); Targetable * t = spell ? spell->getNextTarget() : NULL; - if(output->getConvertedCost() > 0) - { - if(output->hasColor(Constants::MTG_COLOR_ARTIFACT)||output->hasColor(Constants::MTG_COLOR_WASTE)) - card->canproduceC = 1; - if(output->hasColor(Constants::MTG_COLOR_GREEN)) - card->canproduceG = 1; - if(output->hasColor(Constants::MTG_COLOR_BLUE)) - card->canproduceU = 1; - if(output->hasColor(Constants::MTG_COLOR_RED)) - card->canproduceR = 1; - if(output->hasColor(Constants::MTG_COLOR_BLACK)) - card->canproduceB = 1; - if(output->hasColor(Constants::MTG_COLOR_WHITE)) - card->canproduceW = 1; - } MTGAbility * a = NEW AManaProducer(observer, id, card, t, output, NULL, who,s.substr(found),doesntEmptyTilueot); a->oneShot = 1; if(newName.size())