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