@Override public void addEffect(Effect effect) { if (effect != null) { getEffects().add(effect); } }
@Override public void newId() { if (!(this instanceof MageSingleton)) { this.id = UUID.randomUUID(); } getEffects().newId(); }
@Override public void newOriginalId() { this.id = UUID.randomUUID(); this.originalId = id; getEffects().newId(); }
@Override public Effects getEffects(Game game, EffectType effectType) { Effects typedEffects = new Effects(); for (Effect effect : getEffects()) { if (effect.getEffectType() == effectType) { typedEffects.add(effect); } } return typedEffects; }
private boolean resolveMode(Game game) { boolean result = true; for (Effect effect : getEffects()) { if (effect instanceof OneShotEffect) { boolean effectResult = effect.apply(game, this);
Outcome outcome = getEffects().isEmpty() ? Outcome.Detriment : getEffects().get(0).getOutcome(); if (getTargets().chooseTargets(outcome, this.controllerId, this, noMana, game) == false) { if ((variableManaCost != null || announceString != null)) { if (cost instanceof TapSourceCost) { Mana mana = null; Effect effect = getEffects().get(0); if (effect instanceof DynamicManaEffect) { mana = ((DynamicManaEffect) effect).getMana(game, this);