From 5312a1ef87f9a6b93892a460db12fa6b5a6cdaab Mon Sep 17 00:00:00 2001 From: AhmadYProjects <104733598+AhmadYProjects@users.noreply.github.com> Date: Sat, 28 Jan 2023 18:13:58 -0500 Subject: [PATCH] [ONE]Implementing Sword of Forge and Frontier (#9899) * Implementing Sword of Forge and Frontier * Added code for testing of Noxious Assault --------- Co-authored-by: AhmadYProjects Co-authored-by: Evan Kranzler --- .../mage/cards/s/SwordOfForgeAndFrontier.java | 54 +++++++++++++++++++ .../src/mage/sets/PhyrexiaAllWillBeOne.java | 1 + 2 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SwordOfForgeAndFrontier.java diff --git a/Mage.Sets/src/mage/cards/s/SwordOfForgeAndFrontier.java b/Mage.Sets/src/mage/cards/s/SwordOfForgeAndFrontier.java new file mode 100644 index 00000000000..d7f5950d3de --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SwordOfForgeAndFrontier.java @@ -0,0 +1,54 @@ +package mage.cards.s; + +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToAPlayerAttachedTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.ExileTopXMayPlayUntilEndOfTurnEffect; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.effects.common.continuous.PlayAdditionalLandsControllerEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.ProtectionAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; + +import java.util.UUID; + +/** + * + * @author AhmadYProjects + */ +public final class SwordOfForgeAndFrontier extends CardImpl { + + public SwordOfForgeAndFrontier(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +2/+2 and has protection from red and from green. + Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(2,2)); + ability.addEffect(new GainAbilityAttachedEffect( + ProtectionAbility.from(ObjectColor.GREEN,ObjectColor.RED), AttachmentType.EQUIPMENT).setText( + "and has protection from red and from green")); + this.addAbility(ability); + // Whenever equipped creature deals combat damage to a player, exile the top two cards of your library. You may play those cards this turn. You may play an additional land this turn. + Ability ability2 = new DealsDamageToAPlayerAttachedTriggeredAbility(new ExileTopXMayPlayUntilEndOfTurnEffect(2),"equipped creature", false); + ability2.addEffect(new PlayAdditionalLandsControllerEffect(1, Duration.EndOfTurn)); + this.addAbility(ability2); + + // Equip {2} + this.addAbility(new EquipAbility(Outcome.Benefit,new GenericManaCost(2), false)); + } + + private SwordOfForgeAndFrontier(final SwordOfForgeAndFrontier card) { + super(card); + } + + @Override + public SwordOfForgeAndFrontier copy() { + return new SwordOfForgeAndFrontier(this); + } +} diff --git a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java index 3e51dc155d2..69f40ad9061 100644 --- a/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java +++ b/Mage.Sets/src/mage/sets/PhyrexiaAllWillBeOne.java @@ -162,6 +162,7 @@ public final class PhyrexiaAllWillBeOne extends ExpansionSet { cards.add(new SetCardInfo("Surgical Skullbomb", 243, Rarity.COMMON, mage.cards.s.SurgicalSkullbomb.class)); cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Swooping Lookout", 35, Rarity.UNCOMMON, mage.cards.s.SwoopingLookout.class)); + cards.add(new SetCardInfo("Sword of Forge and Frontier", 244, Rarity.MYTHIC, mage.cards.s.SwordOfForgeAndFrontier.class)); cards.add(new SetCardInfo("Sylvok Battle-Chair", 184, Rarity.UNCOMMON, mage.cards.s.SylvokBattleChair.class)); cards.add(new SetCardInfo("Tablet of Compleation", 245, Rarity.RARE, mage.cards.t.TabletOfCompleation.class)); cards.add(new SetCardInfo("Tainted Observer", 217, Rarity.UNCOMMON, mage.cards.t.TaintedObserver.class));