From 7589581c1481606189aed987d21a9c93b7c0ebdc Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sun, 7 Nov 2021 08:45:30 -0500 Subject: [PATCH] [VOW] Implemented Panicked Bystander / Cackling Culprit --- .../src/mage/cards/c/CacklingCulprit.java | 53 ++++++++++++++++++ .../src/mage/cards/p/PanickedBystander.java | 54 +++++++++++++++++++ .../src/mage/sets/InnistradCrimsonVow.java | 2 + 3 files changed, 109 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CacklingCulprit.java create mode 100644 Mage.Sets/src/mage/cards/p/PanickedBystander.java diff --git a/Mage.Sets/src/mage/cards/c/CacklingCulprit.java b/Mage.Sets/src/mage/cards/c/CacklingCulprit.java new file mode 100644 index 0000000000..4f844eb7aa --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CacklingCulprit.java @@ -0,0 +1,53 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.StaticFilters; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class CacklingCulprit extends CardImpl { + + public CacklingCulprit(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ROGUE); + this.power = new MageInt(3); + this.toughness = new MageInt(5); + this.color.setBlack(true); + this.nightCard = true; + + // Whenever Cackling Culprit or another creature you control dies, you gain 1 life. + this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility( + new GainLifeEffect(1), false, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE + )); + + // {1}{B}: Cackling Culprit gains deathtouch until end of turn. + this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect( + DeathtouchAbility.getInstance(), Duration.EndOfTurn + ), new ManaCostsImpl<>("{1}{B}"))); + } + + private CacklingCulprit(final CacklingCulprit card) { + super(card); + } + + @Override + public CacklingCulprit copy() { + return new CacklingCulprit(this); + } +} diff --git a/Mage.Sets/src/mage/cards/p/PanickedBystander.java b/Mage.Sets/src/mage/cards/p/PanickedBystander.java new file mode 100644 index 0000000000..3d8333697a --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PanickedBystander.java @@ -0,0 +1,54 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.common.BeginningOfEndStepTriggeredAbility; +import mage.abilities.common.DiesThisOrAnotherCreatureTriggeredAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.YouGainedLifeCondition; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.TransformSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.StaticFilters; +import mage.watchers.common.PlayerGainedLifeWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PanickedBystander extends CardImpl { + + private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2); + + public PanickedBystander(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.PEASANT); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + this.secondSideCardClazz = mage.cards.c.CacklingCulprit.class; + + // Whenever Panicked Bystander or another creature you control dies, you gain 1 life. + this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility( + new GainLifeEffect(1), false, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE + )); + + // At the beginning of your end step, if you gained 3 or more life this turn, transform Panicked Bystander. + this.addAbility(new BeginningOfEndStepTriggeredAbility( + Zone.BATTLEFIELD, new TransformSourceEffect(), + TargetController.YOU, condition, false + ), new PlayerGainedLifeWatcher()); + } + + private PanickedBystander(final PanickedBystander card) { + super(card); + } + + @Override + public PanickedBystander copy() { + return new PanickedBystander(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java index 09b6388a19..626bd753fa 100644 --- a/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java +++ b/Mage.Sets/src/mage/sets/InnistradCrimsonVow.java @@ -63,6 +63,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Bramble Wurm", 189, Rarity.UNCOMMON, mage.cards.b.BrambleWurm.class)); cards.add(new SetCardInfo("Bride's Gown", 4, Rarity.UNCOMMON, mage.cards.b.BridesGown.class)); cards.add(new SetCardInfo("By Invitation Only", 5, Rarity.RARE, mage.cards.b.ByInvitationOnly.class)); + cards.add(new SetCardInfo("Cackling Culprit", 28, Rarity.UNCOMMON, mage.cards.c.CacklingCulprit.class)); cards.add(new SetCardInfo("Cartographer's Survey", 190, Rarity.UNCOMMON, mage.cards.c.CartographersSurvey.class)); cards.add(new SetCardInfo("Catapult Captain", 99, Rarity.UNCOMMON, mage.cards.c.CatapultCaptain.class)); cards.add(new SetCardInfo("Catapult Fodder", 99, Rarity.UNCOMMON, mage.cards.c.CatapultFodder.class)); @@ -203,6 +204,7 @@ public final class InnistradCrimsonVow extends ExpansionSet { cards.add(new SetCardInfo("Ollenbock Escort", 27, Rarity.UNCOMMON, mage.cards.o.OllenbockEscort.class)); cards.add(new SetCardInfo("Overcharged Amalgam", 71, Rarity.RARE, mage.cards.o.OverchargedAmalgam.class)); cards.add(new SetCardInfo("Packsong Pup", 213, Rarity.UNCOMMON, mage.cards.p.PacksongPup.class)); + cards.add(new SetCardInfo("Panicked Bystander", 28, Rarity.UNCOMMON, mage.cards.p.PanickedBystander.class)); cards.add(new SetCardInfo("Parasitic Grasp", 123, Rarity.UNCOMMON, mage.cards.p.ParasiticGrasp.class)); cards.add(new SetCardInfo("Parish-Blade Trainee", 29, Rarity.COMMON, mage.cards.p.ParishBladeTrainee.class)); cards.add(new SetCardInfo("Path of Peril", 124, Rarity.RARE, mage.cards.p.PathOfPeril.class));