diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 49d29f760..f502bffae 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2324,7 +2324,7 @@ public: { if(!nonstatic) return; - if(!cda) + if(!cda || (cda && (((MTGCardInstance *) target)->isSettingBase < 1))) { ((MTGCardInstance *) target)->power -= wppt->power.getValue(); ((MTGCardInstance *) target)->addToToughness(-wppt->toughness.getValue()); @@ -2337,8 +2337,8 @@ public: _target->power += wppt->power.getValue(); _target->addToToughness(wppt->toughness.getValue()); } - else - {//CDA 7a update wppt + if(cda) + {//update but not apply if(PT.size()) { SAFE_DELETE(wppt); @@ -2385,11 +2385,11 @@ public: int destroy() { if(cda) - { - ; + { + ; } - else - { + else + { ((MTGCardInstance *) target)->power -= ((MTGCardInstance *) target)->pbonus; ((MTGCardInstance *) target)->addToToughness(-((MTGCardInstance *) target)->tbonus); ((MTGCardInstance *) target)->pbonus -= wppt->power.getValue(); diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index 0ecd3b749..38a4a5cd0 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -186,6 +186,7 @@ public: int addToToughness(int value); int setToughness(int value); + int isSettingBase; vectorprotections; int addProtection(TargetChooser * tc); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 0e6f192d8..354e45608 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -4180,6 +4180,8 @@ for (it = types.begin(); it != types.end(); it++) } } } + if(newpowerfound || newtoughnessfound) + _target->isSettingBase += 1; if(newpowerfound ) { WParsedInt * val = NEW WParsedInt(newpower,NULL, source); @@ -4281,6 +4283,9 @@ int ATransformer::destroy() { _target->setColor(*it); } + + if(newpowerfound || newtoughnessfound) + _target->isSettingBase -= 1; if(newpowerfound ) { diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index da3e4e666..6a9a7d8a0 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -53,6 +53,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to thatmuch = 0; flanked = 0; castMethod = Constants::NOT_CAST; + isSettingBase = 0; } MTGCardInstance * MTGCardInstance::createSnapShot()