From 2ce4a7ae3b802e9b2709eb2b1f4b546b80845bd3 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Mon, 3 Apr 2023 20:22:29 -0400 Subject: [PATCH] [MOM] Implement Chrome Host Seedshark --- .../src/mage/cards/c/ChromeHostSeedshark.java | 73 +++++++++++++++++++ .../src/mage/sets/MarchOfTheMachine.java | 1 + 2 files changed, 74 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ChromeHostSeedshark.java diff --git a/Mage.Sets/src/mage/cards/c/ChromeHostSeedshark.java b/Mage.Sets/src/mage/cards/c/ChromeHostSeedshark.java new file mode 100644 index 00000000000..2333be6aaa4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChromeHostSeedshark.java @@ -0,0 +1,73 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SpellCastControllerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.keyword.IncubateEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.game.stack.Spell; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ChromeHostSeedshark extends CardImpl { + + public ChromeHostSeedshark(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); + + this.subtype.add(SubType.PHYREXIAN); + this.subtype.add(SubType.SHARK); + this.power = new MageInt(2); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever you cast a noncreature spell, incubate X, where X is that spell's mana value. + this.addAbility(new SpellCastControllerTriggeredAbility( + new ChromeHostSeedsharkEffect(), StaticFilters.FILTER_SPELL_A_NON_CREATURE, false + )); + } + + private ChromeHostSeedshark(final ChromeHostSeedshark card) { + super(card); + } + + @Override + public ChromeHostSeedshark copy() { + return new ChromeHostSeedshark(this); + } +} + +class ChromeHostSeedsharkEffect extends OneShotEffect { + + ChromeHostSeedsharkEffect() { + super(Outcome.Benefit); + staticText = "incubate X, where X is that spell's mana value"; + } + + private ChromeHostSeedsharkEffect(final ChromeHostSeedsharkEffect effect) { + super(effect); + } + + @Override + public ChromeHostSeedsharkEffect copy() { + return new ChromeHostSeedsharkEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = (Spell) getValue("spellCast"); + return spell != null && new IncubateEffect(spell.getManaValue()).apply(game, source); + } +} diff --git a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java index c86afbf358a..e4660b89879 100644 --- a/Mage.Sets/src/mage/sets/MarchOfTheMachine.java +++ b/Mage.Sets/src/mage/sets/MarchOfTheMachine.java @@ -37,6 +37,7 @@ public final class MarchOfTheMachine extends ExpansionSet { cards.add(new SetCardInfo("Chandra, Hope's Beacon", 134, Rarity.MYTHIC, mage.cards.c.ChandraHopesBeacon.class)); cards.add(new SetCardInfo("Change the Equation", 50, Rarity.UNCOMMON, mage.cards.c.ChangeTheEquation.class)); cards.add(new SetCardInfo("Chrome Host Hulk", 188, Rarity.UNCOMMON, mage.cards.c.ChromeHostHulk.class)); + cards.add(new SetCardInfo("Chrome Host Seedshark", 51, Rarity.RARE, mage.cards.c.ChromeHostSeedshark.class)); cards.add(new SetCardInfo("City on Fire", 135, Rarity.RARE, mage.cards.c.CityOnFire.class)); cards.add(new SetCardInfo("Compleated Conjurer", 49, Rarity.UNCOMMON, mage.cards.c.CompleatedConjurer.class)); cards.add(new SetCardInfo("Copper Host Crusher", 181, Rarity.UNCOMMON, mage.cards.c.CopperHostCrusher.class));