mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
[M21] actually fix Enthralling Hold (#6746)
This commit is contained in:
parent
4652ebd790
commit
ca29e61b1d
5 changed files with 110 additions and 3 deletions
|
|
@ -52,6 +52,8 @@ public interface Target extends Serializable {
|
|||
|
||||
boolean canTarget(UUID id, Ability source, Game game);
|
||||
|
||||
boolean stillLegalTarget(UUID id, Ability source, Game game);
|
||||
|
||||
boolean canTarget(UUID playerId, UUID id, Ability source, Game game);
|
||||
|
||||
boolean isLegal(Ability source, Game game);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,14 @@ import mage.game.events.GameEvent.EventType;
|
|||
import mage.players.Player;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -337,7 +344,7 @@ public abstract class TargetImpl implements Target {
|
|||
illegalTargets.add(targetId);
|
||||
continue;
|
||||
}
|
||||
if (!canTarget(targetId, source, game)) {
|
||||
if (!stillLegalTarget(targetId, source, game)) {
|
||||
illegalTargets.add(targetId);
|
||||
}
|
||||
}
|
||||
|
|
@ -473,6 +480,11 @@ public abstract class TargetImpl implements Target {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stillLegalTarget(UUID id, Ability source, Game game) {
|
||||
return canTarget(id, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNotTarget(boolean notTarget) {
|
||||
this.notTarget = notTarget;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue