From b733ee74e9ba925425547f7d9a7382c2cd9c5647 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Wed, 6 Dec 2023 18:23:50 -0500 Subject: [PATCH] [MKM] Implement Aurelia, the Law Above --- .../src/mage/cards/a/AureliaTheLawAbove.java | 97 +++++++++++++++++++ .../src/mage/sets/MurdersAtKarlovManor.java | 1 + 2 files changed, 98 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AureliaTheLawAbove.java diff --git a/Mage.Sets/src/mage/cards/a/AureliaTheLawAbove.java b/Mage.Sets/src/mage/cards/a/AureliaTheLawAbove.java new file mode 100644 index 00000000000..774aefc1acf --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AureliaTheLawAbove.java @@ -0,0 +1,97 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.DamagePlayersEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.util.CardUtil; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AureliaTheLawAbove extends CardImpl { + + public AureliaTheLawAbove(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Whenever a player attacks with three or more creatures, you draw a card. + this.addAbility(new AureliaTheLawAboveTriggeredAbility( + new DrawCardSourceControllerEffect(1, "you"), 3 + )); + + // Whenever a player attacks with five or more creatures, Aurelia, the Law Above deals 3 damage to each of your opponents and you gain 3 life. + Ability ability = new AureliaTheLawAboveTriggeredAbility( + new DamagePlayersEffect(3, TargetController.OPPONENT) + .setText("{this} deals 3 damage to each of your opponents"), 5 + ); + ability.addEffect(new GainLifeEffect(3).concatBy("and")); + this.addAbility(ability); + } + + private AureliaTheLawAbove(final AureliaTheLawAbove card) { + super(card); + } + + @Override + public AureliaTheLawAbove copy() { + return new AureliaTheLawAbove(this); + } +} + +class AureliaTheLawAboveTriggeredAbility extends TriggeredAbilityImpl { + + private final int amount; + + AureliaTheLawAboveTriggeredAbility(Effect effect, int amount) { + super(Zone.BATTLEFIELD, effect); + this.amount = amount; + this.setTriggerPhrase("Whenever a player attacks with " + CardUtil.numberToText(amount) + " or more creatures, "); + } + + private AureliaTheLawAboveTriggeredAbility(final AureliaTheLawAboveTriggeredAbility ability) { + super(ability); + this.amount = ability.amount; + } + + @Override + public AureliaTheLawAboveTriggeredAbility copy() { + return new AureliaTheLawAboveTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DECLARED_ATTACKERS; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + return game.getCombat().getAttackers().size() >= amount; + } +} diff --git a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java index 765c30ebadf..d9c46f4ec56 100644 --- a/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java +++ b/Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java @@ -22,6 +22,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet { this.hasBoosters = false; // temporary cards.add(new SetCardInfo("Alquist Proft, Master Sleuth", 185, Rarity.MYTHIC, mage.cards.a.AlquistProftMasterSleuth.class)); + cards.add(new SetCardInfo("Aurelia, the Law Above", 188, Rarity.RARE, mage.cards.a.AureliaTheLawAbove.class)); cards.add(new SetCardInfo("Benthic Criminologists", 40, Rarity.COMMON, mage.cards.b.BenthicCriminologists.class)); cards.add(new SetCardInfo("Curious Cadaver", 194, Rarity.UNCOMMON, mage.cards.c.CuriousCadaver.class)); cards.add(new SetCardInfo("Deduce", 52, Rarity.COMMON, mage.cards.d.Deduce.class));