/* 20130711 *903.14a A player that’s been dealt 21 or more combat damage by the same commander * over the course of the game loses the game. (This is a state-based action. See rule 704.) * */ @Override protected boolean checkStateBasedActions() { for (Player player : getPlayers().values()) { CommanderInfoWatcher damageWatcher = (CommanderInfoWatcher) getState().getWatchers().get("CommanderCombatDamageWatcher", player.getCommanderId()); if (damageWatcher == null) { continue; } for (Map.Entry<UUID, Integer> entrySet : damageWatcher.getDamageToPlayer().entrySet()) { if (entrySet.getValue() > 20) { Player opponent = getPlayer(entrySet.getKey()); if (opponent != null && !opponent.hasLost() && player.isInGame()) { opponent.lost(this); } } } } return super.checkStateBasedActions(); }