added basepower and basetoughness
added these two so if we want to access original power and toughness, we can point to origpower and origtoughness respectively.
This commit is contained in:
@@ -72,7 +72,9 @@ public:
|
|||||||
int regenerateTokens;
|
int regenerateTokens;
|
||||||
int isToken;
|
int isToken;
|
||||||
int origpower;
|
int origpower;
|
||||||
|
int basepower;
|
||||||
int origtoughness;
|
int origtoughness;
|
||||||
|
int basetoughness;
|
||||||
int isMultiColored;
|
int isMultiColored;
|
||||||
int isLeveler;
|
int isLeveler;
|
||||||
bool enchanted;
|
bool enchanted;
|
||||||
|
|||||||
@@ -4183,18 +4183,18 @@ for (it = types.begin(); it != types.end(); it++)
|
|||||||
if(newpowerfound )
|
if(newpowerfound )
|
||||||
{//setting p/t only overrides base p/t as of M15 changes
|
{//setting p/t only overrides base p/t as of M15 changes
|
||||||
WParsedInt * val = NEW WParsedInt(newpower,NULL, source);
|
WParsedInt * val = NEW WParsedInt(newpower,NULL, source);
|
||||||
oldpowerbonus = _target->power - _target->origpower;//keep bonus if any
|
oldpowerbonus = _target->power - _target->basepower;//keep bonus if any
|
||||||
_target->setPower(oldpowerbonus + val->getValue());
|
_target->setPower(oldpowerbonus + val->getValue());
|
||||||
_target->origpower = val->getValue();
|
_target->basepower = val->getValue();
|
||||||
//_target->power += reapplyCountersBonus(_target,false,true);
|
//_target->power += reapplyCountersBonus(_target,false,true);
|
||||||
delete val;
|
delete val;
|
||||||
}
|
}
|
||||||
if(newtoughnessfound )
|
if(newtoughnessfound )
|
||||||
{//setting p/t only overrides base p/t as of M15 changes
|
{//setting p/t only overrides base p/t as of M15 changes
|
||||||
WParsedInt * val = NEW WParsedInt(newtoughness,NULL, source);
|
WParsedInt * val = NEW WParsedInt(newtoughness,NULL, source);
|
||||||
oldtoughnessbonus = _target->toughness - _target->origtoughness;// keep bonus if any
|
oldtoughnessbonus = _target->toughness - _target->basetoughness;// keep bonus if any
|
||||||
_target->setToughness(oldtoughnessbonus + val->getValue());
|
_target->setToughness(oldtoughnessbonus + val->getValue());
|
||||||
_target->origtoughness = val->getValue();
|
_target->basetoughness = val->getValue();
|
||||||
//_target->addToToughness(reapplyCountersBonus(_target,true,false));
|
//_target->addToToughness(reapplyCountersBonus(_target,true,false));
|
||||||
_target->life = _target->toughness;
|
_target->life = _target->toughness;
|
||||||
delete val;
|
delete val;
|
||||||
@@ -4283,11 +4283,11 @@ int ATransformer::destroy()
|
|||||||
|
|
||||||
if(newpowerfound )
|
if(newpowerfound )
|
||||||
{
|
{
|
||||||
_target->setPower(oldpowerbonus + _target->origpower);
|
_target->setPower(oldpowerbonus + _target->basepower);
|
||||||
}
|
}
|
||||||
if(newtoughnessfound )
|
if(newtoughnessfound )
|
||||||
{
|
{
|
||||||
_target->setToughness(oldtoughnessbonus + _target->origtoughness);
|
_target->setToughness(oldtoughnessbonus + _target->basetoughness);
|
||||||
}
|
}
|
||||||
if(newAbilityFound)
|
if(newAbilityFound)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
|
|||||||
attacker = 0;
|
attacker = 0;
|
||||||
lifeOrig = life;
|
lifeOrig = life;
|
||||||
origpower = power;
|
origpower = power;
|
||||||
|
basepower = origpower;
|
||||||
origtoughness = toughness;
|
origtoughness = toughness;
|
||||||
|
basetoughness = origtoughness;
|
||||||
belongs_to = arg_belongs_to;
|
belongs_to = arg_belongs_to;
|
||||||
owner = NULL;
|
owner = NULL;
|
||||||
if (arg_belongs_to)
|
if (arg_belongs_to)
|
||||||
|
|||||||
Reference in New Issue
Block a user