Esempio n. 1
0
 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());
   }
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 /**
  * 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);
   }
 }
Esempio n. 4
0
 public void handleEvent(GameEvent event, Game game) {
   watchers.watch(event, game);
   delayed.checkTriggers(event, game);
   triggers.checkTriggers(event, game);
 }