Cascade Class

seperate cascade and fix cant life change :)
This commit is contained in:
Anthony Calosa
2016-06-03 10:40:38 +08:00
parent 0493c4063f
commit 62fa9acc9f
5 changed files with 97 additions and 61 deletions
+2 -2
View File
@@ -229,8 +229,8 @@ int Damage::resolve()
{
// "Normal" case,
//return the left over amount after effects have been applied to them.
if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && !((Player *)target)->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
a = target->dealDamage(damage);
if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER && ((Player *)target)->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
;//do nothing
else
a = target->dealDamage(damage);
target->damageCount += damage;//the amount must be the actual damage so i changed this from 1 to damage, this fixes pdcount and odcount