CDA works by using "cdaactive" keyword on PT changes. Instead of
granting bonus, we modify the orig power and toughness since they are
dynamic PT. cdaactive are for cards like maro, tarmogoyf, etc. To
Follow/To Do: Additional Tests and other bug fix
This commit is contained in:
Anthony Calosa
2015-09-15 06:35:07 +08:00
parent 59792b3456
commit 72aaa18a35
3 changed files with 124 additions and 26 deletions
+4 -6
View File
@@ -68,7 +68,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
void MTGCardInstance::applyPTL()
{
//7a ??how to add cda(Characteristic Defining Ability)??
//7a ??(Characteristic Defining Ability)??
power = origpower;
toughness = origtoughness;
//7b
@@ -80,17 +80,15 @@ void MTGCardInstance::applyPTL()
//7c - 7d shared?
power += pbonus;
toughness += tbonus;
life = toughness;
//7e switch is last
if (isPTswitch)
{
oldP = power;
oldT = toughness;
this->addToToughness(oldP);
this->addToToughness(-oldT);
this->power = oldT;
toughness = oldP;
power = oldT;
}
/* end */
life = toughness;
doDamageTest = 1;
}