public BoostAllEffect(DynamicValue power, DynamicValue toughness, Duration duration, FilterCreaturePermanent filter, boolean excludeSource, String rule, boolean lockedInPT) { super(duration, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, isCanKill(toughness) ? Outcome.UnboostCreature : Outcome.BoostCreature); this.power = power; this.toughness = toughness; this.filter = filter; this.excludeSource = excludeSource; this.lockedInPT = lockedInPT; if (rule == null || rule.isEmpty()) { setText(); } else { this.staticText = rule; } }
public WindShear(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{G}"); // Attacking creatures with flying get -2/-2 and lose flying until end of turn. this.getSpellAbility().addEffect(new BoostAllEffect(-2, -2, Duration.EndOfTurn, filter, false).setText("Attacking creatures with flying get -2/-2")); this.getSpellAbility().addEffect(new LoseAbilityAllEffect(FlyingAbility.getInstance(), Duration.EndOfTurn, filter).setText("and lose flying until end of turn")); }
public PendelhavenElder(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); this.subtype.add(SubType.ELF); this.subtype.add(SubType.SHAMAN); this.power = new MageInt(1); this.toughness = new MageInt(1); // {tap}: Each 1/1 creature you control gets +1/+2 until end of turn. this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 2, Duration.EndOfTurn, filter, false) .setText("Each 1/1 creature you control gets +1/+2 until end of turn."), new TapSourceCost() )); }
public GempalmAvenger(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); this.subtype.add(SubType.HUMAN); this.subtype.add(SubType.SOLDIER); this.power = new MageInt(3); this.toughness = new MageInt(5); // Cycling {2}{W} this.addAbility(new CyclingAbility(new ManaCostsImpl("{2}{W}"))); // When you cycle Gempalm Avenger, Soldier creatures get +1/+1 and gain first strike until end of turn. Ability ability = new CycleTriggeredAbility( new BoostAllEffect(1, 1, Duration.EndOfTurn, filter, false).setText("Soldier creatures get +1/+1") ); Effect effect = new GainAbilityAllEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn, filter); effect.setText("and gain first strike until end of turn"); ability.addEffect(effect); this.addAbility(ability); }