Improved freeze checks and canRespond/isInGame usage

This commit is contained in:
Oleg Agafonov 2020-07-01 13:48:22 +04:00
parent 3b19e3db35
commit adbe84c540
17 changed files with 54 additions and 77 deletions

View file

@ -122,8 +122,7 @@ 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
&& player.isInGame()) {
if (player != null) {
player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
}
}
@ -136,8 +135,7 @@ 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
&& player.isInGame()) {
if (player != null) {
player.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, preventable);
}
}