@Override public CantRegenerateTargetEffect copy() { return new CantRegenerateTargetEffect(this); }
@Override public boolean applies(GameEvent event, Ability source, Game game) { UUID targetId = getTargetPointer().getFirst(game, source); if (targetId != null) { return targetId.equals(event.getTargetId()); } return false; } }
public ScorchingLava(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}"); // Kicker {R} this.addAbility(new KickerAbility("{R}")); // Scorching Lava deals 2 damage to any target. If Scorching Lava was kicked, that creature can't be regenerated this turn and if it would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect( new CantRegenerateTargetEffect(Duration.EndOfTurn, "that creature"), new LockedInCondition(KickedCondition.instance))); this.getSpellAbility().addEffect(new ConditionalOneShotEffect( new ExileTargetIfDiesEffect(), new LockedInCondition(KickedCondition.instance) ).setText("and if it would die this turn, exile it instead")); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public EngulfingFlames(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); // Engulfing Flames deals 1 damage to target creature. It can't be regenerated this turn. this.getSpellAbility().addEffect(new DamageTargetEffect(1)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "It")); // Flashback {3}{R} this.addAbility(new FlashbackAbility(new ManaCostsImpl("{3}{R}"), TimingRule.INSTANT)); }
public Disintegrate(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}"); // Disintegrate deals X damage to any target. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(ManacostVariableValue.instance)); this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "That creature")); Effect effect = new ExileTargetIfDiesEffect(); effect.setText("If the creature would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public RageOfPurphoros(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{4}{R}"); // Rage of Purphoros deals 4 damage to target creature. It can't be regenerated this turn. Scry 1. this.getSpellAbility().addEffect(new DamageTargetEffect(4)); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "It")); this.getSpellAbility().addEffect(new ScryEffect(1)); this.getSpellAbility().addWatcher(new DamagedByWatcher()); }
public Carbonize(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); // Carbonize deals 3 damage to any target. That creature can't be regenerated this turn. If the creature would die this turn, exile it instead. this.getSpellAbility().addEffect(new DamageTargetEffect(3)); this.getSpellAbility().addEffect(new CantRegenerateTargetEffect(Duration.EndOfTurn, "That creature")); this.getSpellAbility().addEffect(new ExileTargetIfDiesEffect().setText("If the creature would die this turn, exile it instead")); this.getSpellAbility().addTarget(new TargetAnyTarget()); this.getSpellAbility().addWatcher(new DamagedByWatcher()); }