From 5ef6091ca6cf756b9bc51e583b08131754589480 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Wed, 18 Aug 2010 13:57:56 +0000 Subject: [PATCH] corrected an issue with types when not assigning colors using transforms --- projects/mtg/include/AllAbilities.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 224b1f367..0e1a6b5f5 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2520,15 +2520,14 @@ public: } int addToGame(){ MTGCardInstance * _target = (MTGCardInstance *)target; - while (_target->next) _target=_target->next; for (int j = 0; j < Constants::MTG_NB_COLORS; j++){ if (_target->hasColor(j)) oldcolors.push_back(j); - _target->removeColor(j); - } + } list::iterator it; + for( it=colors.begin(); it != colors.end();it++){ _target->setColor(0,1);} for ( it=types.begin() ; it != types.end(); it++ ){_target->addType(*it);} - for ( it=colors.begin() ; it != colors.end(); it++ ){_target->setColor(*it);} + for ( it=colors.begin(); it != colors.end(); it++){_target->setColor(*it);} for ( it=abilities.begin() ; it != abilities.end(); it++ ){_target->basicAbilities[*it]++;} for ( it=oldcolors.begin() ; it != oldcolors.end(); it++ ){} return MTGAbility::addToGame();} @@ -2597,11 +2596,8 @@ public: } int addToGame(){ MTGCardInstance * _target = (MTGCardInstance *)target; - for (int j = 0; j < Constants::MTG_NB_COLORS; j++){ - if (_target->hasColor(j)) - _target->removeColor(j); - } list::iterator it; + for( it=colors.begin(); it != colors.end();it++){ _target->setColor(0,1);} for ( it=types.begin() ; it != types.end(); it++ ){_target->addType(*it);} for ( it=colors.begin() ; it != colors.end(); it++ ){_target->setColor(*it);} for ( it=abilities.begin() ; it != abilities.end(); it++ ){_target->basicAbilities[*it]++;}