[KHM] Implemented Frenzied Raider

This commit is contained in:
Evan Kranzler 2021-01-17 10:07:35 -05:00
parent 2349982fd1
commit 68f88c84a2
2 changed files with 80 additions and 0 deletions

View file

@ -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}";
}
}

View file

@ -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));