Don't count players who have lost or left the game as having lost life.

Fixes https://github.com/magefree/mage/issues/5153
This commit is contained in:
dilnu 2018-07-18 21:07:23 -04:00
parent fa2c008359
commit e1fc060755

View file

@ -1853,7 +1853,7 @@ public abstract class PlayerImpl implements Player, Serializable {
@Override @Override
public int loseLife(int amount, Game game, boolean atCombat) { public int loseLife(int amount, Game game, boolean atCombat) {
if (!canLoseLife) { if (!canLoseLife || !this.isInGame()) {
return 0; return 0;
} }
GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount, atCombat); GameEvent event = new GameEvent(GameEvent.EventType.LOSE_LIFE, playerId, playerId, playerId, amount, atCombat);