From b607944b113a7dc050c15b3dde296f228df3e948 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 29 Jan 2022 11:30:26 -0500 Subject: [PATCH] [NEO] Implemented Surgehacker Mech --- .../src/mage/cards/s/SurgehackerMech.java | 71 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 72 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SurgehackerMech.java diff --git a/Mage.Sets/src/mage/cards/s/SurgehackerMech.java b/Mage.Sets/src/mage/cards/s/SurgehackerMech.java new file mode 100644 index 0000000000..8587cb2736 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SurgehackerMech.java @@ -0,0 +1,71 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.abilities.keyword.CrewAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterCreatureOrPlaneswalkerPermanent; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SurgehackerMech extends CardImpl { + + private static final FilterPermanent filter + = new FilterCreatureOrPlaneswalkerPermanent("creature or planeswalker and opponent controls"); + private static final FilterPermanent filter2 + = new FilterControlledPermanent(SubType.VEHICLE); + + static { + filter.add(TargetController.OPPONENT.getControllerPredicate()); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter2, 2); + private static final Hint hint = new ValueHint( + "Vehicles you control", new PermanentsOnBattlefieldCount(filter2) + ); + + public SurgehackerMech(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}"); + + this.subtype.add(SubType.VEHICLE); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Menace + this.addAbility(new MenaceAbility()); + + // When Surgehacker Mech enters the battlefield, it deals damage equal to twice the number of Vehicles you control to target creature or planeswalker an opponent controls. + Ability ability = new EntersBattlefieldTriggeredAbility(new DamageTargetEffect(xValue)); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability.addHint(hint)); + + // Crew 4 + this.addAbility(new CrewAbility(4)); + } + + private SurgehackerMech(final SurgehackerMech card) { + super(card); + } + + @Override + public SurgehackerMech copy() { + return new SurgehackerMech(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index 217143c243..5ec4d5552f 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -49,6 +49,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { cards.add(new SetCardInfo("Plains", 293, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Satoru Umezawa", 234, Rarity.RARE, mage.cards.s.SatoruUmezawa.class)); cards.add(new SetCardInfo("Spirited Companion", 38, Rarity.COMMON, mage.cards.s.SpiritedCompanion.class)); + cards.add(new SetCardInfo("Surgehacker Mech", 260, Rarity.RARE, mage.cards.s.SurgehackerMech.class)); cards.add(new SetCardInfo("Swamp", 297, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("The Modern Age", 66, Rarity.COMMON, mage.cards.t.TheModernAge.class)); cards.add(new SetCardInfo("The Shattered States Era", 162, Rarity.COMMON, mage.cards.t.TheShatteredStatesEra.class));