mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
- Fixed #8124
This commit is contained in:
parent
76e57d009e
commit
d05104ff61
3 changed files with 15 additions and 5 deletions
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.v;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -60,7 +59,9 @@ enum PoisonedCondition implements Condition {
|
|||
Set<UUID> 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue