[MOM] Implement Chrome Host Seedshark

This commit is contained in:
theelk801 2023-04-03 20:22:29 -04:00
parent c087e77776
commit 2ce4a7ae3b
2 changed files with 74 additions and 0 deletions

View file

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

View file

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