From b6cb07006c4ad651967da474da94b9508a29a181 Mon Sep 17 00:00:00 2001 From: theelk801 Date: Thu, 22 May 2025 10:27:49 -0400 Subject: [PATCH] [FIN] Implement Clash of the Eikons --- .../src/mage/cards/a/AettirAndPriwen.java | 78 +++++++++++++++++++ Mage.Sets/src/mage/sets/FinalFantasy.java | 2 + 2 files changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AettirAndPriwen.java diff --git a/Mage.Sets/src/mage/cards/a/AettirAndPriwen.java b/Mage.Sets/src/mage/cards/a/AettirAndPriwen.java new file mode 100644 index 00000000000..2cb9a46c063 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AettirAndPriwen.java @@ -0,0 +1,78 @@ +package mage.cards.a; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.keyword.EquipAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Controllable; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.players.Player; + +import java.util.Optional; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AettirAndPriwen extends CardImpl { + + public AettirAndPriwen(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature has base power and toughness X/X, where X is your life total. + this.addAbility(new SimpleStaticAbility(new AettirAndPriwenEffect())); + + // Equip {5} + this.addAbility(new EquipAbility(5)); + } + + private AettirAndPriwen(final AettirAndPriwen card) { + super(card); + } + + @Override + public AettirAndPriwen copy() { + return new AettirAndPriwen(this); + } +} + +class AettirAndPriwenEffect extends ContinuousEffectImpl { + + AettirAndPriwenEffect() { + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.Benefit); + staticText = "equipped creature has base power and toughness X/X, where X is your life total"; + } + + private AettirAndPriwenEffect(final AettirAndPriwenEffect effect) { + super(effect); + } + + @Override + public AettirAndPriwenEffect copy() { + return new AettirAndPriwenEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = source.getSourcePermanentIfItStillExists(game); + if (permanent == null) { + return false; + } + int life = Optional + .ofNullable(source) + .map(Controllable::getControllerId) + .map(game::getPlayer) + .map(Player::getLife) + .orElse(0); + permanent.getPower().setModifiedBaseValue(life); + permanent.getToughness().setModifiedBaseValue(life); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/FinalFantasy.java b/Mage.Sets/src/mage/sets/FinalFantasy.java index 700c506ae91..adecac30ae8 100644 --- a/Mage.Sets/src/mage/sets/FinalFantasy.java +++ b/Mage.Sets/src/mage/sets/FinalFantasy.java @@ -31,6 +31,8 @@ public final class FinalFantasy extends ExpansionSet { cards.add(new SetCardInfo("Aerith Gainsborough", 4, Rarity.RARE, mage.cards.a.AerithGainsborough.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Aerith Gainsborough", 423, Rarity.RARE, mage.cards.a.AerithGainsborough.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Aerith Gainsborough", 519, Rarity.RARE, mage.cards.a.AerithGainsborough.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Aettir and Priwen", 253, Rarity.MYTHIC, mage.cards.a.AettirAndPriwen.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Aettir and Priwen", 350, Rarity.MYTHIC, mage.cards.a.AettirAndPriwen.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Al Bhed Salvagers", 88, Rarity.UNCOMMON, mage.cards.a.AlBhedSalvagers.class)); cards.add(new SetCardInfo("Ambrosia Whiteheart", 325, Rarity.UNCOMMON, mage.cards.a.AmbrosiaWhiteheart.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Ambrosia Whiteheart", 424, Rarity.UNCOMMON, mage.cards.a.AmbrosiaWhiteheart.class, NON_FULL_USE_VARIOUS));