@Override public void init(Ability source, Game game) { super.init(source, game); //To change body of generated methods, choose Tools | Templates. if (duration.isOnlyValidIfNoZoneChange()) { // If source permanent is no longer onto battlefield discard the effect if (source.getSourcePermanentIfItStillExists(game) == null) { discard(); } } }
@Override public void init(Ability source, Game game) { super.init(source, game); zoneChangeCounter = game.getState().getZoneChangeCounter(source.getId()); }
@Override public void init(Ability source, Game game) { super.init(source, game); OvermasterWatcher watcher = game.getState().getWatcher(OvermasterWatcher.class, source.getControllerId()); if (watcher != null) { watcher.setReady(); } }
@Override public void init(Ability source, Game game) { super.init(source, game); InsistWatcher watcher = game.getState().getWatcher(InsistWatcher.class, source.getControllerId()); if (watcher != null) { watcher.setReady(); } }
@Override public void init(Ability source, Game game) { super.init(source, game); if (baseCondition instanceof LockedInCondition) { condition = new FixedCondition(((LockedInCondition) baseCondition).getBaseCondition().apply(game, source)); } else { condition = baseCondition; } effect.setTargetPointer(this.targetPointer); effect.init(source, game); if (otherwiseEffect != null) { otherwiseEffect.setTargetPointer(this.targetPointer); otherwiseEffect.init(source, game); } initDone = true; }