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

View File

@@ -56,9 +56,12 @@ int Counter::added()
{
if (power != 0 || toughness != 0)
{
target->power -= target->pbonus;
target->addToToughness(-target->tbonus);
target->pbonus += power;
target->tbonus += toughness;
target->applyPTL();
target->power += target->pbonus;
target->addToToughness(target->pbonus);
}
return 1;
}
@@ -67,9 +70,12 @@ int Counter::removed()
{
if (power != 0 || toughness != 0)
{
target->power -= target->pbonus;
target->addToToughness(-target->tbonus);
target->pbonus -= power;
target->tbonus -= toughness;
target->applyPTL();
target->power += target->pbonus;
target->addToToughness(target->pbonus);
}
return 1;
}