From 1f6ccea60a8340fc4d270a3cc89eaaef65e8abf3 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 5 Nov 2020 22:02:50 -0500 Subject: [PATCH] [CMR] Implemented Court of Ire --- Mage.Sets/src/mage/cards/c/CourtOfIre.java | 47 +++++++++++++++++++ Mage.Sets/src/mage/sets/CommanderLegends.java | 1 + 2 files changed, 48 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CourtOfIre.java diff --git a/Mage.Sets/src/mage/cards/c/CourtOfIre.java b/Mage.Sets/src/mage/cards/c/CourtOfIre.java new file mode 100644 index 00000000000..07f512de826 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CourtOfIre.java @@ -0,0 +1,47 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.condition.common.MonarchIsSourceControllerCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.BecomesMonarchSourceEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TargetController; +import mage.target.common.TargetAnyTarget; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CourtOfIre extends CardImpl { + + public CourtOfIre(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}"); + + // When Court of Ire enters the battlefield, you become the monarch. + this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect())); + + // At the beginning of your upkeep, Court of Ire deals 2 damage to any target. If you're the monarch, it deals 7 damage to that player or permanent instead. + Ability ability = new BeginningOfUpkeepTriggeredAbility(new ConditionalOneShotEffect( + new DamageTargetEffect(7), new DamageTargetEffect(2), + MonarchIsSourceControllerCondition.instance, "{this} deals 2 damage to any target. " + + "If you're the monarch, it deals 7 damage to that player or permanent instead" + ), TargetController.YOU, false); + ability.addTarget(new TargetAnyTarget()); + this.addAbility(ability); + } + + private CourtOfIre(final CourtOfIre card) { + super(card); + } + + @Override + public CourtOfIre copy() { + return new CourtOfIre(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index a083704a7e2..4de52c9a750 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -101,6 +101,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Court of Bounty", 220, Rarity.RARE, mage.cards.c.CourtOfBounty.class)); cards.add(new SetCardInfo("Court of Cunning", 63, Rarity.RARE, mage.cards.c.CourtOfCunning.class)); cards.add(new SetCardInfo("Court of Grace", 16, Rarity.RARE, mage.cards.c.CourtOfGrace.class)); + cards.add(new SetCardInfo("Court of Ire", 170, Rarity.RARE, mage.cards.c.CourtOfIre.class)); cards.add(new SetCardInfo("Crimson Fleet Commodore", 171, Rarity.COMMON, mage.cards.c.CrimsonFleetCommodore.class)); cards.add(new SetCardInfo("Crow of Dark Tidings", 115, Rarity.COMMON, mage.cards.c.CrowOfDarkTidings.class)); cards.add(new SetCardInfo("Crushing Vines", 221, Rarity.COMMON, mage.cards.c.CrushingVines.class));