From 9b1a75323e74f9ae0233721a38afc2d33c65b772 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Fri, 31 Mar 2023 08:10:47 -0400 Subject: [PATCH] [MOM] Implement Gnottvold Hermit / Chrome Host Hulk --- .../src/mage/cards/c/ChromeHostHulk.java | 57 +++++++++++++++++++ .../src/mage/cards/g/GnottvoldHermit.java | 40 +++++++++++++ .../src/mage/cards/h/HarriedArtisan.java | 4 +- .../src/mage/sets/MarchOfTheMachine.java | 2 + 4 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/c/ChromeHostHulk.java create mode 100644 Mage.Sets/src/mage/cards/g/GnottvoldHermit.java diff --git a/Mage.Sets/src/mage/cards/c/ChromeHostHulk.java b/Mage.Sets/src/mage/cards/c/ChromeHostHulk.java new file mode 100644 index 0000000000..96aa262eeb --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChromeHostHulk.java @@ -0,0 +1,57 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.effects.common.continuous.SetBasePowerToughnessTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ChromeHostHulk extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("other target creature"); + + static { + filter.add(AnotherPredicate.instance); + } + + public ChromeHostHulk(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.TROLL); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + this.color.setBlue(true); + this.color.setGreen(true); + this.nightCard = true; + + // Whenever Chrome Host Hulk attacks, up to one other target creature has base power and toughness 5/5 until end of turn. + Ability ability = new AttacksTriggeredAbility( + new SetBasePowerToughnessTargetEffect(5, 5, Duration.EndOfTurn) + ); + ability.addTarget(new TargetPermanent(0, 1, filter)); + this.addAbility(ability); + } + + private ChromeHostHulk(final ChromeHostHulk card) { + super(card); + } + + @Override + public ChromeHostHulk copy() { + return new ChromeHostHulk(this); + } +} diff --git a/Mage.Sets/src/mage/cards/g/GnottvoldHermit.java b/Mage.Sets/src/mage/cards/g/GnottvoldHermit.java new file mode 100644 index 0000000000..69bf0c1e04 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GnottvoldHermit.java @@ -0,0 +1,40 @@ +package mage.cards.g; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.abilities.keyword.TransformAbility; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; + +/** + * + * @author TheElk801 + */ +public final class GnottvoldHermit extends CardImpl { + + public GnottvoldHermit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); + + this.subtype.add(SubType.TROLL); + this.power = new MageInt(4); + this.toughness = new MageInt(4);this.secondSideCardClazz=mage.cards.c.ChromeHostHulk.class; + + // {5}{U/P}: Transform Gnottvold Hermit. Activate only as a sorcery. + this.addAbility(new TransformAbility()); + this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{5}{U/P}"))); + } + + private GnottvoldHermit(final GnottvoldHermit card) { + super(card); + } + + @Override + public GnottvoldHermit copy() { + return new GnottvoldHermit(this); + } +} diff --git a/Mage.Sets/src/mage/cards/h/HarriedArtisan.java b/Mage.Sets/src/mage/cards/h/HarriedArtisan.java index bdba3e4b9a..f9ca5ca64a 100644 --- a/Mage.Sets/src/mage/cards/h/HarriedArtisan.java +++ b/Mage.Sets/src/mage/cards/h/HarriedArtisan.java @@ -1,7 +1,7 @@ package mage.cards.h; import mage.MageInt; -import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.ActivateAsSorceryActivatedAbility; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.TransformSourceEffect; import mage.abilities.keyword.HasteAbility; @@ -32,7 +32,7 @@ public final class HarriedArtisan extends CardImpl { // {3}{W/P}: Transform Harried Artisan. Activate only as a sorcery. this.addAbility(new TransformAbility()); - this.addAbility(new SimpleActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{3}{W/P}"))); + this.addAbility(new ActivateAsSorceryActivatedAbility(new TransformSourceEffect(), new ManaCostsImpl<>("{3}{W/P}"))); } private HarriedArtisan(final HarriedArtisan card) { diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index a5608a3c01..42c594c7b3 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -25,6 +25,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Blossoming Sands", 268, Rarity.COMMON, mage.cards.b.BlossomingSands.class)); cards.add(new SetCardInfo("Boon-Bringer Valkyrie", 9, Rarity.RARE, mage.cards.b.BoonBringerValkyrie.class)); cards.add(new SetCardInfo("Chandra, Hope's Beacon", 134, Rarity.MYTHIC, mage.cards.c.ChandraHopesBeacon.class)); + cards.add(new SetCardInfo("Chrome Host Hulk", 188, Rarity.UNCOMMON, mage.cards.c.ChromeHostHulk.class)); cards.add(new SetCardInfo("Cragsmasher Yeti", 333, Rarity.COMMON, mage.cards.c.CragsmasherYeti.class)); cards.add(new SetCardInfo("Deadly Derision", 99, Rarity.COMMON, mage.cards.d.DeadlyDerision.class)); cards.add(new SetCardInfo("Dismal Backwater", 269, Rarity.COMMON, mage.cards.d.DismalBackwater.class)); @@ -32,6 +33,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Faerie Mastermind", 58, Rarity.RARE, mage.cards.f.FaerieMastermind.class)); cards.add(new SetCardInfo("Fairgrounds Trumpeter", 335, Rarity.COMMON, mage.cards.f.FairgroundsTrumpeter.class)); cards.add(new SetCardInfo("Forest", 281, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Gnottvold Hermit", 188, Rarity.UNCOMMON, mage.cards.g.GnottvoldHermit.class)); cards.add(new SetCardInfo("Harried Artisan", 143, Rarity.UNCOMMON, mage.cards.h.HarriedArtisan.class)); cards.add(new SetCardInfo("Heliod, the Radiant Dawn", 17, Rarity.RARE, mage.cards.h.HeliodTheRadiantDawn.class)); cards.add(new SetCardInfo("Heliod, the Warped Eclipse", 17, Rarity.RARE, mage.cards.h.HeliodTheWarpedEclipse.class));