diff --git a/Mage.Sets/src/mage/cards/g/GeneralMarhaultElsdragon.java b/Mage.Sets/src/mage/cards/g/GeneralMarhaultElsdragon.java new file mode 100644 index 0000000000..7724d21d27 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GeneralMarhaultElsdragon.java @@ -0,0 +1,49 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.common.BecomesBlockedAllTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.BlockingCreatureCount; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author awjackson + */ +public final class GeneralMarhaultElsdragon extends CardImpl { + + private static final DynamicValue xValue = new MultipliedValue(BlockingCreatureCount.TARGET, 3); + + public GeneralMarhaultElsdragon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}"); + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ELF, SubType.WARRIOR); + + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Whenever a creature you control becomes blocked, it gets +3/+3 until end of turn for each creature blocking it. + this.addAbility(new BecomesBlockedAllTriggeredAbility( + new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), + false, StaticFilters.FILTER_CONTROLLED_A_CREATURE, true + )); + } + + private GeneralMarhaultElsdragon(final GeneralMarhaultElsdragon card) { + super(card); + } + + @Override + public GeneralMarhaultElsdragon copy() { + return new GeneralMarhaultElsdragon(this); + } +} diff --git a/Mage.Sets/src/mage/cards/r/RabidElephant.java b/Mage.Sets/src/mage/cards/r/RabidElephant.java index d3f3d4dba2..00317467c2 100644 --- a/Mage.Sets/src/mage/cards/r/RabidElephant.java +++ b/Mage.Sets/src/mage/cards/r/RabidElephant.java @@ -29,7 +29,7 @@ public final class RabidElephant extends CardImpl { this.toughness = new MageInt(4); // Whenever Rabid Elephant becomes blocked, it gets +2/+2 until end of turn for each creature blocking it. - this.addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostSourceEffect(xValue, xValue, Duration.EndOfTurn, true), false)); + this.addAbility(new BecomesBlockedSourceTriggeredAbility(new BoostSourceEffect(xValue, xValue, Duration.EndOfTurn, true, "it"), false)); } private RabidElephant(final RabidElephant card) { diff --git a/Mage.Sets/src/mage/cards/s/SpinedSliver.java b/Mage.Sets/src/mage/cards/s/SpinedSliver.java index e7e08b6dd0..4caebf47dd 100644 --- a/Mage.Sets/src/mage/cards/s/SpinedSliver.java +++ b/Mage.Sets/src/mage/cards/s/SpinedSliver.java @@ -1,7 +1,6 @@ package mage.cards.s; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.BecomesBlockedAllTriggeredAbility; import mage.abilities.dynamicvalue.common.BlockingCreatureCount; import mage.abilities.effects.common.continuous.BoostTargetEffect; diff --git a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java index ea23cd5b80..9754fca183 100644 --- a/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java +++ b/Mage.Sets/src/mage/sets/DominariaUnitedCommander.java @@ -73,6 +73,7 @@ public final class DominariaUnitedCommander extends ExpansionSet { cards.add(new SetCardInfo("Fusion Elemental", 150, Rarity.UNCOMMON, mage.cards.f.FusionElemental.class)); cards.add(new SetCardInfo("Garna, the Bloodflame", 151, Rarity.UNCOMMON, mage.cards.g.GarnaTheBloodflame.class)); cards.add(new SetCardInfo("Geier Reach Sanitarium", 213, Rarity.RARE, mage.cards.g.GeierReachSanitarium.class)); + cards.add(new SetCardInfo("General Marhault Elsdragon", 31, Rarity.UNCOMMON, mage.cards.g.GeneralMarhaultElsdragon.class)); cards.add(new SetCardInfo("Generous Gift", 100, Rarity.UNCOMMON, mage.cards.g.GenerousGift.class)); cards.add(new SetCardInfo("Glint-Eye Nephilim", 152, Rarity.RARE, mage.cards.g.GlintEyeNephilim.class)); cards.add(new SetCardInfo("Grasslands", 214, Rarity.UNCOMMON, mage.cards.g.Grasslands.class)); diff --git a/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java index 6618672c25..7e269066f8 100644 --- a/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/BecomesBlockedAllTriggeredAbility.java @@ -3,8 +3,8 @@ package mage.abilities.common; import mage.abilities.TriggeredAbilityImpl; import mage.abilities.effects.Effect; import mage.constants.Zone; +import mage.filter.FilterPermanent; import mage.filter.StaticFilters; -import mage.filter.common.FilterCreaturePermanent; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; @@ -15,14 +15,14 @@ import mage.target.targetpointer.FixedTarget; */ public class BecomesBlockedAllTriggeredAbility extends TriggeredAbilityImpl { - private final FilterCreaturePermanent filter; + private final FilterPermanent filter; private final boolean setTargetPointer; public BecomesBlockedAllTriggeredAbility(Effect effect, boolean optional) { this(effect, optional, StaticFilters.FILTER_PERMANENT_A_CREATURE, false); } - public BecomesBlockedAllTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter, boolean setTargetPointer) { + public BecomesBlockedAllTriggeredAbility(Effect effect, boolean optional, FilterPermanent filter, boolean setTargetPointer) { super(Zone.BATTLEFIELD, effect, optional); this.filter = filter; this.setTargetPointer = setTargetPointer;