From 63016b99d64080adbad228c64ff8d19c52dda396 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 29 Jan 2022 16:26:06 -0500 Subject: [PATCH] [NEO] Implemented Akki War Paint --- Mage.Sets/src/mage/cards/a/AkkiWarPaint.java | 54 +++++++++++++++++++ .../src/mage/sets/KamigawaNeonDynasty.java | 1 + 2 files changed, 55 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AkkiWarPaint.java diff --git a/Mage.Sets/src/mage/cards/a/AkkiWarPaint.java b/Mage.Sets/src/mage/cards/a/AkkiWarPaint.java new file mode 100644 index 0000000000..38ad19c6a0 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AkkiWarPaint.java @@ -0,0 +1,54 @@ +package mage.cards.a; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.AttachedToMatchesFilterCondition; +import mage.abilities.decorator.ConditionalContinuousEffect; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.StaticFilters; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AkkiWarPaint extends CardImpl { + + private static final Condition condition + = new AttachedToMatchesFilterCondition(StaticFilters.FILTER_PERMANENT_CREATURE); + + public AkkiWarPaint(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{R}"); + + this.subtype.add(SubType.AURA); + + // Enchant artifact or creature. + TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature)); + this.addAbility(new EnchantAbility(auraTarget.getTargetName())); + + // As long as enchanted permanent is a creature, it gets +2/+1. + this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect( + new BoostEnchantedEffect(2, 1), condition, + "as long as enchanted permanent is a creature, it gets +2/+1" + ))); + } + + private AkkiWarPaint(final AkkiWarPaint card) { + super(card); + } + + @Override + public AkkiWarPaint copy() { + return new AkkiWarPaint(this); + } +} diff --git a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java index 5ec4d5552f..aea36388fa 100644 --- a/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java +++ b/Mage.Sets/src/mage/sets/KamigawaNeonDynasty.java @@ -26,6 +26,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet { this.hasBasicLands = true; this.numBoosterDoubleFaced = 1; // temporary test fix + cards.add(new SetCardInfo("Akki War Paint", 132, Rarity.COMMON, mage.cards.a.AkkiWarPaint.class)); cards.add(new SetCardInfo("Atsushi, the Blazing Sky", 134, Rarity.MYTHIC, mage.cards.a.AtsushiTheBlazingSky.class)); cards.add(new SetCardInfo("Befriending the Moths", 4, Rarity.COMMON, mage.cards.b.BefriendingTheMoths.class)); cards.add(new SetCardInfo("Bronzeplate Boar", 135, Rarity.UNCOMMON, mage.cards.b.BronzeplateBoar.class));