From 847ec5b7c5340318b129aed876243db3fbb85293 Mon Sep 17 00:00:00 2001 From: "wrenczes@gmail.com" Date: Thu, 14 Oct 2010 08:14:49 +0000 Subject: [PATCH] Reinstate the MillExileCost pay variant, as pointed out by Z. --- projects/mtg/include/ExtraCost.h | 1 + projects/mtg/src/ExtraCost.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/projects/mtg/include/ExtraCost.h b/projects/mtg/include/ExtraCost.h index 7916cc083..00fc94e58 100644 --- a/projects/mtg/include/ExtraCost.h +++ b/projects/mtg/include/ExtraCost.h @@ -91,6 +91,7 @@ public: class MillExileCost: public MillCost{ public: MillExileCost(TargetChooser *_tc = NULL); + virtual int doPay(); }; //tap other cost diff --git a/projects/mtg/src/ExtraCost.cpp b/projects/mtg/src/ExtraCost.cpp index f75e2d61d..299cbc2b7 100644 --- a/projects/mtg/src/ExtraCost.cpp +++ b/projects/mtg/src/ExtraCost.cpp @@ -163,6 +163,19 @@ MillExileCost::MillExileCost(TargetChooser *_tc) mCostRenderString = "Deplete To Exile"; } +int MillExileCost::doPay(){ + MTGCardInstance * _target = (MTGCardInstance *) target; + if(target){ + _target->controller()->game->putInZone(_target->controller()->game->library->cards[_target->controller()->game->library->nb_cards-1], + _target->controller()->game->library, + _target->controller()->game->exile); + target = NULL; + if (tc) tc->initTargets(); + return 1; + } + return 0; +} + //Tap target cost TapTargetCost * TapTargetCost::clone() const{ TapTargetCost * ec = NEW TapTargetCost(*this);