From ee479d24c9a1f5b3b21561ba630789917a9a5b77 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sun, 9 Jun 2024 11:47:49 -0400 Subject: [PATCH] [ACR] Implement The Spear of Leonidas --- .../src/mage/cards/t/TheSpearOfLeonidas.java | 59 +++++++++++++++++++ Mage.Sets/src/mage/sets/AssassinsCreed.java | 1 + .../game/permanent/token/PhobosToken.java | 31 ++++++++++ 3 files changed, 91 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TheSpearOfLeonidas.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/PhobosToken.java diff --git a/Mage.Sets/src/mage/cards/t/TheSpearOfLeonidas.java b/Mage.Sets/src/mage/cards/t/TheSpearOfLeonidas.java new file mode 100644 index 00000000000..235cea75254 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheSpearOfLeonidas.java @@ -0,0 +1,59 @@ +package mage.cards.t; + +import mage.abilities.Ability; +import mage.abilities.Mode; +import mage.abilities.common.AttacksAttachedTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.discard.DiscardControllerEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.permanent.token.PhobosToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TheSpearOfLeonidas extends CardImpl { + + public TheSpearOfLeonidas(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{R}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.EQUIPMENT); + + // Whenever equipped creature attacks, choose one -- + // * Bull Rush -- It gains double strike until end of turn. + Ability ability = new AttacksAttachedTriggeredAbility(new GainAbilityAttachedEffect( + DoubleStrikeAbility.getInstance(), AttachmentType.EQUIPMENT, + Duration.EndOfTurn, "it gains double strike until end of turn" + )); + ability.withFirstModeFlavorWord("Bull Rush"); + + // * Summon -- Create Phobos, a legendary 3/2 red Horse creature token. + ability.addMode(new Mode(new CreateTokenEffect(new PhobosToken())).withFlavorWord("Summon")); + + // * Revelation -- Discard two cards, then draw two cards. + ability.addMode(new Mode(new DiscardControllerEffect(2)) + .addEffect(new DrawCardSourceControllerEffect(2).concatBy(", then")) + .withFlavorWord("Revelation")); + this.addAbility(ability); + + // Equip {2} + this.addAbility(new EquipAbility(2)); + } + + private TheSpearOfLeonidas(final TheSpearOfLeonidas card) { + super(card); + } + + @Override + public TheSpearOfLeonidas copy() { + return new TheSpearOfLeonidas(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AssassinsCreed.java b/Mage.Sets/src/mage/sets/AssassinsCreed.java index f93380c66c8..09ef1be98b3 100644 --- a/Mage.Sets/src/mage/sets/AssassinsCreed.java +++ b/Mage.Sets/src/mage/sets/AssassinsCreed.java @@ -29,5 +29,6 @@ public final class AssassinsCreed extends ExpansionSet { cards.add(new SetCardInfo("Haystack", 175, Rarity.UNCOMMON, mage.cards.h.Haystack.class)); cards.add(new SetCardInfo("Sword of Feast and Famine", 99, Rarity.MYTHIC, mage.cards.s.SwordOfFeastAndFamine.class)); cards.add(new SetCardInfo("Temporal Trespass", 86, Rarity.MYTHIC, mage.cards.t.TemporalTrespass.class)); + cards.add(new SetCardInfo("The Spear of Leonidas", 165, Rarity.RARE, mage.cards.t.TheSpearOfLeonidas.class)); } } diff --git a/Mage/src/main/java/mage/game/permanent/token/PhobosToken.java b/Mage/src/main/java/mage/game/permanent/token/PhobosToken.java new file mode 100644 index 00000000000..726aedf3e30 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/PhobosToken.java @@ -0,0 +1,31 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; + +/** + * @author TheElk801 + */ +public final class PhobosToken extends TokenImpl { + + public PhobosToken() { + super("Phobos", "Phobos, a legendary 3/2 red Horse creature token"); + this.supertype.add(SuperType.LEGENDARY); + this.cardType.add(CardType.CREATURE); + this.subtype.add(SubType.HORSE); + this.color.setRed(true); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + } + + private PhobosToken(final PhobosToken token) { + super(token); + } + + @Override + public PhobosToken copy() { + return new PhobosToken(this); + } +}