From 14695e7e5b80bc11f5acdcbddf415c9168b3b6f3 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Fri, 24 Aug 2012 23:59:35 +0000 Subject: [PATCH] removed kudzu hardcode, that card can be done with soft code...corrected frostbeast, it was incorrectly ignoring walls...it should destroy all even walls. --- projects/mtg/include/AllAbilities.h | 76 +---------------------------- 1 file changed, 1 insertion(+), 75 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 74ab56793..09dd1e685 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -4583,7 +4583,7 @@ public: { nbOpponents = 0; MTGCardInstance * opponent = source->getNextOpponent(); - while (opponent && !opponent->hasSubtype("wall")) + while (opponent) { opponents[nbOpponents] = opponent; nbOpponents++; @@ -4819,80 +4819,6 @@ public: } }; -//Kudzu. -//What happens when there are no targets ??? -class AKudzu: public TargetAbility -{ -public: - AKudzu(GameObserver* observer, int _id, MTGCardInstance * card, MTGCardInstance * _target) : - TargetAbility(observer, _id, card, NEW TypeTargetChooser(observer, "land", card)) - { - tc->toggleTarget(_target); - target = _target; - } - - int receiveEvent(WEvent * event) - { - if (WEventCardTap* wect = dynamic_cast(event)) - { - if (wect->before == false && wect->after == true && wect->card == target) - { - MTGCardInstance * _target = (MTGCardInstance *) target; - if (!_target->isInPlay(game)) return 0; - target = _target->controller()->game->putInGraveyard(_target); - reactToClick(source); - return 1; - } - } - return 0; - - } - - int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL) - { - MTGCardInstance * _target = (MTGCardInstance *) target; - if (card == source && (!_target || !_target->isInPlay(game))) - { - DebugTrace("Kudzu Reacts to click !"); - return 1; - } - return 0; - } - - int resolve() - { - target = tc->getNextCardTarget(); - source->target = (MTGCardInstance *) target; - return 1; - } - - int testDestroy() - { - int stillLandsInPlay = 0; - for (int i = 0; i < 2; i++) - { - if (game->players[i]->game->inPlay->hasType("Land")) stillLandsInPlay = 1; - } - if (!stillLandsInPlay) - { - source->controller()->game->putInGraveyard(source); - return 1; - } - - if (!game->isInPlay(source)) - { - return 1; - } - - return 0; - } - - AKudzu * clone() const - { - return NEW AKudzu(*this); - } -}; - //Power Leak class APowerLeak: public TriggeredAbility {