From 9ad0195d182a50fd6c82fb27a707212b9dc0ea2a Mon Sep 17 00:00:00 2001 From: theelk801 Date: Sat, 29 Apr 2023 21:48:18 -0400 Subject: [PATCH] [J22] Implement Auntie Blyte, Bad Influence --- .../mage/cards/a/AuntieBlyteBadInfluence.java | 97 +++++++++++++++++++ Mage.Sets/src/mage/sets/Jumpstart2022.java | 1 + 2 files changed, 98 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AuntieBlyteBadInfluence.java diff --git a/Mage.Sets/src/mage/cards/a/AuntieBlyteBadInfluence.java b/Mage.Sets/src/mage/cards/a/AuntieBlyteBadInfluence.java new file mode 100644 index 0000000000..a7c94ea095 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AuntieBlyteBadInfluence.java @@ -0,0 +1,97 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.RemoveVariableCountersSourceCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.GetXValue; +import mage.abilities.dynamicvalue.common.SavedDamageValue; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AuntieBlyteBadInfluence extends CardImpl { + + public AuntieBlyteBadInfluence(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.DEVIL); + this.subtype.add(SubType.ADVISOR); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever a source you control deals damage to you, put that many +1/+1 counters on Auntie Blyte, Bad Influence. + this.addAbility(new AuntieBlyteBadInfluenceTriggeredAbility()); + + // {1}{R}, {T}, Remove X +1/+1 counters from Auntie Blyte: It deals X damage to any target. + Ability ability = new SimpleActivatedAbility( + new DamageTargetEffect(GetXValue.instance, "it"), new ManaCostsImpl<>("{1}{R}") + ); + ability.addCost(new TapSourceCost()); + ability.addCost(new RemoveVariableCountersSourceCost(CounterType.P1P1.createInstance())); + this.addAbility(ability); + } + + private AuntieBlyteBadInfluence(final AuntieBlyteBadInfluence card) { + super(card); + } + + @Override + public AuntieBlyteBadInfluence copy() { + return new AuntieBlyteBadInfluence(this); + } +} + +class AuntieBlyteBadInfluenceTriggeredAbility extends TriggeredAbilityImpl { + + AuntieBlyteBadInfluenceTriggeredAbility() { + super(Zone.BATTLEFIELD, new AddCountersSourceEffect( + CounterType.P1P1.createInstance(0), SavedDamageValue.MANY, false + )); + setTriggerPhrase("Whenever a source you control deals damage to you, "); + } + + private AuntieBlyteBadInfluenceTriggeredAbility(final AuntieBlyteBadInfluenceTriggeredAbility ability) { + super(ability); + } + + @Override + public AuntieBlyteBadInfluenceTriggeredAbility copy() { + return new AuntieBlyteBadInfluenceTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (isControlledBy(event.getTargetId()) && isControlledBy(game.getControllerId(event.getSourceId()))) { + this.getEffects().setValue("damage", event.getAmount()); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/Jumpstart2022.java b/Mage.Sets/src/mage/sets/Jumpstart2022.java index b052a48e79..48a12acd1a 100644 --- a/Mage.Sets/src/mage/sets/Jumpstart2022.java +++ b/Mage.Sets/src/mage/sets/Jumpstart2022.java @@ -62,6 +62,7 @@ public final class Jumpstart2022 extends ExpansionSet { cards.add(new SetCardInfo("Assembly-Worker", 755, Rarity.COMMON, mage.cards.a.AssemblyWorker.class)); cards.add(new SetCardInfo("Attended Healer", 152, Rarity.UNCOMMON, mage.cards.a.AttendedHealer.class)); cards.add(new SetCardInfo("Augury Owl", 273, Rarity.COMMON, mage.cards.a.AuguryOwl.class)); + cards.add(new SetCardInfo("Auntie Blyte, Bad Influence", 30, Rarity.MYTHIC, mage.cards.a.AuntieBlyteBadInfluence.class)); cards.add(new SetCardInfo("Auramancer", 153, Rarity.COMMON, mage.cards.a.Auramancer.class)); cards.add(new SetCardInfo("Avalanche Caller", 274, Rarity.UNCOMMON, mage.cards.a.AvalancheCaller.class)); cards.add(new SetCardInfo("Avenger of Zendikar", 629, Rarity.MYTHIC, mage.cards.a.AvengerOfZendikar.class));