From 181e4e46f866cac0c7ff3d78fc925036f23e59c4 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Sat, 8 Oct 2022 19:27:52 +0100 Subject: [PATCH] [40K] Implement Knight Rampager (#9630) --- .../src/mage/cards/k/KnightRampager.java | 54 +++++++++++++++++++ Mage.Sets/src/mage/sets/Warhammer40000.java | 1 + 2 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KnightRampager.java diff --git a/Mage.Sets/src/mage/cards/k/KnightRampager.java b/Mage.Sets/src/mage/cards/k/KnightRampager.java new file mode 100644 index 0000000000..63ed28a0e4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KnightRampager.java @@ -0,0 +1,54 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.DiesSourceTriggeredAbility; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.combat.AttackIfAbleTargetRandomOpponentSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.target.Target; +import mage.target.common.TargetOpponent; + +import java.util.UUID; + +/** + * @author PurpleCrowbar + */ +public final class KnightRampager extends CardImpl { + + public KnightRampager(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}{R}"); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Frenzied Rampage — At the beginning of combat on your turn, choose an opponent at random. Knight Rampager attacks that player this combat if able. + this.addAbility(new BeginningOfCombatTriggeredAbility(new AttackIfAbleTargetRandomOpponentSourceEffect(), TargetController.YOU, false) + .withFlavorWord("Frenzied Rampage")); + + // When Knight Rampager dies, it deals 4 damage to target opponent chosen at random. + Ability ability = new DiesSourceTriggeredAbility(new DamageTargetEffect(4), false); + Target target = new TargetOpponent(); + target.setRandom(true); + ability.addTarget(target); + this.addAbility(ability); + } + + private KnightRampager(final KnightRampager card) { + super(card); + } + + @Override + public KnightRampager copy() { + return new KnightRampager(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index 9651aea772..75b2ec1fd8 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -142,6 +142,7 @@ public final class Warhammer40000 extends ExpansionSet { cards.add(new SetCardInfo("Keeper of Secrets", 78, Rarity.RARE, mage.cards.k.KeeperOfSecrets.class)); cards.add(new SetCardInfo("Kill! Maim! Burn!", 128, Rarity.RARE, mage.cards.k.KillMaimBurn.class)); cards.add(new SetCardInfo("Knight Paladin", 160, Rarity.RARE, mage.cards.k.KnightPaladin.class)); + cards.add(new SetCardInfo("Knight Rampager", 80, Rarity.RARE, mage.cards.k.KnightRampager.class)); cards.add(new SetCardInfo("Launch the Fleet", 188, Rarity.RARE, mage.cards.l.LaunchTheFleet.class)); cards.add(new SetCardInfo("Let the Galaxy Burn", 81, Rarity.RARE, mage.cards.l.LetTheGalaxyBurn.class)); cards.add(new SetCardInfo("Lictor", 94, Rarity.RARE, mage.cards.l.Lictor.class));