From 8eddcfb6392155f27794e39e446fa06d8000ffa4 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 29 Sep 2015 15:09:29 +0800 Subject: [PATCH] added converge keyword converge returns the number of colors spent when casting the spell. example you pay {2}{W}{W}{R}{B}, converge returns 3, white, black and red colors spent with... --- projects/mtg/include/AllAbilities.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 038c16962..e553a284b 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -556,6 +556,15 @@ private: intValue = card->previous->previous->sunburst; } } + else if (s == "converge") + { + intValue = 0; + for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i) + { + if(card->getManaCost()->getManaUsedToCast()->hasColor(i)) + intValue +=1; + } + } else if (s == "targetedcurses") { if(card->playerTarget)