From bab173e8672f46329ceb1f4df325fffbcd26b7df Mon Sep 17 00:00:00 2001 From: LoneFox Date: Tue, 20 Oct 2015 13:40:16 +0300 Subject: [PATCH] Fix Call to Serve: Add missing non-black filter (was coded but not applied) and combine effects to one ability. --- .../mage/sets/avacynrestored/CallToServe.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java b/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java index a045308010..72e5a85d72 100644 --- a/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java +++ b/Mage.Sets/src/mage/sets/avacynrestored/CallToServe.java @@ -28,11 +28,10 @@ package mage.sets.avacynrestored; import java.util.UUID; - -import mage.constants.*; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.Effect; import mage.abilities.effects.common.AttachEffect; import mage.abilities.effects.common.continuous.AddCardSubtypeAttachedEffect; import mage.abilities.effects.common.continuous.BoostEnchantedEffect; @@ -40,6 +39,12 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; import mage.abilities.keyword.EnchantAbility; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; +import mage.constants.AttachmentType; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; @@ -51,6 +56,7 @@ import mage.target.common.TargetCreaturePermanent; * @author Loki */ public class CallToServe extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack creature"); static { @@ -62,18 +68,22 @@ public class CallToServe extends CardImpl { this.expansionSetCode = "AVR"; this.subtype.add("Aura"); - // Enchant nonblack creature - TargetPermanent auraTarget = new TargetCreaturePermanent(); + TargetPermanent auraTarget = new TargetCreaturePermanent(filter); this.getSpellAbility().addTarget(auraTarget); this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); Ability ability = new EnchantAbility(auraTarget.getTargetName()); this.addAbility(ability); // Enchanted creature gets +1/+2, has flying, and is an Angel in addition to its other types. - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA))); - this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AddCardSubtypeAttachedEffect("Angel", Duration.WhileOnBattlefield, AttachmentType.AURA))); + ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(1, 2, Duration.WhileOnBattlefield)); + Effect effect = new GainAbilityAttachedEffect(FlyingAbility.getInstance(), AttachmentType.AURA); + effect.setText(", has flying"); + ability.addEffect(effect); + effect = new AddCardSubtypeAttachedEffect("Angel", Duration.WhileOnBattlefield, AttachmentType.AURA); + effect.setText(", and is an Angel in addition to its other types"); + ability.addEffect(effect); + this.addAbility(ability); } public CallToServe(final CallToServe card) {