mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 20:59:14 -08:00
fix The Lady of Otaria
This commit is contained in:
parent
19ea10af92
commit
f375727068
1 changed files with 5 additions and 5 deletions
|
|
@ -78,7 +78,7 @@ enum TheLadyOfOtariaCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
return TheLadyOfOtariaWatcher.checkPlayer(source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -93,7 +93,7 @@ enum TheLadyOfOtariaCondition implements Condition {
|
|||
|
||||
class TheLadyOfOtariaWatcher extends Watcher {
|
||||
|
||||
private final Set<UUID> playerMap = new HashSet<>();
|
||||
private final Set<UUID> playerSet = new HashSet<>();
|
||||
|
||||
TheLadyOfOtariaWatcher() {
|
||||
super(WatcherScope.GAME);
|
||||
|
|
@ -109,21 +109,21 @@ class TheLadyOfOtariaWatcher extends Watcher {
|
|||
&& zEvent.getTarget() != null
|
||||
&& zEvent.getTarget().isLand(game)
|
||||
&& zEvent.getTarget().isOwnedBy(zEvent.getTarget().getControllerId())) {
|
||||
playerMap.add(zEvent.getTarget().getControllerId());
|
||||
playerSet.add(zEvent.getTarget().getControllerId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
playerMap.clear();
|
||||
playerSet.clear();
|
||||
}
|
||||
|
||||
static boolean checkPlayer(Ability source, Game game) {
|
||||
return game
|
||||
.getState()
|
||||
.getWatcher(TheLadyOfOtariaWatcher.class)
|
||||
.playerMap
|
||||
.playerSet
|
||||
.contains(source.getControllerId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue