CDA complete

This fixes the bug I introduced lst time. The damage was not taking into
account, but this time the damage reflects...
TODO/TOFOLLOW: update test and update all cards that uses CDA :)
This commit is contained in:
Anthony Calosa
2015-09-16 06:42:02 +08:00
parent 72aaa18a35
commit 6aab17d0b3
6 changed files with 94 additions and 110 deletions
-28
View File
@@ -53,8 +53,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
thatmuch = 0;
flanked = 0;
castMethod = Constants::NOT_CAST;
isSettingBase = false;
isPTswitch = false;
}
MTGCardInstance * MTGCardInstance::createSnapShot()
@@ -66,32 +64,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
return snapShot;
}
void MTGCardInstance::applyPTL()
{
//7a ??(Characteristic Defining Ability)??
power = origpower;
toughness = origtoughness;
//7b
if (isSettingBase)
{
power = basepower;
toughness = basetoughness;
}
//7c - 7d shared?
power += pbonus;
toughness += tbonus;
//7e switch is last
if (isPTswitch)
{
oldP = power;
oldT = toughness;
toughness = oldP;
power = oldT;
}
life = toughness;
doDamageTest = 1;
}
void MTGCardInstance::copy(MTGCardInstance * card)
{
MTGCard * source = card->model;