Extra check to verify a player is in game.
@@ -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);
}
}
