- Extra check to verify a player is in game.

This commit is contained in:
Jeff 2017-02-27 08:41:07 -06:00
parent aec46f366b
commit 79983fbe26

View file

@ -119,7 +119,8 @@ public class DamageTargetEffect extends OneShotEffect {
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
}
Player player = game.getPlayer(targetId);
if (player != null) {
if (player != null
&& player.isInGame()) {
player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
}
}
@ -132,7 +133,8 @@ public class DamageTargetEffect extends OneShotEffect {
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
} else {
Player player = game.getPlayer(targetId);
if (player != null) {
if (player != null
&& player.isInGame()) {
player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
}
}