fixed an oversight and an error...in lifelostthisturn for a player, if the life gain was less then 0 then i want to ADD the abs pos to the amount, not remove it...and damage from creatures is considered lifelost...

This commit is contained in:
omegablast2002@yahoo.com
2011-01-29 22:21:18 +00:00
parent 853b8ea5c6
commit 4103a8964f
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -171,6 +171,7 @@ int Damage::resolve()
//return the left over amount after effects have been applied to them. //return the left over amount after effects have been applied to them.
a = target->dealDamage(damage); a = target->dealDamage(damage);
target->damageCount += 1; target->damageCount += 1;
target->lifeLostThisTurn += damage;
} }
//Send (Damage/Replaced effect) event to listeners //Send (Damage/Replaced effect) event to listeners
+1 -1
View File
@@ -126,7 +126,7 @@ int Player::gainOrLoseLife(int value)
//that the triggered event stored in the card for "that much". //that the triggered event stored in the card for "that much".
life+=value; life+=value;
if (value<0) if (value<0)
lifeLostThisTurn -= value; lifeLostThisTurn += abs(value);
//Send life event to listeners //Send life event to listeners
WEvent * lifed = NEW WEventLife(this,value); WEvent * lifed = NEW WEventLife(this,value);