From f2f04be08b298c150ffa3e1717116dc1618a255c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Mon, 5 Apr 2021 19:04:52 -0400 Subject: [PATCH] [STX] Implemented Spell Satchel --- Mage.Sets/src/mage/cards/s/SpellSatchel.java | 50 +++++++++++++++++++ .../mage/sets/StrixhavenSchoolOfMages.java | 1 + .../main/java/mage/counters/CounterType.java | 1 + 3 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SpellSatchel.java diff --git a/Mage.Sets/src/mage/cards/s/SpellSatchel.java b/Mage.Sets/src/mage/cards/s/SpellSatchel.java new file mode 100644 index 0000000000..8b42c6199c --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SpellSatchel.java @@ -0,0 +1,50 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.common.MagecraftAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.ColorlessManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.counters.CounterType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SpellSatchel extends CardImpl { + + public SpellSatchel(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); + + // Magecraft — Whenever you cast or copy an instant or sorcery spell, put a book counter on Spell Satchel. + this.addAbility(new MagecraftAbility(new AddCountersSourceEffect(CounterType.BOOK.createInstance()))); + + // {T}, Remove a book counter from Spell Satchel: Add {C}. + Ability ability = new ColorlessManaAbility(); + ability.addCost(new RemoveCountersSourceCost(CounterType.BOOK.createInstance())); + this.addAbility(ability); + + // {3}, {T}, Remove three book counters from Spell Satchel: Draw a card. + ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new GenericManaCost(3)); + ability.addCost(new TapSourceCost()); + ability.addCost(new RemoveCountersSourceCost(CounterType.BOOK.createInstance(3))); + this.addAbility(ability); + } + + private SpellSatchel(final SpellSatchel card) { + super(card); + } + + @Override + public SpellSatchel copy() { + return new SpellSatchel(this); + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 27bb03a4b7..4d76a7c4c4 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -199,6 +199,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Sparring Regimen", 29, Rarity.RARE, mage.cards.s.SparringRegimen.class)); cards.add(new SetCardInfo("Spectacle Mage", 235, Rarity.COMMON, mage.cards.s.SpectacleMage.class)); cards.add(new SetCardInfo("Specter of the Fens", 87, Rarity.COMMON, mage.cards.s.SpecterOfTheFens.class)); + cards.add(new SetCardInfo("Spell Satchel", 258, Rarity.UNCOMMON, mage.cards.s.SpellSatchel.class)); cards.add(new SetCardInfo("Spined Karok", 143, Rarity.COMMON, mage.cards.s.SpinedKarok.class)); cards.add(new SetCardInfo("Spirit Summoning", 236, Rarity.COMMON, mage.cards.s.SpiritSummoning.class)); cards.add(new SetCardInfo("Springmane Cervin", 144, Rarity.COMMON, mage.cards.s.SpringmaneCervin.class)); diff --git a/Mage/src/main/java/mage/counters/CounterType.java b/Mage/src/main/java/mage/counters/CounterType.java index 9841626fcb..8d4e86279f 100644 --- a/Mage/src/main/java/mage/counters/CounterType.java +++ b/Mage/src/main/java/mage/counters/CounterType.java @@ -20,6 +20,7 @@ public enum CounterType { AWAKENING("awakening"), BLAZE("blaze"), BLOOD("blood"), + BOOK("book"), BOUNTY("bounty"), BRIBERY("bribery"), BRICK("brick"),