diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 68fc41c15..6c7f3e37f 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -534,6 +534,7 @@ prowess_of_the_fair.txt prowess_of_the_fair2.txt prowess_of_the_fair3.txt PTInstant.txt +PT_M15_errata.txt pygmy_troll.txt pyknite_i426.txt pyroclasm.txt diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index e8d099441..78df9b851 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -4307,10 +4307,10 @@ public: string newpower; bool newpowerfound; - int oldpower; + int oldpowerbonus; string newtoughness; bool newtoughnessfound; - int oldtoughness; + int oldtoughnessbonus; map > newAbilities; vector newAbilitiesList; bool newAbilityFound; diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index e868654bb..429d51edd 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -4181,20 +4181,18 @@ for (it = types.begin(); it != types.end(); it++) } } if(newpowerfound ) - { + {//setting p/t only overrides base p/t as of M15 changes WParsedInt * val = NEW WParsedInt(newpower,NULL, source); - oldpower = _target->power; - _target->power += val->getValue(); - _target->power -= oldpower; + oldpowerbonus = _target->power - _target->origpower;//keep bonus if any + _target->setPower(oldpowerbonus + val->getValue()); _target->power += reapplyCountersBonus(_target,false,true); delete val; } if(newtoughnessfound ) - { + {//setting p/t only overrides base p/t as of M15 changes WParsedInt * val = NEW WParsedInt(newtoughness,NULL, source); - oldtoughness = _target->toughness; - _target->addToToughness(val->getValue()); - _target->addToToughness(-oldtoughness); + oldtoughnessbonus = _target->toughness - _target->origtoughness;// keep bonus if any + _target->setToughness(oldtoughnessbonus + val->getValue()); _target->addToToughness(reapplyCountersBonus(_target,true,false)); _target->life = _target->toughness; delete val; @@ -4283,11 +4281,11 @@ int ATransformer::destroy() if(newpowerfound ) { - _target->power = oldpower; + _target->setPower(oldpowerbonus + _target->origpower); } if(newtoughnessfound ) { - _target->setToughness(oldtoughness); + _target->setToughness(oldtoughnessbonus + _target->origtoughness); } if(newAbilityFound) {