public BoldDefense(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}"); // Kicker {3}{W} (You may pay an additional {3}{W} as you cast this spell.) this.addAbility(new KickerAbility("{3}{W}")); // Creatures you control get +1/+1 until end of turn. If Bold Defense was kicked, instead creatures you control get +2/+2 and gain first strike until end of turn. this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostControlledEffect(2, 2, Duration.EndOfTurn), new BoostTargetEffect(1, 1, Duration.EndOfTurn), new LockedInCondition(KickedCondition.instance), "Creatures you control get +1/+1 until end of turn. if this spell was kicked, instead creatures you control get +2/+2")); this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new GainAbilityControlledEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, StaticFilters.FILTER_PERMANENT_CREATURE, false), null, new LockedInCondition(KickedCondition.instance), "and gain first strike until end of turn")); }
@Override public void init(Ability source, Game 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; }
public WindsOfQalSisma(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{G}"); // Prevent all combat damage that would be dealt this turn. // Ferocious - If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control. Effect effect = new ConditionalReplacementEffect( new PreventAllDamageByAllPermanentsEffect(filter, Duration.EndOfTurn, true), new LockedInCondition(FerociousCondition.instance), new PreventAllDamageByAllPermanentsEffect(Duration.EndOfTurn, true)); effect.setText("Prevent all combat damage that would be dealt this turn.<br>" + "<i>Ferocious</i> — If you control a creature with power 4 or greater, instead prevent all combat damage that would be dealt this turn by creatures your opponents control"); this.getSpellAbility().addEffect(effect); }
@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; }
public BarrageOfBoulders(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}"); // Barrage of Boulders deals 1 damage to each creature you don't control. this.getSpellAbility().addEffect(new DamageAllEffect(1, filter)); // Ferocious - If you control a creature with power 4 or greater, creatures can't block this turn Effect effect = new ConditionalRestrictionEffect( Duration.EndOfTurn, new CantBlockAllEffect(FILTER_PERMANENT_CREATURES, Duration.EndOfTurn), new LockedInCondition(FerociousCondition.instance), null); effect.setText("<br/><i>Ferocious</i> — If you control a creature with power 4 or greater, creatures can't block this turn"); this.getSpellAbility().addEffect(effect); }
@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; }
public StrengthOfNight(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); // Kicker {B} this.addAbility(new KickerAbility("{B}")); // Creatures you control get +1/+1 until end of turn. If Strength of Night was kicked, Zombie creatures you control get an additional +2/+2 until end of turn. this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); ContinuousEffect effect = new BoostControlledEffect(2, 2, Duration.EndOfTurn, filter); this.getSpellAbility().addEffect(new ConditionalContinuousEffect(effect, new LockedInCondition(KickedCondition.instance), "if this spell was kicked, Zombie creatures you control get an additional +2/+2 until end of turn.")); }
@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; }
public TragicSlip(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}"); // Target creature gets -1/-1 until end of turn. // <i>Morbid</i> — That creature gets -13/-13 until end of turn instead if a creature died this turn. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new BoostTargetEffect(-13, -13, Duration.EndOfTurn), new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new LockedInCondition(MorbidCondition.instance), "Target creature gets -1/-1 until end of turn. <i>Morbid</i> — That creature gets -13/-13 until end of turn instead if a creature died this turn")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
@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; }
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 MightOfOldKrosa(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // Target creature gets +2/+2 until end of turn. If you cast this spell during your main phase, that creature gets +4/+4 until end of turn instead. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new BoostTargetEffect(4,4, Duration.EndOfTurn), new BoostTargetEffect(2, 2, Duration.EndOfTurn), new LockedInCondition(AddendumCondition.instance), "Target creature gets +2/+2 until end of turn. If you cast this spell during your main phase, that creature gets +4/+4 until end of turn instead")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public MirranMettle(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn)); this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn), new LockedInCondition(MetalcraftCondition.instance), effectText)); }
public IcyBlast(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}"); // Tap X target creatures. this.getSpellAbility().addEffect(new TapTargetEffect("X target creatures")); // <i>Ferocious</i> — If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps. Effect effect = new ConditionalContinuousRuleModifyingEffect( new DontUntapInControllersNextUntapStepTargetEffect(), new LockedInCondition(FerociousCondition.instance)); effect.setText("<br/><i>Ferocious</i> — If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().setTargetAdjuster(IcyBlastAdjuster.instance); }
public WildSlash(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}"); // <i>Ferocious</i> If you control a creature with power 4 or greater, damage can't be prevented this turn. ContinuousRuleModifyingEffect effect = new DamageCantBePreventedEffect(Duration.EndOfTurn, "damage can't be prevented this turn", false, false); effect.setText("<i>Ferocious</i> — If you control a creature with power 4 or greater, damage can't be prevented this turn.<br>"); this.getSpellAbility().addEffect(new ConditionalContinuousRuleModifyingEffect(effect, new LockedInCondition(FerociousCondition.instance))); // Wild Slash deals 2 damage to any target. this.getSpellAbility().addEffect(new DamageTargetEffect(2)); this.getSpellAbility().addTarget(new TargetAnyTarget()); }
public BreakOfDay(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}"); // Creatures you control get +1/+1 until end of turn. this.getSpellAbility().addEffect(new BoostControlledEffect(1, 1, Duration.EndOfTurn)); // Fateful hour - If you have 5 or less life, those creatures also are indestructible this turn. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new GainAbilityAllEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent("creatures you control"), false), new LockedInCondition(FatefulHourCondition.instance), "If you have 5 or less life, those creatures also are indestructible this turn")); }
public ExplosiveGrowth(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Kicker {5} this.addAbility(new KickerAbility("{5}")); // Target creature gets +2/+2 until end of turn. If Explosive Growth was kicked, that creature gets +5/+5 until end of turn instead. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(5, 5, Duration.EndOfTurn), new BoostTargetEffect(2, 2, Duration.EndOfTurn), new LockedInCondition(KickedCondition.instance), "Target creature gets +2/+2 until end of turn. If this spell was kicked, that creature gets +5/+5 until end of turn instead.")); }
public RoarOfChallenge(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}"); // All creatures able to block target creature this turn do so. this.getSpellAbility().addEffect(new MustBeBlockedByAllTargetEffect(Duration.EndOfTurn)); // <i>Ferocious</i> — That creature gains indestructible until end of turn if you control a creature with power 4 or greater. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn), new LockedInCondition(FerociousCondition.instance), "<br><i>Ferocious</i> — That creature gains indestructible until end of turn if you control a creature with power 4 or greater.")); this.getSpellAbility().addTarget(new TargetCreaturePermanent()); }
public MarshCasualties(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{B}{B}"); this.color.setBlack(true); // Kicker {3} this.addAbility(new KickerAbility("{3}")); // Creatures target player controls get -1/-1 until end of turn. If Marsh Casualties was kicked, those creatures get -2/-2 until end of turn instead. this.getSpellAbility().addEffect(new ConditionalContinuousEffect( new MarshCasualtiesEffect(-2, -2), new MarshCasualtiesEffect(-1, -1), new LockedInCondition(KickedCondition.instance), ruleText)); this.getSpellAbility().addTarget(new TargetPlayer()); }
public VinesOfVastwood(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}"); // Kicker {G} (You may pay an additional {G} as you cast this spell.) this.addAbility(new KickerAbility("{G}")); // Target creature can't be the target of spells or abilities your opponents control this turn. this.getSpellAbility().addTarget(new TargetCreaturePermanent()); this.getSpellAbility().addEffect(new CantBeTargetedTargetEffect(filter, Duration.EndOfTurn, TargetController.OPPONENT)); // If Vines of Vastwood was kicked, that creature gets +4/+4 until end of turn. this.getSpellAbility().addEffect(new ConditionalContinuousEffect(new BoostTargetEffect(4, 4, Duration.EndOfTurn), new LockedInCondition(KickedCondition.instance), staticText)); }