@Override public void init(Ability source, Game game) { super.init(source, game); if (durationPhaseStep != null) { durationPlayerId = source.getControllerId(); sameStep = true; } }
@Override public void init(Ability source, Game game) { super.init(source, game); affectedObjectList.add(new MageObjectReference(source.getSourceId(), game)); }
@Override public void init(Ability source, Game game) { super.init(source, game); affectedObjectList.add(new MageObjectReference(source.getSourceId(), game)); }
@Override public void init(Ability source, Game game) { super.init(source, game); if (affectedObjectsSet) { affectedObjectList.add(new MageObjectReference(source.getSourceId(), game)); } }
@Override public void init(Ability source, Game game) { super.init(source, game); this.getAffectedObjects().add(new MageObjectReference(source.getSourceId(), game)); }
@Override public void init(Ability source, Game game) { super.init(source, game); if (this.affectedObjectsSet) { for (Permanent creature : game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES, source.getFirstTarget(), game)) { affectedObjectList.add(new MageObjectReference(creature, game)); } } }
@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); Player player = game.getPlayer(source.getControllerId()); String message = "Should the target creature get -2/+2 instead of +2/-2?"; if (player != null && player.chooseUse(Outcome.Neutral, message, source, game)) { this.power *= -1; this.toughness *= -1; } }
@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); if (this.affectedObjectsSet) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { affectedObjectList.add(new MageObjectReference(permanent, game)); } } }
@Override public void init(Ability source, Game game) { super.init(source, game); if (this.affectedObjectsSet) { List<Permanent> creatures = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getFirstTarget(), game); for (Permanent creature : creatures) { affectedObjectList.add(new MageObjectReference(creature, game)); } } }
@Override public void init(Ability source, Game game) { super.init(source, game); if (this.affectedObjectsSet) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getControllerId(), game)) { affectedObjectList.add(new MageObjectReference(permanent, game)); } } }
@Override public void init(Ability source, Game game) { super.init(source, game); if (this.affectedObjectsSet) { List<Permanent> creatures = game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, source.getFirstTarget(), game); for (Permanent creature : creatures) { affectedObjectList.add(new MageObjectReference(creature, game)); } } }
@Override public void init(Ability source, Game game) { super.init(source, game); if (this.affectedObjectsSet) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, getTargetPointer().getFirst(game, source), game)) { affectedObjectList.add(new MageObjectReference(permanent, game)); } } }
@Override public void init(Ability source, Game game) { super.init(source, game); affectedObjectList.add(new MageObjectReference(source.getSourceId(), game.getState().getZoneChangeCounter(source.getSourceId()), game)); }
@Override public void init(Ability source, Game game) { super.init(source, game); targetPermanentReference = new MageObjectReference(source.getTargets().get(1).getFirstTarget(), game); }
@Override public void init(Ability source, Game game) { super.init(source, game); if (this.affectedObjectsSet) { Set<UUID> opponents = game.getOpponents(source.getControllerId()); for (Permanent perm: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { if (opponents.contains(perm.getControllerId())) { affectedObjectList.add(new MageObjectReference(perm, game)); } } } }
@Override public void init(Ability source, Game game) { super.init(source, game); startingTurn = game.getTurnNum(); if (game.getPhase().getStep().getType() == PhaseStep.END_TURN) { startingTurn = game.getTurnNum() + 1; } }
@Override public void init(Ability source, Game game) { super.init(source, game); if (this.affectedObjectsSet) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { for (Permanent perm :game.getState().getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { affectedObjectList.add(new MageObjectReference(perm, game)); } } } }
@Override public void init(Ability source, Game game) { super.init(source, game); Spell object = game.getStack().getSpell(targetPointer.getFirst(game, source)); if (object != null) { zoneChangeCounter = game.getState().getZoneChangeCounter(object.getSourceId()) + 1; permanentId = object.getSourceId(); } }