[DMU] Implemented The Raven Man

This commit is contained in:
Daniel Bomar 2022-08-22 11:42:18 -05:00
parent aea8c82728
commit 0d705fdea6
No known key found for this signature in database
GPG key ID: C86C8658F4023918
5 changed files with 131 additions and 0 deletions

View file

@ -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;
}
}