From c4a58aa650accfd6b5e0c0ed9611b98517d016b1 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 5 Oct 2022 19:48:52 -0400 Subject: [PATCH] [40K] Implemented Ghyrson Starn, Kelermorph --- .../mage/cards/g/GhyrsonStarnKelermorph.java | 84 +++++++++++++++++++ Mage.Sets/src/mage/sets/Warhammer40000.java | 1 + 2 files changed, 85 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GhyrsonStarnKelermorph.java diff --git a/Mage.Sets/src/mage/cards/g/GhyrsonStarnKelermorph.java b/Mage.Sets/src/mage/cards/g/GhyrsonStarnKelermorph.java new file mode 100644 index 0000000000..ec133a6022 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GhyrsonStarnKelermorph.java @@ -0,0 +1,84 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.keyword.WardAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.target.targetpointer.FixedTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GhyrsonStarnKelermorph extends CardImpl { + + public GhyrsonStarnKelermorph(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.TYRANID); + this.subtype.add(SubType.HUMAN); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // Ward {2} + this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}"))); + + // Three Autostubs -- Whenever another source you control deals exactly 1 damage to a permanent or player, Ghyrson Starn, Kelermorph deals 2 damage to that permanent or player. + this.addAbility(new GhyrsonStarnKelermorphTriggeredAbility()); + } + + private GhyrsonStarnKelermorph(final GhyrsonStarnKelermorph card) { + super(card); + } + + @Override + public GhyrsonStarnKelermorph copy() { + return new GhyrsonStarnKelermorph(this); + } +} + +class GhyrsonStarnKelermorphTriggeredAbility extends TriggeredAbilityImpl { + + GhyrsonStarnKelermorphTriggeredAbility() { + super(Zone.BATTLEFIELD, new DamageTargetEffect(2).setText("{this} deals 2 damage to that permanent or player")); + this.withFlavorWord("Three Autostubs"); + this.setTriggerPhrase("Whenever another source you control deals exactly 1 damage to a permanent or player, "); + } + + private GhyrsonStarnKelermorphTriggeredAbility(final GhyrsonStarnKelermorphTriggeredAbility ability) { + super(ability); + } + + @Override + public GhyrsonStarnKelermorphTriggeredAbility copy() { + return new GhyrsonStarnKelermorphTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PERMANENT + || event.getType() == GameEvent.EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getAmount() == 1 + && isControlledBy(game.getControllerId(event.getSourceId())) + && event.getSourceId().equals(getSourceId())) { + this.getEffects().setTargetPointer(new FixedTarget(event.getTargetId(), game)); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index 771bfe86ba..c19ee7bace 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -116,6 +116,7 @@ public final class Warhammer40000 extends ExpansionSet { cards.add(new SetCardInfo("Game Trail", 282, Rarity.RARE, mage.cards.g.GameTrail.class)); cards.add(new SetCardInfo("Gargoyle Flock", 123, Rarity.RARE, mage.cards.g.GargoyleFlock.class)); cards.add(new SetCardInfo("Ghost Ark", 156, Rarity.RARE, mage.cards.g.GhostArk.class)); + cards.add(new SetCardInfo("Ghyrson Starn, Kelermorph", 124, Rarity.RARE, mage.cards.g.GhyrsonStarnKelermorph.class)); cards.add(new SetCardInfo("Gilded Lotus", 239, Rarity.RARE, mage.cards.g.GildedLotus.class)); cards.add(new SetCardInfo("Go for the Throat", 201, Rarity.COMMON, mage.cards.g.GoForTheThroat.class)); cards.add(new SetCardInfo("Goliath Truck", 158, Rarity.UNCOMMON, mage.cards.g.GoliathTruck.class));