From 094c97dec859a05e3bdd22c2e8c3bce42e3f2536 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sat, 22 Jan 2011 02:35:11 +0000 Subject: [PATCH] corrected an issue where morphing a creature would overwrite basic abilities granted by lords. it was because i was not ADDING the new basic abilities it gained to the end result of face upping the creature. also forgot to mention in my big patch i added a new test suite tool, its a goto command if you start on draw and want to get to second main, goto secondmain instead of next next next next next "next" is still valid and still needed you can not for exsample goto attackers if you are ALREADY currently in "attackers" so if you wanted to go from YOUR attackers to opponents attackers from draw step goto attackers next goto attackers this replaces about 12 "next" commands which would have been needed in preivous test suite. --- projects/mtg/include/AllAbilities.h | 5 +++-- projects/mtg/src/MTGAbility.cpp | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 3e100c823..74cd5e2a7 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2631,7 +2631,7 @@ public: if(ability->aType == MTGAbility::STANDARD_PREVENT) aType = MTGAbility::STANDARD_PREVENT; } - + int canBeInList(Player *p) { if (tc->canTarget(p)) return 1; @@ -2642,7 +2642,8 @@ public: { if(card->isPhased || source->isPhased) return 0; - if ((includeSelf || card != source) && tc->canTarget(card)) return 1; + if ((includeSelf || card != source) && tc->canTarget(card)) + return 1; return 0; } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 0fca5d2b3..dccb8cee4 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2901,7 +2901,11 @@ int AbilityFactory::getAbilities(vector * v, Spell * spell, MTGCar card->types = card->model->data->types; for (int i = 0; i < Constants::MTG_NB_COLORS; ++i) card->colors[i] = card->model->data->colors[i]; - card->basicAbilities = card->model->data->basicAbilities; + for (map::const_iterator it = card->model->data->basicAbilities.begin(); it != card->model->data->basicAbilities.end(); ++it) + { + int i = it->first; + card->basicAbilities[i] += card->model->data->basicAbilities[i]; + } ManaCost * copyCost = card->model->data->getManaCost(); card->getManaCost()->copy(copyCost); magicText = card->model->data->magicText;