forked from External/mage
[DMU] Implemented The Raven Man
This commit is contained in:
parent
aea8c82728
commit
0d705fdea6
5 changed files with 131 additions and 0 deletions
|
|
@ -43,4 +43,16 @@ public class DiscardedCardWatcher extends Watcher {
|
|||
DiscardedCardWatcher watcher = game.getState().getWatcher(DiscardedCardWatcher.class);
|
||||
return watcher == null ? 0 : watcher.playerMap.getOrDefault(playerId, 0);
|
||||
}
|
||||
|
||||
public static boolean playerInRangeDiscarded(UUID controllerId, Game game) {
|
||||
DiscardedCardWatcher watcher = game.getState().getWatcher(DiscardedCardWatcher.class);
|
||||
if (watcher != null) {
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controllerId, game)) {
|
||||
if (watcher.playerMap.getOrDefault(playerId, 0) > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue