diff --git a/projects/mtg/include/MTGAbility.h b/projects/mtg/include/MTGAbility.h index 11cb4d008..2da4acd19 100644 --- a/projects/mtg/include/MTGAbility.h +++ b/projects/mtg/include/MTGAbility.h @@ -409,7 +409,7 @@ class AManaProducer: public ActivatedAbilityTP{ public: ManaCost * output; int tap; - AManaProducer(int id, MTGCardInstance * card, Targetable * t, ManaCost * _output, ManaCost * _cost = NULL, int doTap = 1, int who = TargetChooser::UNSET ); + AManaProducer(int id, MTGCardInstance * card, Targetable * t, ManaCost * _output, ManaCost * _cost = NULL, int doTap = 0, int who = TargetChooser::UNSET ); int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL); int resolve(); int reactToClick(MTGCardInstance * _card); diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 60c3cfac4..9324ef489 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2503,7 +2503,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG Targetable * t = NULL; if (spell) t = spell->getNextTarget(); - MTGAbility * a = NEW AManaProducer(id, card, t, output, NULL, 1, who); + MTGAbility * a = NEW AManaProducer(id, card, t, output, NULL, doTap, who); a->oneShot = 1; return a; } @@ -3947,15 +3947,25 @@ int ActivatedAbility::reactToTargetClick(Targetable * object) abilityCost = previousManaPool->Diff(player->getManaPool()); delete previousManaPool; } + if(dynamic_cast (this)) + { + AManaProducer * amp = dynamic_cast (this); + needsTapping = amp->tap; + } if (needsTapping && source->isInPlay()) { + if (dynamic_cast (this)) + { + GameObserver *g = GameObserver::GetInstance(); + WEvent * e = NEW WEventCardTappedForMana(source, 0, 1); + g->receiveEvent(e); + } + source->tap(); + } if (dynamic_cast (this)) { - GameObserver *g = GameObserver::GetInstance(); - WEvent * e = NEW WEventCardTappedForMana(source, 0, 1); - g->receiveEvent(e); - } - source->tap(); + this->resolve(); + return 1; } fireAbility(); return 1;