mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- 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:
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user