[DMC] Implemented General Marhault Elsdragon

This commit is contained in:
Alex W. Jackson 2022-08-30 12:21:27 -04:00
parent e0ade383f2
commit c26c2f3785
5 changed files with 54 additions and 5 deletions

View file

@ -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);
}
}

View file

@ -29,7 +29,7 @@ public final class RabidElephant extends CardImpl {
this.toughness = new MageInt(4); this.toughness = new MageInt(4);
// Whenever Rabid Elephant becomes blocked, it gets +2/+2 until end of turn for each creature blocking it. // 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) { private RabidElephant(final RabidElephant card) {

View file

@ -1,7 +1,6 @@
package mage.cards.s; package mage.cards.s;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BecomesBlockedAllTriggeredAbility; import mage.abilities.common.BecomesBlockedAllTriggeredAbility;
import mage.abilities.dynamicvalue.common.BlockingCreatureCount; import mage.abilities.dynamicvalue.common.BlockingCreatureCount;
import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.effects.common.continuous.BoostTargetEffect;

View file

@ -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("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("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("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("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("Glint-Eye Nephilim", 152, Rarity.RARE, mage.cards.g.GlintEyeNephilim.class));
cards.add(new SetCardInfo("Grasslands", 214, Rarity.UNCOMMON, mage.cards.g.Grasslands.class)); cards.add(new SetCardInfo("Grasslands", 214, Rarity.UNCOMMON, mage.cards.g.Grasslands.class));

View file

@ -3,8 +3,8 @@ package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl; import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.constants.Zone; import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters; import mage.filter.StaticFilters;
import mage.filter.common.FilterCreaturePermanent;
import mage.game.Game; import mage.game.Game;
import mage.game.events.GameEvent; import mage.game.events.GameEvent;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
@ -15,14 +15,14 @@ import mage.target.targetpointer.FixedTarget;
*/ */
public class BecomesBlockedAllTriggeredAbility extends TriggeredAbilityImpl { public class BecomesBlockedAllTriggeredAbility extends TriggeredAbilityImpl {
private final FilterCreaturePermanent filter; private final FilterPermanent filter;
private final boolean setTargetPointer; private final boolean setTargetPointer;
public BecomesBlockedAllTriggeredAbility(Effect effect, boolean optional) { public BecomesBlockedAllTriggeredAbility(Effect effect, boolean optional) {
this(effect, optional, StaticFilters.FILTER_PERMANENT_A_CREATURE, false); 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); super(Zone.BATTLEFIELD, effect, optional);
this.filter = filter; this.filter = filter;
this.setTargetPointer = setTargetPointer; this.setTargetPointer = setTargetPointer;