mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
- Extra check to verify a player is in game.
This commit is contained in:
parent
aec46f366b
commit
79983fbe26
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue