From 68f88c84a2968a7db26cdb619b2ba5a4eb6ca2f7 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 17 Jan 2021 10:07:35 -0500 Subject: [PATCH] [KHM] Implemented Frenzied Raider --- .../src/mage/cards/f/FrenziedRaider.java | 79 +++++++++++++++++++ Mage.Sets/src/mage/sets/Kaldheim.java | 1 + 2 files changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FrenziedRaider.java diff --git a/Mage.Sets/src/mage/cards/f/FrenziedRaider.java b/Mage.Sets/src/mage/cards/f/FrenziedRaider.java new file mode 100644 index 0000000000..1d055668da --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FrenziedRaider.java @@ -0,0 +1,79 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.BoastAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.stack.StackAbility; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FrenziedRaider extends CardImpl { + + public FrenziedRaider(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}"); + + this.subtype.add(SubType.DEMON); + this.subtype.add(SubType.BERSERKER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever you activate a boast ability, put a +1/+1 counter on Frenzied Raider. + this.addAbility(new FrenziedRaiderTriggeredAbility()); + } + + private FrenziedRaider(final FrenziedRaider card) { + super(card); + } + + @Override + public FrenziedRaider copy() { + return new FrenziedRaider(this); + } +} + +class FrenziedRaiderTriggeredAbility extends TriggeredAbilityImpl { + + FrenziedRaiderTriggeredAbility() { + super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false); + } + + private FrenziedRaiderTriggeredAbility(final FrenziedRaiderTriggeredAbility ability) { + super(ability); + } + + @Override + public FrenziedRaiderTriggeredAbility copy() { + return new FrenziedRaiderTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (!isControlledBy(event.getPlayerId())) { + return false; + } + StackAbility stackAbility = (StackAbility) game.getStack().getStackObject(event.getTargetId()); + return stackAbility != null && stackAbility.getStackAbility() instanceof BoastAbility; + } + + @Override + public String getRule() { + return "Whenever you activate a boast ability, put a +1/+1 counter on {this}"; + } +} diff --git a/Mage.Sets/src/mage/sets/Kaldheim.java b/Mage.Sets/src/mage/sets/Kaldheim.java index 59c2de36c2..5d3afaae1a 100644 --- a/Mage.Sets/src/mage/sets/Kaldheim.java +++ b/Mage.Sets/src/mage/sets/Kaldheim.java @@ -138,6 +138,7 @@ public final class Kaldheim extends ExpansionSet { cards.add(new SetCardInfo("Firja, Judge of Valor", 209, Rarity.UNCOMMON, mage.cards.f.FirjaJudgeOfValor.class)); cards.add(new SetCardInfo("Forest", 398, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Forging the Tyrite Sword", 211, Rarity.UNCOMMON, mage.cards.f.ForgingTheTyriteSword.class)); + cards.add(new SetCardInfo("Frenzied Raider", 137, Rarity.UNCOMMON, mage.cards.f.FrenziedRaider.class)); cards.add(new SetCardInfo("Frost Augur", 56, Rarity.UNCOMMON, mage.cards.f.FrostAugur.class)); cards.add(new SetCardInfo("Frost Bite", 138, Rarity.COMMON, mage.cards.f.FrostBite.class)); cards.add(new SetCardInfo("Frostpeak Yeti", 57, Rarity.COMMON, mage.cards.f.FrostpeakYeti.class));