diff --git a/Mage.Sets/src/mage/cards/g/GloryBearers.java b/Mage.Sets/src/mage/cards/g/GloryBearers.java index 7ba4d9d255..6416ae90c6 100644 --- a/Mage.Sets/src/mage/cards/g/GloryBearers.java +++ b/Mage.Sets/src/mage/cards/g/GloryBearers.java @@ -7,6 +7,8 @@ import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.AnotherPredicate; import java.util.UUID; @@ -15,6 +17,12 @@ import java.util.UUID; */ public final class GloryBearers extends CardImpl { + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another creature you control"); + + static { + filter.add(AnotherPredicate.instance); + } + public GloryBearers(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{W}"); @@ -27,7 +35,7 @@ public final class GloryBearers extends CardImpl { this.addAbility(new AttacksCreatureYouControlTriggeredAbility( new BoostTargetEffect(0, 1) .setText("it gets +0/+1 until end of turn"), - false, true + false, filter, true )); } diff --git a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java index 33605e48b0..5dc5cec55c 100644 --- a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java @@ -1,4 +1,3 @@ - package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; @@ -11,7 +10,6 @@ import mage.game.permanent.Permanent; import mage.target.targetpointer.FixedTarget; /** - * * @author noxx */ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityImpl { @@ -76,6 +74,17 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI @Override public String getRule() { - return "When" + (once ? "" : "ever") + " a" + (filter.getMessage().startsWith("a") ? "n " : " ") + filter.getMessage() + " attacks, " + super.getRule(); + String an; + String who = filter.getMessage(); + if (who.startsWith("another")) { + an = ""; + } else if (who.startsWith("a")) { + an = "an"; + } else { + an = "a"; + } + + return "When" + (once ? "" : "ever") + + " " + an + who + " attacks, " + super.getRule(); } }