From c11a6e5b3228618168084ef698da3b84bad7f112 Mon Sep 17 00:00:00 2001 From: Jason Wall Date: Sun, 19 Apr 2015 14:13:52 -0600 Subject: [PATCH] implement the stat boost ability --- .../mage/sets/mirrodin/AuriokSteelshaper.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/mirrodin/AuriokSteelshaper.java b/Mage.Sets/src/mage/sets/mirrodin/AuriokSteelshaper.java index 9b4a1ca589..50dbd31252 100644 --- a/Mage.Sets/src/mage/sets/mirrodin/AuriokSteelshaper.java +++ b/Mage.Sets/src/mage/sets/mirrodin/AuriokSteelshaper.java @@ -31,7 +31,10 @@ import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.EquippedCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; import mage.abilities.effects.ContinuousEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; import mage.abilities.effects.common.cost.CostModificationEffectImpl; import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect; @@ -42,6 +45,9 @@ import mage.constants.*; import mage.filter.FilterAbility; import mage.filter.common.FilterArtifactPermanent; import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; import mage.filter.predicate.permanent.ControllerPredicate; import mage.game.Game; import mage.game.permanent.Permanent; @@ -53,7 +59,14 @@ import mage.util.CardUtil; */ public class AuriokSteelshaper extends CardImpl { + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + static { + filter.add(Predicates.or( + new SubtypePredicate("Soldier"), + new SubtypePredicate("Knight") + )); + } public AuriokSteelshaper(UUID ownerId) { super(ownerId, 4, "Auriok Steelshaper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}"); @@ -67,7 +80,11 @@ public class AuriokSteelshaper extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AuriokSteelshaperCostReductionEffect())); // As long as Auriok Steelshaper is equipped, each creature you control that's a Soldier or a Knight gets +1/+1. - + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect( + new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false), + EquippedCondition.getInstance(), + "As long as {this} is equipped, each creature you control that's a Soldier or a Knight gets +1/+1" + ))); } public AuriokSteelshaper(final AuriokSteelshaper card) {