public SerpentineSpike(UUID ownerId) { super( ownerId, 133, "Serpentine Spike", Rarity.RARE, new CardType[] {CardType.SORCERY}, "{5}{R}{R}"); this.expansionSetCode = "BFZ"; // Devoid Ability ability = new DevoidAbility(this.color); ability.setRuleAtTheTop(true); this.addAbility(ability); // Serpentine Spike deals 2 damage to target creature, 3 damage to another target creature, and // 4 damage to a third target creature. If a creature dealt damage this way would die this turn, // exile it instead. this.getSpellAbility().addEffect(new SerpentineSpikeEffect()); TargetCreaturePermanent target = new TargetCreaturePermanent(new FilterCreaturePermanent("creature (2 damage)")); target.setTargetTag(1); this.getSpellAbility().addTarget(target); FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature (3 damage)"); filter.add(new AnotherTargetPredicate(2)); target = new TargetCreaturePermanent(filter); target.setTargetTag(2); this.getSpellAbility().addTarget(target); filter = new FilterCreaturePermanent("another target creature (4 damage)"); filter.add(new AnotherTargetPredicate(3)); target = new TargetCreaturePermanent(filter); target.setTargetTag(3); this.getSpellAbility().addTarget(target); Effect effect = new DealtDamageToCreatureBySourceDies(this, Duration.EndOfTurn); effect.setText("If a creature dealt damage this way would die this turn, exile it instead"); this.getSpellAbility().addEffect(effect); this.getSpellAbility().addWatcher(new DamagedByWatcher()); }
public FateTransfer(UUID ownerId) { super( ownerId, 161, "Fate Transfer", Rarity.COMMON, new CardType[] {CardType.INSTANT}, "{1}{U/B}"); this.expansionSetCode = "SHM"; // Move all counters from target creature onto another target creature. this.getSpellAbility().addEffect(new FateTransferEffect()); TargetCreaturePermanent fromTarget = new TargetCreaturePermanent(filter); fromTarget.setTargetTag(1); this.getSpellAbility().addTarget(fromTarget); TargetCreaturePermanent toTarget = new TargetCreaturePermanent(filter2); filter2.add(new AnotherTargetPredicate(2)); toTarget.setTargetTag(2); this.getSpellAbility().addTarget(toTarget); }