[40K] Implemented Ghyrson Starn, Kelermorph

This commit is contained in:
Evan Kranzler 2022-10-05 19:48:52 -04:00
parent 7a5faa9061
commit c4a58aa650
2 changed files with 85 additions and 0 deletions

View file

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

View file

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