From 7ff6fd98f38ce2e320eaa51b4c0c95e405790c17 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 9 Apr 2022 09:16:05 -0400 Subject: [PATCH] [SNC] Implemented Mage's Attendant --- .../src/mage/cards/m/MagesAttendant.java | 39 +++++++++++++++++ .../src/mage/sets/StreetsOfNewCapenna.java | 1 + .../permanent/token/MagesAttendantToken.java | 42 +++++++++++++++++++ .../game/permanent/token/WizardToken.java | 9 ++-- Utils/mtg-cards-data.txt | 1 + 5 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/m/MagesAttendant.java create mode 100644 Mage/src/main/java/mage/game/permanent/token/MagesAttendantToken.java diff --git a/Mage.Sets/src/mage/cards/m/MagesAttendant.java b/Mage.Sets/src/mage/cards/m/MagesAttendant.java new file mode 100644 index 0000000000..d2a65389b5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MagesAttendant.java @@ -0,0 +1,39 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.permanent.token.MagesAttendantToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MagesAttendant extends CardImpl { + + public MagesAttendant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}"); + + this.subtype.add(SubType.CAT); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(3); + this.toughness = new MageInt(2); + + // When Mage's Attendant enters the battlefield, create a 1/1 blue Wizard creature token with "{1}, Sacrifice this creature: Counter target noncreature spell unless its controller pays {1}." + this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new MagesAttendantToken()))); + } + + private MagesAttendant(final MagesAttendant card) { + super(card); + } + + @Override + public MagesAttendant copy() { + return new MagesAttendant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index 8b74959bb2..da78f19da3 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -56,6 +56,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Maestros Diabolist", 200, Rarity.RARE, mage.cards.m.MaestrosDiabolist.class)); cards.add(new SetCardInfo("Maestros Initiate", 86, Rarity.COMMON, mage.cards.m.MaestrosInitiate.class)); cards.add(new SetCardInfo("Maestros Theater", 251, Rarity.COMMON, mage.cards.m.MaestrosTheater.class)); + cards.add(new SetCardInfo("Mage's Attendant", 21, Rarity.UNCOMMON, mage.cards.m.MagesAttendant.class)); cards.add(new SetCardInfo("Make Disappear", 49, Rarity.COMMON, mage.cards.m.MakeDisappear.class)); cards.add(new SetCardInfo("Mountain", 268, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Murder", 88, Rarity.COMMON, mage.cards.m.Murder.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/MagesAttendantToken.java b/Mage/src/main/java/mage/game/permanent/token/MagesAttendantToken.java new file mode 100644 index 0000000000..1e1640a875 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/MagesAttendantToken.java @@ -0,0 +1,42 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.CounterUnlessPaysEffect; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.TargetSpell; + +/** + * @author TheElk801 + */ +public final class MagesAttendantToken extends TokenImpl { + + public MagesAttendantToken() { + super("Wizard Token", "1/1 blue Wizard creature token with \"{1}, Sacrifice this creature: Counter target noncreature spell unless its controller pays {1}.\""); + cardType.add(CardType.CREATURE); + subtype.add(SubType.WIZARD); + color.setBlue(true); + power = new MageInt(1); + toughness = new MageInt(1); + + Ability ability = new SimpleActivatedAbility( + new CounterUnlessPaysEffect(new GenericManaCost(1)), new GenericManaCost(1) + ); + ability.addCost(new SacrificeSourceCost().setText("sacrifice this creature")); + ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_NON_CREATURE)); + this.addAbility(ability); + } + + private MagesAttendantToken(final MagesAttendantToken token) { + super(token); + } + + public MagesAttendantToken copy() { + return new MagesAttendantToken(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/WizardToken.java b/Mage/src/main/java/mage/game/permanent/token/WizardToken.java index 39d1878d1c..67a04fb3a0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WizardToken.java @@ -4,13 +4,12 @@ import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; +/** + * @author TheElk801 + */ public final class WizardToken extends TokenImpl { public WizardToken() { - this("WAR"); - } - - public WizardToken(String setCode) { super("Wizard Token", "2/2 blue Wizard creature token"); cardType.add(CardType.CREATURE); subtype.add(SubType.WIZARD); @@ -18,7 +17,7 @@ public final class WizardToken extends TokenImpl { power = new MageInt(2); toughness = new MageInt(2); - setOriginalExpansionSetCode(setCode); + setOriginalExpansionSetCode("WAR"); } private WizardToken(final WizardToken token) { diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index d389c57f74..8319e27217 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -43919,6 +43919,7 @@ Ominous Traveler|Alchemy: Innistrad|62|R|{2}|Creature - Human|1|1|When Ominous T Forsaken Crossroads|Alchemy: Innistrad|63|R||Land|||Forsaken Crossroads enters the battlefield tapped.$As Forsaken Crossroads enters the battlefield, choose a color.$When Forsaken Crossroads enters the battlefield, scry 1. If you weren't the starting player, you may untap Forsaken Crossroads instead.${T}: Add one mana of the chosen color.| Elspeth Resplendent|Streets of New Capenna|11|M|{3}{W}{W}|Legendary Planeswalker - Elspeth|5|+1: Choose up to one target creature. Put a +1/+1 counter and a counter from among flying, first strike, lifelink, or vigilance on it.$−3: Look at the top seven cards of your library. You may put a permanent card with mana value 3 or less from among them onto the battlefield with a shield counter on it. Put the rest on the bottom of your library in a random order.$−7: Create five 3/3 white Angel creature tokens with flying.| Halo Fountain|Streets of New Capenna|15|M|{2}{W}|Artifact|||{W}, {T}, Untap a tapped creature you control: Create a 1/1 green and white Citizen creature token.${W}{W}, {T}, Untap two tapped creatures you control: Draw a card.${W}{W}{W}{W}{W}, {T}, Untap fifteen tapped creatures you control: You win the game.| +Mage's Attendant|Streets of New Capenna|21|U|{2}{W}|Creature - Cat Rogue|3|2|When Mage's Attendant enters the battlefield, create a 1/1 blue Wizard creature token with "{1}, Sacrifice this creature: Counter target noncreature spell unless its controller pays {1}."| Mysterious Limousine|Streets of New Capenna|22|R|{3}{W}{W}|Artifact - Vehicle|4|4|Whenever Mysterious Limousine enters the battlefield or attacks, exile up to one other target creature until Mysterious Limousine leaves the battlefield. If a creature is put into exile this way, return each other card exiled with Mysterious Limousine to the battlefield under its owner's control.$Crew 2| Rumor Gatherer|Streets of New Capenna|29|U|{1}{W}{W}|Creature - Elf Wizard|2|1|Alliance — Whenever another creature enters the battlefield under your control, scry 1. If this is the second time this ability has resolved this turn, draw a card instead.| Cut Your Losses|Streets of New Capenna|38|R|{4}{U}{U}|Sorcery|||Casualty 2$Target player mills half their library, rounded down.|