public TriggeredAbilities(final TriggeredAbilities abilities) { for (Map.Entry<String, TriggeredAbility> entry : abilities.entrySet()) { this.put(entry.getKey(), entry.getValue().copy()); } for (Map.Entry<String, List<UUID>> entry : abilities.sources.entrySet()) { sources.put(entry.getKey(), entry.getValue()); } }
public void clear() { battlefield.clear(); effects.clear(); triggers.clear(); delayed.clear(); triggered.clear(); stack.clear(); exile.clear(); command.clear(); revealed.clear(); lookedAt.clear(); turnNum = 0; extraTurn = false; legendaryRuleActive = true; gameOver = false; specialActions.clear(); otherAbilities.clear(); combat.clear(); turnMods.clear(); watchers.clear(); values.clear(); zones.clear(); }
/** * Removes Triggered abilities that were gained from sourceId * * @param sourceId */ public void resetTriggersForSourceId(UUID sourceId) { List<String> keysToRemove = triggers.removeGainedAbilitiesForSource(sourceId); for (String key : keysToRemove) { triggers.remove(key); } }
public void handleEvent(GameEvent event, Game game) { watchers.watch(event, game); delayed.checkTriggers(event, game); triggers.checkTriggers(event, game); }