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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user