mirror of
https://github.com/correl/mage.git
synced 2025-04-10 09:11:04 -09:00
- Fixed #8124
This commit is contained in:
parent
76e57d009e
commit
d05104ff61
3 changed files with 15 additions and 5 deletions
Mage.Sets/src/mage/cards
Mage/src/main/java/mage/abilities/condition/common
|
@ -76,7 +76,9 @@ enum AnyaMercilessAngelDynamicValue implements DynamicValue {
|
||||||
int startingLifeTotal = game.getStartingLife();
|
int startingLifeTotal = game.getStartingLife();
|
||||||
for (UUID opponentId : game.getOpponents(controller.getId())) {
|
for (UUID opponentId : game.getOpponents(controller.getId())) {
|
||||||
Player opponent = game.getPlayer(opponentId);
|
Player opponent = game.getPlayer(opponentId);
|
||||||
if (opponent != null && opponent.getLife() < startingLifeTotal / 2) {
|
if (opponent != null
|
||||||
|
&& opponent.isInGame()
|
||||||
|
&& opponent.getLife() < startingLifeTotal / 2) {
|
||||||
opponentCount++;
|
opponentCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.v;
|
package mage.cards.v;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -60,7 +59,9 @@ enum PoisonedCondition implements Condition {
|
||||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||||
for (UUID opponentUuid : opponents) {
|
for (UUID opponentUuid : opponents) {
|
||||||
Player opponent = game.getPlayer(opponentUuid);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,17 @@ public class XorLessLifeCondition implements Condition {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
boolean conditionApplies = false;
|
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 ) {
|
switch ( this.type ) {
|
||||||
case AN_OPPONENT:
|
case AN_OPPONENT:
|
||||||
for ( UUID opponentUUID : game.getOpponents(source.getControllerId()) ) {
|
for ( UUID opponentUUID : game.getOpponents(source.getControllerId()) ) {
|
||||||
conditionApplies |= game.getPlayer(opponentUUID).getLife() <= amount;
|
conditionApplies |= game.getPlayer(opponentUUID).isInGame()
|
||||||
|
&& game.getPlayer(opponentUUID).getLife() <= amount;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONTROLLER:
|
case CONTROLLER:
|
||||||
|
@ -46,7 +52,8 @@ public class XorLessLifeCondition implements Condition {
|
||||||
PlayerList playerList = game.getState().getPlayersInRange(source.getControllerId(), game);
|
PlayerList playerList = game.getState().getPlayersInRange(source.getControllerId(), game);
|
||||||
for ( UUID pid : playerList ) {
|
for ( UUID pid : playerList ) {
|
||||||
Player p = game.getPlayer(pid);
|
Player p = game.getPlayer(pid);
|
||||||
if (p != null) {
|
if (p != null
|
||||||
|
&& p.isInGame()) {
|
||||||
if (maxLife < p.getLife()) {
|
if (maxLife < p.getLife()) {
|
||||||
maxLife = p.getLife();
|
maxLife = p.getLife();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue