- isValid: A player who lost the game leaves it and can't be a valid target of spells or abilities.

This commit is contained in:
Agetian
2017-08-22 06:59:59 +00:00
parent e14952607d
commit 99ce6cf29d

View File

@@ -1999,6 +1999,11 @@ public class Player extends GameEntity implements Comparable<Player> {
@Override
public final boolean isValid(final String restriction, final Player sourceController, final Card source, SpellAbility spellAbility) {
// if the current player has already lost the game, he can't be a valid target
if (hasLost()) {
return false;
}
final String[] incR = restriction.split("\\.", 2);
if (incR[0].equals("Opponent")) {