diff --git a/Mage.Sets/src/mage/cards/a/AnyaMercilessAngel.java b/Mage.Sets/src/mage/cards/a/AnyaMercilessAngel.java index b1bdf5f02fe..c845d99371f 100644 --- a/Mage.Sets/src/mage/cards/a/AnyaMercilessAngel.java +++ b/Mage.Sets/src/mage/cards/a/AnyaMercilessAngel.java @@ -76,7 +76,9 @@ enum AnyaMercilessAngelDynamicValue implements DynamicValue { int startingLifeTotal = game.getStartingLife(); for (UUID opponentId : game.getOpponents(controller.getId())) { Player opponent = game.getPlayer(opponentId); - if (opponent != null && opponent.getLife() < startingLifeTotal / 2) { + if (opponent != null + && opponent.isInGame() + && opponent.getLife() < startingLifeTotal / 2) { opponentCount++; } } diff --git a/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java b/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java index 4ce8889986c..0e448b1ddce 100644 --- a/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java +++ b/Mage.Sets/src/mage/cards/v/ViridianBetrayers.java @@ -1,4 +1,3 @@ - package mage.cards.v; import java.util.Set; @@ -60,7 +59,9 @@ enum PoisonedCondition implements Condition { Set opponents = game.getOpponents(source.getControllerId()); for (UUID opponentUuid : opponents) { Player opponent = game.getPlayer(opponentUuid); - if (opponent != null && opponent.getCounters().getCount(CounterType.POISON) > 0) { + if (opponent != null + && opponent.isInGame() + && opponent.getCounters().getCount(CounterType.POISON) > 0) { return true; } } diff --git a/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java b/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java index 2a0837cf6f9..3e177e0818b 100644 --- a/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java +++ b/Mage/src/main/java/mage/abilities/condition/common/XorLessLifeCondition.java @@ -28,11 +28,17 @@ public class XorLessLifeCondition implements Condition { @Override public boolean apply(Game game, Ability source) { boolean conditionApplies = false; + + /* + 104.5. If a player loses the game, that player leaves the game. + Once a player leaves the game, their life check is no longer valid. IE Anya, Merciless Angel + */ switch ( this.type ) { case AN_OPPONENT: for ( UUID opponentUUID : game.getOpponents(source.getControllerId()) ) { - conditionApplies |= game.getPlayer(opponentUUID).getLife() <= amount; + conditionApplies |= game.getPlayer(opponentUUID).isInGame() + && game.getPlayer(opponentUUID).getLife() <= amount; } break; case CONTROLLER: @@ -46,7 +52,8 @@ public class XorLessLifeCondition implements Condition { PlayerList playerList = game.getState().getPlayersInRange(source.getControllerId(), game); for ( UUID pid : playerList ) { Player p = game.getPlayer(pid); - if (p != null) { + if (p != null + && p.isInGame()) { if (maxLife < p.getLife()) { maxLife = p.getLife(); }