From 08e50a1ca48ece25bb6e98e2972ef4de99606fda Mon Sep 17 00:00:00 2001 From: Evan Kranzler <theelk801@gmail.com> Date: Sat, 14 Dec 2019 11:13:31 -0500 Subject: [PATCH] Implemented Commanding Presence --- .../src/mage/cards/c/CommandingPresence.java | 62 +++++++++++++++++++ .../src/mage/sets/TherosBeyondDeath.java | 1 + 2 files changed, 63 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CommandingPresence.java diff --git a/Mage.Sets/src/mage/cards/c/CommandingPresence.java b/Mage.Sets/src/mage/cards/c/CommandingPresence.java new file mode 100644 index 0000000000..c6443d3529 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CommandingPresence.java @@ -0,0 +1,62 @@ +package mage.cards.c; + +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FirstStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.permanent.token.HumanSoldierToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CommandingPresence extends CardImpl { + + public CommandingPresence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); + + this.subtype.add(SubType.AURA); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature gets +2/+2 and has first strike and "Whenever this creature deals combat damage to a player, create a 1/1 white Human Soldier creature token." + ability = new SimpleStaticAbility(new BoostEnchantedEffect(2, 2)); + ability.addEffect(new GainAbilityAttachedEffect( + FirstStrikeAbility.getInstance(), AttachmentType.AURA, + Duration.WhileOnBattlefield, "and has first strike" + )); + ability.addEffect(new GainAbilityAttachedEffect( + new DealsCombatDamageToAPlayerTriggeredAbility( + new CreateTokenEffect(new HumanSoldierToken()), false + ), AttachmentType.AURA, Duration.WhileOnBattlefield, + "and \"Whenever this creature deals combat damage to a player, " + + "create a 1/1 white Human Soldier creature token.\"" + )); + this.addAbility(ability); + } + + private CommandingPresence(final CommandingPresence card) { + super(card); + } + + @Override + public CommandingPresence copy() { + return new CommandingPresence(this); + } +} diff --git a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java index 2e7783bceb..77dd6ef54b 100644 --- a/Mage.Sets/src/mage/sets/TherosBeyondDeath.java +++ b/Mage.Sets/src/mage/sets/TherosBeyondDeath.java @@ -26,6 +26,7 @@ public final class TherosBeyondDeath extends ExpansionSet { this.ratioBoosterMythic = 8; this.maxCardNumberInBooster = 254; + cards.add(new SetCardInfo("Commanding Presence", 7, Rarity.UNCOMMON, mage.cards.c.CommandingPresence.class)); cards.add(new SetCardInfo("Daxos, Blessed by the Sun", 9, Rarity.UNCOMMON, mage.cards.d.DaxosBlessedByTheSun.class)); cards.add(new SetCardInfo("Eidolon of Philosophy", 48, Rarity.COMMON, mage.cards.e.EidolonOfPhilosophy.class)); cards.add(new SetCardInfo("Elspeth, Sun's Nemesis", 14, Rarity.MYTHIC, mage.cards.e.ElspethSunsNemesis.class));