Separated PT Modifiers, Fixed Changeling, Modified Counter as a cost

CDA Todo
This commit is contained in:
Anthony Calosa
2015-09-12 12:03:52 +08:00
parent 8b287cca0c
commit 11d68c0e27
9 changed files with 119 additions and 66 deletions

View File

@@ -4183,23 +4183,17 @@ 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;
oldpowerbonus = oldpower - _target->basepower;
_target->setPower(oldpowerbonus + val->getValue());
_target->basepower = val->getValue();
//?effects that change pt outside this?
//_target->power += reapplyCountersBonus(_target,false,true);
_target->isSettingBase = true;
_target->applyPTL();
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;
oldtoughnessbonus = oldtoughness - _target->basetoughness;
_target->setToughness(oldtoughnessbonus + val->getValue());
_target->basetoughness = val->getValue();
//_target->addToToughness(reapplyCountersBonus(_target,true,false));
_target->life = _target->toughness;
_target->isSettingBase = true;
_target->applyPTL();
delete val;
}
@@ -4286,16 +4280,15 @@ int ATransformer::destroy()
if(newpowerfound )
{//override since we changed tha base, the bonus must have changed
oldpowerbonus = (_target->power - _target->basepower);//math hurts my head...it's all over the place :P
_target->setPower(_target->origpower + oldpowerbonus);
_target->basepower = _target->origpower;//revert
_target->isSettingBase = false;
_target->basepower = _target->origpower;
_target->applyPTL();
}
if(newtoughnessfound )
{//override since we changed tha base, the bonus must have changed
oldtoughnessbonus = (_target->toughness - _target->basetoughness);
_target->setToughness(_target->origtoughness + oldtoughnessbonus);
_target->basetoughness = _target->origtoughness;//revert
_target->life = _target->toughness;//update
{
_target->isSettingBase = false;
_target->basetoughness = _target->origtoughness;
_target->applyPTL();
}
if(newAbilityFound)
{