From 4e24b2832d8b715bf0c5a0736e1ee7d59faef8cb Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 7 Apr 2022 20:25:44 -0400 Subject: [PATCH] [SNC] Implemented Rumor Gatherer --- Mage.Sets/src/mage/cards/r/RumorGatherer.java | 57 +++++++++++++++++++ .../src/mage/sets/StreetsOfNewCapenna.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/r/RumorGatherer.java diff --git a/Mage.Sets/src/mage/cards/r/RumorGatherer.java b/Mage.Sets/src/mage/cards/r/RumorGatherer.java new file mode 100644 index 0000000000..5cea8654fc --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/RumorGatherer.java @@ -0,0 +1,57 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AllianceAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.keyword.ScryEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.game.Game; +import mage.watchers.common.AbilityResolvedWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class RumorGatherer extends CardImpl { + + public RumorGatherer(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{W}"); + + this.subtype.add(SubType.ELF); + this.subtype.add(SubType.WIZARD); + this.power = new MageInt(2); + this.toughness = new MageInt(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. + this.addAbility(new AllianceAbility(new ConditionalOneShotEffect( + new DrawCardSourceControllerEffect(1), new ScryEffect(1), + RumorGathererCondition.instance, "scry 1. If this is the second time " + + "this ability has resolved this turn, draw a card instead" + )), new AbilityResolvedWatcher()); + } + + private RumorGatherer(final RumorGatherer card) { + super(card); + } + + @Override + public RumorGatherer copy() { + return new RumorGatherer(this); + } +} + +enum RumorGathererCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + return AbilityResolvedWatcher.getResolutionCount(game, source) == 2; + } +} diff --git a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java index 6ce71c9422..98781bf5c8 100644 --- a/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java +++ b/Mage.Sets/src/mage/sets/StreetsOfNewCapenna.java @@ -44,6 +44,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet { cards.add(new SetCardInfo("Raffine's Tower", 254, Rarity.RARE, mage.cards.r.RaffinesTower.class)); cards.add(new SetCardInfo("Raffine, Scheming Seer", 213, Rarity.MYTHIC, mage.cards.r.RaffineSchemingSeer.class)); cards.add(new SetCardInfo("Riveteers Charm", 217, Rarity.UNCOMMON, mage.cards.r.RiveteersCharm.class)); + cards.add(new SetCardInfo("Rumor Gatherer", 29, Rarity.UNCOMMON, mage.cards.r.RumorGatherer.class)); cards.add(new SetCardInfo("Skybridge Towers", 256, Rarity.COMMON, mage.cards.s.SkybridgeTowers.class)); cards.add(new SetCardInfo("Spara's Headquarters", 257, Rarity.RARE, mage.cards.s.SparasHeadquarters.class)); cards.add(new SetCardInfo("Strangle", 125, Rarity.COMMON, mage.cards.s.Strangle.class));