From 1a5032030d3efe8cb10199d8d73de7bd859cd799 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 2 Sep 2021 21:14:18 -0400 Subject: [PATCH 01/12] [MID] updated spoiler --- ...eartRejuvenator.java => DawnhartRejuvenator.java} | 12 ++++++------ Mage.Sets/src/mage/sets/InnistradMidnightHunt.java | 2 +- Utils/mtg-cards-data.txt | 12 +++++++----- 3 files changed, 14 insertions(+), 12 deletions(-) rename Mage.Sets/src/mage/cards/d/{DawnheartRejuvenator.java => DawnhartRejuvenator.java} (70%) diff --git a/Mage.Sets/src/mage/cards/d/DawnheartRejuvenator.java b/Mage.Sets/src/mage/cards/d/DawnhartRejuvenator.java similarity index 70% rename from Mage.Sets/src/mage/cards/d/DawnheartRejuvenator.java rename to Mage.Sets/src/mage/cards/d/DawnhartRejuvenator.java index 0016e0a1c7e..5bf41fd9aed 100644 --- a/Mage.Sets/src/mage/cards/d/DawnheartRejuvenator.java +++ b/Mage.Sets/src/mage/cards/d/DawnhartRejuvenator.java @@ -14,9 +14,9 @@ import java.util.UUID; /** * @author TheElk801 */ -public final class DawnheartRejuvenator extends CardImpl { +public final class DawnhartRejuvenator extends CardImpl { - public DawnheartRejuvenator(UUID ownerId, CardSetInfo setInfo) { + public DawnhartRejuvenator(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add(SubType.HUMAN); @@ -24,19 +24,19 @@ public final class DawnheartRejuvenator extends CardImpl { this.power = new MageInt(2); this.toughness = new MageInt(4); - // When Dawnheart Rejuvenator enters the battlefield, you gain 3 life. + // When Dawnhart Rejuvenator enters the battlefield, you gain 3 life. this.addAbility(new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3))); // {T}: Add one mana of any color. this.addAbility(new AnyColorManaAbility()); } - private DawnheartRejuvenator(final DawnheartRejuvenator card) { + private DawnhartRejuvenator(final DawnhartRejuvenator card) { super(card); } @Override - public DawnheartRejuvenator copy() { - return new DawnheartRejuvenator(this); + public DawnhartRejuvenator copy() { + return new DawnhartRejuvenator(this); } } diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 80b83d5ebe7..18c9546e20d 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -31,7 +31,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Candlelit Cavalry", 175, Rarity.COMMON, mage.cards.c.CandlelitCavalry.class)); cards.add(new SetCardInfo("Champion of the Perished", 91, Rarity.RARE, mage.cards.c.ChampionOfThePerished.class)); cards.add(new SetCardInfo("Consider", 44, Rarity.COMMON, mage.cards.c.Consider.class)); - cards.add(new SetCardInfo("Dawnheart Rejuvenator", 180, Rarity.COMMON, mage.cards.d.DawnheartRejuvenator.class)); + cards.add(new SetCardInfo("Dawnhart Rejuvenator", 180, Rarity.COMMON, mage.cards.d.DawnhartRejuvenator.class)); cards.add(new SetCardInfo("Defenestrate", 95, Rarity.COMMON, mage.cards.d.Defenestrate.class)); cards.add(new SetCardInfo("Deserted Beach", 260, Rarity.RARE, mage.cards.d.DesertedBeach.class)); cards.add(new SetCardInfo("Festival Crasher", 140, Rarity.COMMON, mage.cards.f.FestivalCrasher.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 006def364d2..bc4857f19b9 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -42191,15 +42191,17 @@ Champion of the Perished|Innistrad: Midnight Hunt|91|R|{B}|Creature - Zombie|1|1 Defenestrate|Innistrad: Midnight Hunt|95|C|{2}{B}|Instant|||Destroy target creature without flying.| Infernal Grasp|Innistrad: Midnight Hunt|107|U|{1}{B}|Instant|||Destroy target creature. You lose 2 life.| Jadar, Ghoulcaller of Nephalia|Innistrad: Midnight Hunt|108|R|{1}{B}|Legendary Creature - Human Wizard|1|1|At the beginning of your end step, if you control no creatures with decayed, create a 2/2 black Zombie creature token with decayed.| -Brimestone Vandal|Innistrad: Midnight Hunt|130|C|{2}{R}|Creature - Devil|2|3|Menace$If it's neither day nor night, it becomes day as Brimestone Vandal enters the battlefield.$Whenever day becomes night or night becomes day, Brimestone Vandal deals 1 damage to each opponent.| +Brimstone Vandal|Innistrad: Midnight Hunt|130|C|{2}{R}|Creature - Devil|2|3|Menace$If it's neither day nor night, it becomes day as Brimstone Vandal enters the battlefield.$Whenever day becomes night or night becomes day, Brimstone Vandal deals 1 damage to each opponent.| Famished Foragers|Innistrad: Midnight Hunt|138|C|{3}{R}|Creature - Vampire|4|3|When Famished Foragers enters the battlefield, if an opponent lost life this turn, add {R}{R}{R}.${2}{R}, Discard a card: Draw a card.| Festival Crasher|Innistrad: Midnight Hunt|140|C|{1}{R}|Creature - Devil|1|3|Whenever you cast an instant or sorcery spell, Festival Crasher gets +2/+0 until end of turn.| Light Up the Night|Innistrad: Midnight Hunt|146|R|{X}{R}|Sorcery|||Light Up the Night deals X damage to any target. It deals X plus 1 damage instead if that target is a creature or planeswalker.$Flashback—{3}{R}, Remove X loyalty counters from among planeswalkers you control. If you cast this spell this way, X can't be 0.| Play with Fire|Innistrad: Midnight Hunt|154|U|{R}|Instant|||Play with Fire deals 2 damage to any target. If a player is dealt damage this way, scry 1.| -Tavern Ruffian|Innistrad: Midnight Hunt|165|C|{3}{R}|Creature - Human Warrior Werewolf|2|5|Daybound| -Tavern Smasher|Innistrad: Midnight Hunt|165|C||Creature - Werewolf|6|5|Nightbound| +Tavern Ruffian|Innistrad: Midnight Hunt|163|C|{3}{R}|Creature - Human Warrior Werewolf|2|5|Daybound| +Tavern Smasher|Innistrad: Midnight Hunt|163|C||Creature - Werewolf|6|5|Nightbound| +Village Watch|Innistrad: Midnight Hunt|165|U|{4}{R}|Creature - Human Werewolf|4|3|Haste$Daybound| +Village Reavers|Innistrad: Midnight Hunt|165|U||Creature - Werewolf|5|4|Wolves and Werewolves you control have haste.$Nightbound| Candlelit Cavalry|Innistrad: Midnight Hunt|175|C|{4}{G}|Creature - Human Knight|5|5|Coven — At the beginning of combat on your turn, if you control three or more creatures with different powers, Candlelit Cavalry gains trample until end of turn.| -Dawnheart Rejuvenator|Innistrad: Midnight Hunt|180|C|{3}{G}|Creature - Human Warlock|2|4|When Dawnheart Rejuvenator enters the battlefield, you gain 3 life.${T}: Add one mana of any color.| +Dawnhart Rejuvenator|Innistrad: Midnight Hunt|180|C|{3}{G}|Creature - Human Warlock|2|4|When Dawnhart Rejuvenator enters the battlefield, you gain 3 life.${T}: Add one mana of any color.| Howl of the Hunt|Innistrad: Midnight Hunt|188|C|{2}{G}|Enchantment - Aura|||Flash$Enchant creature$When Howl of the Hunt enters the battlefield, if enchanted creature is a Wolf or Werewolf, untap that creature.$Enchanted creature gets +2/+2 and has vigilance.| Might of the Old Ways|Innistrad: Midnight Hunt|189|C|{1}{G}|Instant|||Target creature gets +2/+2 until end of turn.$Coven — Then if you control three or more creatures with different powers, draw a card.| Pestilent Wolf|Innistrad: Midnight Hunt|192|C|{1}{G}|Creature - Wolf|2|2|{2}{G}: Pestilent Wolf gains deathtouch until end of turn.| @@ -42210,7 +42212,7 @@ Arlinn, the Moon's Fury|Innistrad: Midnight Hunt|211|M||Legendary Planeswalker - Galvanic Iteration|Innistrad: Midnight Hunt|224|R|{U}{R}|Instant|||When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.$Flashback {1}{U}{R}| Join the Dance|Innistrad: Midnight Hunt|229|U|{G}{W}|Sorcery|||Create two 1/1 white Human creature tokens.$Flashback {3}{G}{W}| Sigarda, Champion of Light|Innistrad: Midnight Hunt|240|M|{1}{G}{W}{W}|Legendary Creature - Angel|4|4|Flying, trample$Humans you control get +1/+1.$Coven — Whenever Sigarda attacks, if you control three or more creatures with different powers, look at the top five cards of your library. You may reveal a Human creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.| -Torvar, Dire Overlord|Innistrad: Midnight Hunt|246|R|{1}{R}{G}|Legendary Creature - Human Werewolf|4|4|Whenever a Wolf or Werewolf you control deals combat damage to a player, draw a card.$At the beginning of your upkeep, if you control three or more Wolves and/or Werewolves, it becomes night. Then transform any number of Human Werewolves you control.$Daybound| +Tovolar, Dire Overlord|Innistrad: Midnight Hunt|246|R|{1}{R}{G}|Legendary Creature - Human Werewolf|4|4|Whenever a Wolf or Werewolf you control deals combat damage to a player, draw a card.$At the beginning of your upkeep, if you control three or more Wolves and/or Werewolves, it becomes night. Then transform any number of Human Werewolves you control.$Daybound| Tovolar, the Midnight Scourge|Innistrad: Midnight Hunt|246|R||Legendary Creature - Werewolf|4|4|Whenever a Wolf or Werewolf you control deals combat damage to a player, draw a card.${X}{R}{G}: Target Wolf or Werewolf you control gets +X/+0 and gains trample until end of turn.$Nightbound| Deserted Beach|Innistrad: Midnight Hunt|260|R||Land|||Deserted Beach enters the battlefield tapped unless you control two or more other lands.${T}: Add {W} or {U}.| Haunted Ridge|Innistrad: Midnight Hunt|263|R||Land|||Haunted Ridge enters the battlefield tapped unless you control two or more other lands.${T}: Add {B} or {R}.| From 693c790f5173bc21f01c0a9b6ef7059e97484d2e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 2 Sep 2021 21:17:26 -0400 Subject: [PATCH 02/12] [MID] added skip for daybound creatures --- Mage.Sets/src/mage/sets/InnistradMidnightHunt.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 18c9546e20d..44895359143 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -4,11 +4,15 @@ import mage.cards.ExpansionSet; import mage.constants.Rarity; import mage.constants.SetType; +import java.util.Arrays; +import java.util.List; + /** * @author TheElk801 */ public final class InnistradMidnightHunt extends ExpansionSet { + private static final List unfinished = Arrays.asList("Arlinn, the Pack's Hope", "Arlinn, the Moon's Fury", "Brutal Cathar", "Moonrage Brute", "Tavern Ruffian", "Tavern Smasher", "Tovolar, Dire Overlord", "Tovolar, the Midnight Scourge", "Village Watch", "Village Reavers"); private static final InnistradMidnightHunt instance = new InnistradMidnightHunt(); public static InnistradMidnightHunt getInstance() { @@ -53,5 +57,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class)); cards.add(new SetCardInfo("Unruly Mob", 40, Rarity.COMMON, mage.cards.u.UnrulyMob.class)); cards.add(new SetCardInfo("Wrenn and Seven", 208, Rarity.MYTHIC, mage.cards.w.WrennAndSeven.class)); + + cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is fully implemented } } From dd45977a9b465174c57310ffd41897bd7b155e7e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 2 Sep 2021 21:22:54 -0400 Subject: [PATCH 03/12] [MID] Implemented Tavern Ruffian // Tavern Smasher --- Mage.Sets/src/mage/cards/t/TavernRuffian.java | 43 +++++++++++++++++++ Mage.Sets/src/mage/cards/t/TavernSmasher.java | 40 +++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 2 + .../abilities/keyword/DayboundAbility.java | 43 +++++++++++++++++++ .../abilities/keyword/NightboundAbility.java | 43 +++++++++++++++++++ Utils/keywords.txt | 2 + 6 files changed, 173 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TavernRuffian.java create mode 100644 Mage.Sets/src/mage/cards/t/TavernSmasher.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java diff --git a/Mage.Sets/src/mage/cards/t/TavernRuffian.java b/Mage.Sets/src/mage/cards/t/TavernRuffian.java new file mode 100644 index 00000000000..624dd68e151 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TavernRuffian.java @@ -0,0 +1,43 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.keyword.DayboundAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TavernRuffian extends CardImpl { + + public TavernRuffian(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARRIOR); + this.subtype.add(SubType.WEREWOLF); + this.power = new MageInt(2); + this.toughness = new MageInt(5); + + this.transformable = true; + this.secondSideCardClazz = mage.cards.t.TavernSmasher.class; + + // Daybound + this.addAbility(DayboundAbility.getInstance()); + this.addAbility(new TransformAbility()); + } + + private TavernRuffian(final TavernRuffian card) { + super(card); + } + + @Override + public TavernRuffian copy() { + return new TavernRuffian(this); + } +} diff --git a/Mage.Sets/src/mage/cards/t/TavernSmasher.java b/Mage.Sets/src/mage/cards/t/TavernSmasher.java new file mode 100644 index 00000000000..5f9a91bc9cf --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TavernSmasher.java @@ -0,0 +1,40 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.keyword.NightboundAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TavernSmasher extends CardImpl { + + public TavernSmasher(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.WEREWOLF); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + this.nightCard = true; + + // Nightbound + this.addAbility(NightboundAbility.getInstance()); + this.addAbility(new TransformAbility()); + } + + private TavernSmasher(final TavernSmasher card) { + super(card); + } + + @Override + public TavernSmasher copy() { + return new TavernSmasher(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 44895359143..c5972582840 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -54,6 +54,8 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Snarling Wolf", 199, Rarity.COMMON, mage.cards.s.SnarlingWolf.class)); cards.add(new SetCardInfo("Stormrider Spirit", 79, Rarity.COMMON, mage.cards.s.StormriderSpirit.class)); cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Tavern Ruffian", 163, Rarity.COMMON, mage.cards.t.TavernRuffian.class)); + cards.add(new SetCardInfo("Tavern Smasher", 163, Rarity.COMMON, mage.cards.t.TavernSmasher.class)); cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class)); cards.add(new SetCardInfo("Unruly Mob", 40, Rarity.COMMON, mage.cards.u.UnrulyMob.class)); cards.add(new SetCardInfo("Wrenn and Seven", 208, Rarity.MYTHIC, mage.cards.w.WrennAndSeven.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java b/Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java new file mode 100644 index 00000000000..968846cc88c --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/DayboundAbility.java @@ -0,0 +1,43 @@ +package mage.abilities.keyword; + +import mage.abilities.MageSingleton; +import mage.abilities.StaticAbility; +import mage.constants.Zone; + +import java.io.ObjectStreamException; + +/** + * @author TheElk801 + * TODO: Implement this + */ +public class DayboundAbility extends StaticAbility implements MageSingleton { + + private static final DayboundAbility instance; + + static { + instance = new DayboundAbility(); + // instance.addIcon(DayboundAbilityIcon.instance); (needs to be added) + } + + private Object readResolve() throws ObjectStreamException { + return instance; + } + + public static DayboundAbility getInstance() { + return instance; + } + + private DayboundAbility() { + super(Zone.ALL, null); + } + + @Override + public String getRule() { + return "daybound (If a player casts no spells during their own turn, it becomes night next turn.)"; + } + + @Override + public DayboundAbility copy() { + return instance; + } +} diff --git a/Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java b/Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java new file mode 100644 index 00000000000..13f232d50d8 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/NightboundAbility.java @@ -0,0 +1,43 @@ +package mage.abilities.keyword; + +import mage.abilities.MageSingleton; +import mage.abilities.StaticAbility; +import mage.constants.Zone; + +import java.io.ObjectStreamException; + +/** + * @author TheElk801 + * TODO: Implement this + */ +public class NightboundAbility extends StaticAbility implements MageSingleton { + + private static final NightboundAbility instance; + + static { + instance = new NightboundAbility(); + // instance.addIcon(NightboundAbilityIcon.instance); (needs to be added) + } + + private Object readResolve() throws ObjectStreamException { + return instance; + } + + public static NightboundAbility getInstance() { + return instance; + } + + private NightboundAbility() { + super(Zone.ALL, null); + } + + @Override + public String getRule() { + return "nightbound (If a player casts at least two spells during their own turn, it becomes day next turn.)"; + } + + @Override + public NightboundAbility copy() { + return instance; + } +} diff --git a/Utils/keywords.txt b/Utils/keywords.txt index 5d8f5ff4314..0d906828ec2 100644 --- a/Utils/keywords.txt +++ b/Utils/keywords.txt @@ -16,6 +16,7 @@ Crew|number| Cumulative upkeep|cost| Cycling|cost| Dash|card, manaString| +Daybound|instance| Deathtouch|instance| Demonstrate|new| Delve|new| @@ -71,6 +72,7 @@ Mountainwalk|new| Morph|card, cost| Mutate|card, manaString| Myriad|new| +Nightbound|instance| Ninjutsu|cost| Outlast|cost| Partner|instance| From 7f437649175d0c0afc0d76aab40d2ad0d578c441 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 2 Sep 2021 21:32:13 -0400 Subject: [PATCH 04/12] [MID] Implemented Village Watch // Village Reavers --- Mage.Sets/src/mage/cards/t/TavernRuffian.java | 2 +- Mage.Sets/src/mage/cards/t/TavernSmasher.java | 9 +-- .../src/mage/cards/v/VillageReavers.java | 62 +++++++++++++++++++ Mage.Sets/src/mage/cards/v/VillageWatch.java | 46 ++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 2 + 5 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/v/VillageReavers.java create mode 100644 Mage.Sets/src/mage/cards/v/VillageWatch.java diff --git a/Mage.Sets/src/mage/cards/t/TavernRuffian.java b/Mage.Sets/src/mage/cards/t/TavernRuffian.java index 624dd68e151..fa0f278d608 100644 --- a/Mage.Sets/src/mage/cards/t/TavernRuffian.java +++ b/Mage.Sets/src/mage/cards/t/TavernRuffian.java @@ -28,8 +28,8 @@ public final class TavernRuffian extends CardImpl { this.secondSideCardClazz = mage.cards.t.TavernSmasher.class; // Daybound - this.addAbility(DayboundAbility.getInstance()); this.addAbility(new TransformAbility()); + this.addAbility(DayboundAbility.getInstance()); } private TavernRuffian(final TavernRuffian card) { diff --git a/Mage.Sets/src/mage/cards/t/TavernSmasher.java b/Mage.Sets/src/mage/cards/t/TavernSmasher.java index 5f9a91bc9cf..f837498bdb5 100644 --- a/Mage.Sets/src/mage/cards/t/TavernSmasher.java +++ b/Mage.Sets/src/mage/cards/t/TavernSmasher.java @@ -2,7 +2,6 @@ package mage.cards.t; import mage.MageInt; import mage.abilities.keyword.NightboundAbility; -import mage.abilities.keyword.TransformAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -19,14 +18,16 @@ public final class TavernSmasher extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); this.subtype.add(SubType.WEREWOLF); - this.power = new MageInt(6); - this.toughness = new MageInt(5); + + this.color.setRed(true); this.nightCard = true; + this.power = new MageInt(6); + this.toughness = new MageInt(5); + // Nightbound this.addAbility(NightboundAbility.getInstance()); - this.addAbility(new TransformAbility()); } private TavernSmasher(final TavernSmasher card) { diff --git a/Mage.Sets/src/mage/cards/v/VillageReavers.java b/Mage.Sets/src/mage/cards/v/VillageReavers.java new file mode 100644 index 00000000000..fd5cf79fa3b --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VillageReavers.java @@ -0,0 +1,62 @@ +package mage.cards.v; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.NightboundAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class VillageReavers extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledCreaturePermanent("Wolves and Werewolves"); + + static { + filter.add(Predicates.or( + SubType.WOLF.getPredicate(), + SubType.WEREWOLF.getPredicate() + )); + } + + public VillageReavers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, ""); + + this.subtype.add(SubType.WEREWOLF); + + this.color.setRed(true); + + this.nightCard = true; + + this.power = new MageInt(5); + this.toughness = new MageInt(4); + + // Wolves and Werewolves you control have haste. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + HasteAbility.getInstance(), Duration.WhileOnBattlefield, filter + ))); + + // Nightbound + this.addAbility(NightboundAbility.getInstance()); + } + + private VillageReavers(final VillageReavers card) { + super(card); + } + + @Override + public VillageReavers copy() { + return new VillageReavers(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VillageWatch.java b/Mage.Sets/src/mage/cards/v/VillageWatch.java new file mode 100644 index 00000000000..4641353d28f --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VillageWatch.java @@ -0,0 +1,46 @@ +package mage.cards.v; + +import mage.MageInt; +import mage.abilities.keyword.DayboundAbility; +import mage.abilities.keyword.HasteAbility; +import mage.abilities.keyword.TransformAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class VillageWatch extends CardImpl { + + public VillageWatch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WEREWOLF); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + this.transformable = true; + this.secondSideCardClazz = mage.cards.v.VillageReavers.class; + + // Haste + this.addAbility(HasteAbility.getInstance()); + + // Daybound + this.addAbility(new TransformAbility()); + this.addAbility(DayboundAbility.getInstance()); + } + + private VillageWatch(final VillageWatch card) { + super(card); + } + + @Override + public VillageWatch copy() { + return new VillageWatch(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index c5972582840..40aa9a2cd10 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -58,6 +58,8 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Tavern Smasher", 163, Rarity.COMMON, mage.cards.t.TavernSmasher.class)); cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class)); cards.add(new SetCardInfo("Unruly Mob", 40, Rarity.COMMON, mage.cards.u.UnrulyMob.class)); + cards.add(new SetCardInfo("Village Reavers", 165, Rarity.UNCOMMON, mage.cards.v.VillageReavers.class)); + cards.add(new SetCardInfo("Village Watch", 165, Rarity.UNCOMMON, mage.cards.v.VillageWatch.class)); cards.add(new SetCardInfo("Wrenn and Seven", 208, Rarity.MYTHIC, mage.cards.w.WrennAndSeven.class)); cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when mechanic is fully implemented From 02fde13b47404c2170b079abdd66d90221d520a3 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 2 Sep 2021 21:46:00 -0400 Subject: [PATCH 05/12] [MID] Implemented Pestilent Wolf --- Mage.Sets/src/mage/cards/p/PestilentWolf.java | 42 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 1 + 2 files changed, 43 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PestilentWolf.java diff --git a/Mage.Sets/src/mage/cards/p/PestilentWolf.java b/Mage.Sets/src/mage/cards/p/PestilentWolf.java new file mode 100644 index 00000000000..9dac0401a84 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PestilentWolf.java @@ -0,0 +1,42 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +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 java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PestilentWolf extends CardImpl { + + public PestilentWolf(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}"); + + this.subtype.add(SubType.WOLF); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // {2}{G}: Pestilent Wolf gains deathtouch until end of turn. + this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect( + DeathtouchAbility.getInstance(), Duration.EndOfTurn + ), new ManaCostsImpl<>("{2}{G}"))); + } + + private PestilentWolf(final PestilentWolf card) { + super(card); + } + + @Override + public PestilentWolf copy() { + return new PestilentWolf(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 40aa9a2cd10..5964359638b 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -47,6 +47,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Join the Dance", 229, Rarity.UNCOMMON, mage.cards.j.JoinTheDance.class)); cards.add(new SetCardInfo("Mountain", 274, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Overgrown Farmland", 265, Rarity.RARE, mage.cards.o.OvergrownFarmland.class)); + cards.add(new SetCardInfo("Pestilent Wolf", 192, Rarity.COMMON, mage.cards.p.PestilentWolf.class)); cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Play with Fire", 154, Rarity.UNCOMMON, mage.cards.p.PlayWithFire.class)); cards.add(new SetCardInfo("Rockfall Vale", 266, Rarity.RARE, mage.cards.r.RockfallVale.class)); From 2cc88718e8d0aadb32897227d8d94bd938aebdc5 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Thu, 2 Sep 2021 21:55:46 -0400 Subject: [PATCH 06/12] [MID] Implemented Sigarda, Champion of Light --- .../mage/cards/s/SigardaChampionOfLight.java | 74 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 1 + 2 files changed, 75 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SigardaChampionOfLight.java diff --git a/Mage.Sets/src/mage/cards/s/SigardaChampionOfLight.java b/Mage.Sets/src/mage/cards/s/SigardaChampionOfLight.java new file mode 100644 index 00000000000..d793c80da57 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SigardaChampionOfLight.java @@ -0,0 +1,74 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.common.CovenCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.hint.common.CovenHint; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.common.FilterCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SigardaChampionOfLight extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.HUMAN, "Humans"); + private static final FilterCard filter2 = new FilterCreatureCard("Human creature card"); + + static { + filter.add(SubType.HUMAN.getPredicate()); + } + + public SigardaChampionOfLight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ANGEL); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Humans you control get +1/+1. + this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( + 1, 1, Duration.WhileOnBattlefield, filter + ))); + + // Coven — Whenever Sigarda attacks, if you control three or more creatures with different powers, look at the top five cards of your library. You may reveal a Human creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new AttacksTriggeredAbility(new LookLibraryAndPickControllerEffect( + StaticValue.get(5), false, StaticValue.get(1), filter2, + Zone.LIBRARY, false, true, false, Zone.HAND, true + ).setBackInRandomOrder(true)), CovenCondition.instance, AbilityWord.COVEN.formatWord() + + "Whenever {this} attacks, if you control three or more creatures with different powers, " + + "look at the top five cards of your library. You may reveal a Human creature card from among them " + + "and put it into your hand. Put the rest on the bottom of your library in a random order." + ).addHint(CovenHint.instance)); + } + + private SigardaChampionOfLight(final SigardaChampionOfLight card) { + super(card); + } + + @Override + public SigardaChampionOfLight copy() { + return new SigardaChampionOfLight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 5964359638b..d0071f3c359 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -52,6 +52,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Play with Fire", 154, Rarity.UNCOMMON, mage.cards.p.PlayWithFire.class)); cards.add(new SetCardInfo("Rockfall Vale", 266, Rarity.RARE, mage.cards.r.RockfallVale.class)); cards.add(new SetCardInfo("Shipwreck Marsh", 267, Rarity.RARE, mage.cards.s.ShipwreckMarsh.class)); + cards.add(new SetCardInfo("Sigarda, Champion of Light", 240, Rarity.MYTHIC, mage.cards.s.SigardaChampionOfLight.class)); cards.add(new SetCardInfo("Snarling Wolf", 199, Rarity.COMMON, mage.cards.s.SnarlingWolf.class)); cards.add(new SetCardInfo("Stormrider Spirit", 79, Rarity.COMMON, mage.cards.s.StormriderSpirit.class)); cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); From 4961f6757b672db7f8ba18c39727e40f325cb83e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 3 Sep 2021 09:42:31 -0400 Subject: [PATCH 07/12] [MID] updated spoiler and reprints --- Mage.Sets/src/mage/sets/InnistradMidnightHunt.java | 1 + Utils/mtg-cards-data.txt | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index d0071f3c359..0ae34b9d2ed 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -58,6 +58,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 272, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Tavern Ruffian", 163, Rarity.COMMON, mage.cards.t.TavernRuffian.class)); cards.add(new SetCardInfo("Tavern Smasher", 163, Rarity.COMMON, mage.cards.t.TavernSmasher.class)); + cards.add(new SetCardInfo("Thermo-Alchemist", 164, Rarity.UNCOMMON, mage.cards.t.ThermoAlchemist.class)); cards.add(new SetCardInfo("Triskaidekaphile", 81, Rarity.RARE, mage.cards.t.Triskaidekaphile.class)); cards.add(new SetCardInfo("Unruly Mob", 40, Rarity.COMMON, mage.cards.u.UnrulyMob.class)); cards.add(new SetCardInfo("Village Reavers", 165, Rarity.UNCOMMON, mage.cards.v.VillageReavers.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index bc4857f19b9..d8f59fd5982 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -42189,15 +42189,19 @@ Triskaidekaphile|Innistrad: Midnight Hunt|81|R|{1}{U}|Creature - Human Wizard|1| Arrogant Outlaw|Innistrad: Midnight Hunt|84|C|{2}{B}|Creature - Vampire Noble|3|2|When Arrogant Outlaw enters the battlefield, if an opponent lost life this turn, each opponent loses 2 life and you gain 2 life.| Champion of the Perished|Innistrad: Midnight Hunt|91|R|{B}|Creature - Zombie|1|1|Whenever another Zombie enters the battlefield under your control, put a +1/+1 counter on Champion of the Perished.| Defenestrate|Innistrad: Midnight Hunt|95|C|{2}{B}|Instant|||Destroy target creature without flying.| +Foul Play|Innistrad: Midnight Hunt|101|U|{1}{B}|Sorcery|||Destroy target creature with power 2 or less. Investigate.| Infernal Grasp|Innistrad: Midnight Hunt|107|U|{1}{B}|Instant|||Destroy target creature. You lose 2 life.| Jadar, Ghoulcaller of Nephalia|Innistrad: Midnight Hunt|108|R|{1}{B}|Legendary Creature - Human Wizard|1|1|At the beginning of your end step, if you control no creatures with decayed, create a 2/2 black Zombie creature token with decayed.| Brimstone Vandal|Innistrad: Midnight Hunt|130|C|{2}{R}|Creature - Devil|2|3|Menace$If it's neither day nor night, it becomes day as Brimstone Vandal enters the battlefield.$Whenever day becomes night or night becomes day, Brimstone Vandal deals 1 damage to each opponent.| +Curse of Shaken Faith|Innistrad: Midnight Hunt|134|R|{1}{R}|Enchantment - Aura Curse|||Enchant player$Whenever enchanted player casts a spell other than the first spell they cast each turn or copies a spell, Curse of Shaken Faith deals 2 damage to them.| Famished Foragers|Innistrad: Midnight Hunt|138|C|{3}{R}|Creature - Vampire|4|3|When Famished Foragers enters the battlefield, if an opponent lost life this turn, add {R}{R}{R}.${2}{R}, Discard a card: Draw a card.| Festival Crasher|Innistrad: Midnight Hunt|140|C|{1}{R}|Creature - Devil|1|3|Whenever you cast an instant or sorcery spell, Festival Crasher gets +2/+0 until end of turn.| +Geistflame Reservoir|Innistrad: Midnight Hunt|142|R|{2}{R}|Artifact|||Whenever you cast an instant or sorcery spell, put a charge counter on Geistflame Reservoir.${1}{R}, {T}, Remove any number of charge counters from Geistflame Reservoir: It deals that much damage to any target.${1}{R}, {T}: Exile the top card of your library. You may play that card this turn.| Light Up the Night|Innistrad: Midnight Hunt|146|R|{X}{R}|Sorcery|||Light Up the Night deals X damage to any target. It deals X plus 1 damage instead if that target is a creature or planeswalker.$Flashback—{3}{R}, Remove X loyalty counters from among planeswalkers you control. If you cast this spell this way, X can't be 0.| Play with Fire|Innistrad: Midnight Hunt|154|U|{R}|Instant|||Play with Fire deals 2 damage to any target. If a player is dealt damage this way, scry 1.| Tavern Ruffian|Innistrad: Midnight Hunt|163|C|{3}{R}|Creature - Human Warrior Werewolf|2|5|Daybound| Tavern Smasher|Innistrad: Midnight Hunt|163|C||Creature - Werewolf|6|5|Nightbound| +Thermo-Alchemist|Innistrad: Midnight Hunt|164|U|{1}{R}|Creature - Human Shaman|0|3|Defender${T}: Thermo-Alchemist deals 1 damage to each opponent.$Whenever you cast an instant or sorcery spell, untap Thermo-Alchemist.| Village Watch|Innistrad: Midnight Hunt|165|U|{4}{R}|Creature - Human Werewolf|4|3|Haste$Daybound| Village Reavers|Innistrad: Midnight Hunt|165|U||Creature - Werewolf|5|4|Wolves and Werewolves you control have haste.$Nightbound| Candlelit Cavalry|Innistrad: Midnight Hunt|175|C|{4}{G}|Creature - Human Knight|5|5|Coven — At the beginning of combat on your turn, if you control three or more creatures with different powers, Candlelit Cavalry gains trample until end of turn.| @@ -42207,10 +42211,11 @@ Might of the Old Ways|Innistrad: Midnight Hunt|189|C|{1}{G}|Instant|||Target cre Pestilent Wolf|Innistrad: Midnight Hunt|192|C|{1}{G}|Creature - Wolf|2|2|{2}{G}: Pestilent Wolf gains deathtouch until end of turn.| Snarling Wolf|Innistrad: Midnight Hunt|199|C|{G}|Creature - Wolf|1|1|{1}{G}: Snarling Wolf gets +2/+2 until end of turn. Activate only once each turn.| Wrenn and Seven|Innistrad: Midnight Hunt|208|M|{3}{G}{G}|Legendary Planeswalker - Wrenn|5|+1: Reveal the top four cards of your library. Put all land cards revealed this way into your hand and the rest into your graveyard.$0: Put any number of land cards from your hand onto the battlefield tapped.$−3: Create a green Treefolk creature token with reach and "This creature's power and toughness are each equal to the number of lands you control."$−8: Return all permanent cards from your graveyard to your hand. You get an emblem with "You have no maximum hand size."| -Arlinn, the Pack's Hope|Innistrad: Midnight Hunt|211|M|{2}{R}{G}|Legendary Planeswalker - Arlinn|4|Daybound$+1: Until your next turn, you may cast creature cards as though they had flash, and each creature you control enters the battlefield with an additional +1/+1 counter on it.$−3: Create two 2/2 green Wolf creature tokens.| +Arlinn, the Pack's Hope|Innistrad: Midnight Hunt|211|M|{2}{R}{G}|Legendary Planeswalker - Arlinn|4|Daybound$+1: Until your next turn, you may cast creature spells as though they had flash, and each creature you control enters the battlefield with an additional +1/+1 counter on it.$−3: Create two 2/2 green Wolf creature tokens.| Arlinn, the Moon's Fury|Innistrad: Midnight Hunt|211|M||Legendary Planeswalker - Arlinn|4|Nightbound$+2: Add {R}{G}.$0: Until end of turn, Arlinn, the Moon's Fury becomes a 5/5 Werewolf creature with trample, indestructible, and haste.| Galvanic Iteration|Innistrad: Midnight Hunt|224|R|{U}{R}|Instant|||When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.$Flashback {1}{U}{R}| Join the Dance|Innistrad: Midnight Hunt|229|U|{G}{W}|Sorcery|||Create two 1/1 white Human creature tokens.$Flashback {3}{G}{W}| +Rite of Harmony|Innistrad: Midnight Hunt|236|R|{G}{W}|Instant|||Whenever a creature or enchantment enters the battlefield under your control this turn, draw a card.$Flashback {2}{G}{W}| Sigarda, Champion of Light|Innistrad: Midnight Hunt|240|M|{1}{G}{W}{W}|Legendary Creature - Angel|4|4|Flying, trample$Humans you control get +1/+1.$Coven — Whenever Sigarda attacks, if you control three or more creatures with different powers, look at the top five cards of your library. You may reveal a Human creature card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.| Tovolar, Dire Overlord|Innistrad: Midnight Hunt|246|R|{1}{R}{G}|Legendary Creature - Human Werewolf|4|4|Whenever a Wolf or Werewolf you control deals combat damage to a player, draw a card.$At the beginning of your upkeep, if you control three or more Wolves and/or Werewolves, it becomes night. Then transform any number of Human Werewolves you control.$Daybound| Tovolar, the Midnight Scourge|Innistrad: Midnight Hunt|246|R||Legendary Creature - Werewolf|4|4|Whenever a Wolf or Werewolf you control deals combat damage to a player, draw a card.${X}{R}{G}: Target Wolf or Werewolf you control gets +X/+0 and gains trample until end of turn.$Nightbound| @@ -42224,6 +42229,7 @@ Island|Innistrad: Midnight Hunt|270|C||Basic Land - Island|||({T}: Add {U}.)| Swamp|Innistrad: Midnight Hunt|272|C||Basic Land - Swamp|||({T}: Add {B}.)| Mountain|Innistrad: Midnight Hunt|274|C||Basic Land - Mountain|||({T}: Add {R}.)| Forest|Innistrad: Midnight Hunt|276|C||Basic Land - Forest|||({T}: Add {G}.)| +Can't Stay Away|Innistrad: Midnight Hunt|368|R|{W}{B}|Sorcery|||Return target creature card with mana value 3 or less from your graveyard to the battlefield. It gains "If this creature would die, exile it instead."$Flashback {3}{W}{B}| Faceless Agent|Jumpstart: Historic Horizons|1|C|{3}|Creature - Shapeshifter|2|1|Changeling$When Faceless Agent enters the battlefield, seek a creature card of the most prevalent creature type in your library.| Baffling Defenses|Jumpstart: Historic Horizons|2|C|{1}{W}|Instant|||Target creature's base power perpetually becomes 0.| Benalish Partisan|Jumpstart: Historic Horizons|3|R|{1}{W}|Creature - Human Soldier|1|2|Lifelink$Whenever you cycle another card, you may pay {1}{W}. If you do, return Benalish Partisan from your graveyard to the battlefield tapped and it perpetually gets +1/+0.$Cycling {1}{W}| From dac346d985d5bdc86358ac25c2f16da6889ada2d Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 3 Sep 2021 09:49:33 -0400 Subject: [PATCH 08/12] [MID] Implemented Foul Play --- Mage.Sets/src/mage/cards/f/FoulPlay.java | 44 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 1 + 2 files changed, 45 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FoulPlay.java diff --git a/Mage.Sets/src/mage/cards/f/FoulPlay.java b/Mage.Sets/src/mage/cards/f/FoulPlay.java new file mode 100644 index 00000000000..e13f2ec8e10 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FoulPlay.java @@ -0,0 +1,44 @@ +package mage.cards.f; + +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FoulPlay extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("creature with power 2 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 2)); + } + + public FoulPlay(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}"); + + // Destroy target creature with power 2 or less. Investigate. + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addTarget(new TargetPermanent(filter)); + this.getSpellAbility().addEffect(new InvestigateEffect()); + } + + private FoulPlay(final FoulPlay card) { + super(card); + } + + @Override + public FoulPlay copy() { + return new FoulPlay(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index 0ae34b9d2ed..b7f18cbb1b3 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -40,6 +40,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Deserted Beach", 260, Rarity.RARE, mage.cards.d.DesertedBeach.class)); cards.add(new SetCardInfo("Festival Crasher", 140, Rarity.COMMON, mage.cards.f.FestivalCrasher.class)); cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); + cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class)); cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class)); cards.add(new SetCardInfo("Infernal Grasp", 107, Rarity.UNCOMMON, mage.cards.i.InfernalGrasp.class)); cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); From 57ef76e8b0bd209c0e6b1a44b890093555cbddd8 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 3 Sep 2021 09:53:57 -0400 Subject: [PATCH 09/12] [MID] Implemented Howl of the Hunt --- Mage.Sets/src/mage/cards/h/HowlOfTheHunt.java | 87 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 1 + 2 files changed, 88 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HowlOfTheHunt.java diff --git a/Mage.Sets/src/mage/cards/h/HowlOfTheHunt.java b/Mage.Sets/src/mage/cards/h/HowlOfTheHunt.java new file mode 100644 index 00000000000..e11626d675f --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HowlOfTheHunt.java @@ -0,0 +1,87 @@ +package mage.cards.h; + +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.condition.Condition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.UntapEnchantedEffect; +import mage.abilities.effects.common.continuous.BoostEnchantedEffect; +import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class HowlOfTheHunt extends CardImpl { + + public HowlOfTheHunt(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}"); + + this.subtype.add(SubType.AURA); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // 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); + + // When Howl of the Hunt enters the battlefield, if enchanted creature is a Wolf or Werewolf, untap that creature. + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new UntapEnchantedEffect()), + HowlOfTheHuntCondition.instance, "When {this} enters the battlefield, " + + "if enchanted creature is a Wolf or Werewolf, untap that creature." + )); + + // Enchanted creature gets +2/+2 and has vigilance. + ability = new SimpleStaticAbility(new BoostEnchantedEffect(2, 2)); + ability.addEffect(new GainAbilityAttachedEffect( + VigilanceAbility.getInstance(), AttachmentType.AURA, Duration.WhileOnBattlefield + ).setText("and has vigilance")); + this.addAbility(ability); + } + + private HowlOfTheHunt(final HowlOfTheHunt card) { + super(card); + } + + @Override + public HowlOfTheHunt copy() { + return new HowlOfTheHunt(this); + } +} + +enum HowlOfTheHuntCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + Permanent enchantment = source.getSourcePermanentIfItStillExists(game); + if (enchantment == null) { + return false; + } + Permanent creature = game.getPermanent(enchantment.getAttachedTo()); + return creature != null && creature.hasSubtype(SubType.WOLF, game) || creature.hasSubtype(SubType.WEREWOLF, game); + } + + @Override + public String toString() { + return ""; + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index b7f18cbb1b3..b81b579e392 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -42,6 +42,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class)); cards.add(new SetCardInfo("Haunted Ridge", 263, Rarity.RARE, mage.cards.h.HauntedRidge.class)); + cards.add(new SetCardInfo("Howl of the Hunt", 188, Rarity.COMMON, mage.cards.h.HowlOfTheHunt.class)); cards.add(new SetCardInfo("Infernal Grasp", 107, Rarity.UNCOMMON, mage.cards.i.InfernalGrasp.class)); cards.add(new SetCardInfo("Island", 270, Rarity.LAND, mage.cards.basiclands.Island.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Jadar, Ghoulcaller of Nephalia", 108, Rarity.RARE, mage.cards.j.JadarGhoulcallerOfNephalia.class)); From 4adffa19f0935d8e6f9ae0a226b7de90f85665ba Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 3 Sep 2021 09:56:40 -0400 Subject: [PATCH 10/12] [MID] added hint to Jadar, Ghoulcaller of Nephalia --- .../src/mage/cards/j/JadarGhoulcallerOfNephalia.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/j/JadarGhoulcallerOfNephalia.java b/Mage.Sets/src/mage/cards/j/JadarGhoulcallerOfNephalia.java index bd5dfdb44cb..a3f9c158e4f 100644 --- a/Mage.Sets/src/mage/cards/j/JadarGhoulcallerOfNephalia.java +++ b/Mage.Sets/src/mage/cards/j/JadarGhoulcallerOfNephalia.java @@ -4,7 +4,10 @@ import mage.MageInt; import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.condition.Condition; import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; import mage.abilities.keyword.DecayedAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; @@ -30,6 +33,9 @@ public final class JadarGhoulcallerOfNephalia extends CardImpl { private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0); + private static final Hint hint = new ValueHint( + "Creatures you control with decayed", new PermanentsOnBattlefieldCount(filter) + ); public JadarGhoulcallerOfNephalia(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); @@ -44,7 +50,7 @@ public final class JadarGhoulcallerOfNephalia extends CardImpl { this.addAbility(new BeginningOfEndStepTriggeredAbility( Zone.BATTLEFIELD, new CreateTokenEffect(new ZombieDecayedToken()), TargetController.YOU, condition, false - )); + ).addHint(hint)); } private JadarGhoulcallerOfNephalia(final JadarGhoulcallerOfNephalia card) { From 053bda0dce9ce9adea5217ebaca2eda657f10bd6 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 3 Sep 2021 09:59:56 -0400 Subject: [PATCH 11/12] [MID] Implemented Famished Foragers --- .../src/mage/cards/f/FamishedForagers.java | 57 +++++++++++++++++++ .../src/mage/sets/InnistradMidnightHunt.java | 1 + 2 files changed, 58 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FamishedForagers.java diff --git a/Mage.Sets/src/mage/cards/f/FamishedForagers.java b/Mage.Sets/src/mage/cards/f/FamishedForagers.java new file mode 100644 index 00000000000..2b311111c82 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FamishedForagers.java @@ -0,0 +1,57 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.OpponentsLostLifeCondition; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.mana.BasicManaEffect; +import mage.abilities.hint.common.OpponentsLostLifeHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class FamishedForagers extends CardImpl { + + public FamishedForagers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}"); + + this.subtype.add(SubType.VAMPIRE); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Famished Foragers enters the battlefield, if an opponent lost life this turn, add {R}{R}{R}. + this.addAbility(new ConditionalInterveningIfTriggeredAbility( + new EntersBattlefieldTriggeredAbility(new BasicManaEffect(Mana.RedMana(3))), + OpponentsLostLifeCondition.instance, "When {this} enters the battlefield, " + + "if an opponent lost life this turn, add {R}{R}{R}." + ).addHint(OpponentsLostLifeHint.instance)); + + // {2}{R}, Discard a card: Draw a card. + Ability ability = new SimpleActivatedAbility( + new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}{R}") + ); + ability.addCost(new DiscardCardCost()); + this.addAbility(ability); + } + + private FamishedForagers(final FamishedForagers card) { + super(card); + } + + @Override + public FamishedForagers copy() { + return new FamishedForagers(this); + } +} diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index b81b579e392..ee765aef21e 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -38,6 +38,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Dawnhart Rejuvenator", 180, Rarity.COMMON, mage.cards.d.DawnhartRejuvenator.class)); cards.add(new SetCardInfo("Defenestrate", 95, Rarity.COMMON, mage.cards.d.Defenestrate.class)); cards.add(new SetCardInfo("Deserted Beach", 260, Rarity.RARE, mage.cards.d.DesertedBeach.class)); + cards.add(new SetCardInfo("Famished Foragers", 138, Rarity.COMMON, mage.cards.f.FamishedForagers.class)); cards.add(new SetCardInfo("Festival Crasher", 140, Rarity.COMMON, mage.cards.f.FestivalCrasher.class)); cards.add(new SetCardInfo("Forest", 276, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Foul Play", 101, Rarity.UNCOMMON, mage.cards.f.FoulPlay.class)); From be4715918cbb853cc1e59fdd91c77f0364dc9187 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 3 Sep 2021 11:13:15 -0400 Subject: [PATCH 12/12] [MID] Implemented Secrets of the Key --- .../src/mage/cards/c/ConfirmSuspicions.java | 16 ++---- .../src/mage/cards/s/SecretsOfTheKey.java | 55 +++++++++++++++++++ Mage.Sets/src/mage/cards/w/Wavesifter.java | 5 +- .../src/mage/sets/InnistradMidnightHunt.java | 1 + .../effects/keyword/InvestigateEffect.java | 45 ++++++++++++--- 5 files changed, 98 insertions(+), 24 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/SecretsOfTheKey.java diff --git a/Mage.Sets/src/mage/cards/c/ConfirmSuspicions.java b/Mage.Sets/src/mage/cards/c/ConfirmSuspicions.java index 45b28c5b1b6..45f8fa35662 100644 --- a/Mage.Sets/src/mage/cards/c/ConfirmSuspicions.java +++ b/Mage.Sets/src/mage/cards/c/ConfirmSuspicions.java @@ -1,8 +1,5 @@ - package mage.cards.c; -import java.util.UUID; -import mage.abilities.effects.Effect; import mage.abilities.effects.common.CounterTargetEffect; import mage.abilities.effects.keyword.InvestigateEffect; import mage.cards.CardImpl; @@ -10,27 +7,22 @@ import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.TargetSpell; +import java.util.UUID; + /** - * * @author fireshoes */ public final class ConfirmSuspicions extends CardImpl { public ConfirmSuspicions(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{U}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}{U}"); // Counter target spell. getSpellAbility().addEffect(new CounterTargetEffect()); getSpellAbility().addTarget(new TargetSpell()); // Investigate three times. - Effect effect = new InvestigateEffect(); - effect.setText("

Investigate three times."); - getSpellAbility().addEffect(effect); - effect = new InvestigateEffect(); - effect.setText(null); - getSpellAbility().addEffect(effect); - getSpellAbility().addEffect(effect); + getSpellAbility().addEffect(new InvestigateEffect(3).concatBy("
")); } private ConfirmSuspicions(final ConfirmSuspicions card) { diff --git a/Mage.Sets/src/mage/cards/s/SecretsOfTheKey.java b/Mage.Sets/src/mage/cards/s/SecretsOfTheKey.java new file mode 100644 index 00000000000..52e01b162a5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SecretsOfTheKey.java @@ -0,0 +1,55 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.keyword.InvestigateEffect; +import mage.abilities.keyword.FlashbackAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.TimingRule; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.stack.Spell; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SecretsOfTheKey extends CardImpl { + + public SecretsOfTheKey(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}"); + + // Investigate. If this spell was cast from a graveyard, investigate twice instead. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new InvestigateEffect(2), new InvestigateEffect(), SecretsOfTheKeyCondition.instance, + "Investigate. If this spell was cast from a graveyard, investigate twice instead." + )); + + // Flashback {3}{U} + this.addAbility(new FlashbackAbility(new ManaCostsImpl<>("{3}{U}"), TimingRule.INSTANT)); + } + + private SecretsOfTheKey(final SecretsOfTheKey card) { + super(card); + } + + @Override + public SecretsOfTheKey copy() { + return new SecretsOfTheKey(this); + } +} + +enum SecretsOfTheKeyCondition implements Condition { + instance; + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getSpell(source.getSourceId()); + return spell != null && spell.getFromZone() == Zone.GRAVEYARD; + } +} diff --git a/Mage.Sets/src/mage/cards/w/Wavesifter.java b/Mage.Sets/src/mage/cards/w/Wavesifter.java index 4a05a057d7a..491a646c46e 100644 --- a/Mage.Sets/src/mage/cards/w/Wavesifter.java +++ b/Mage.Sets/src/mage/cards/w/Wavesifter.java @@ -1,7 +1,6 @@ package mage.cards.w; import mage.MageInt; -import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.effects.keyword.InvestigateEffect; import mage.abilities.keyword.EvokeAbility; @@ -29,9 +28,7 @@ public final class Wavesifter extends CardImpl { this.addAbility(FlyingAbility.getInstance()); // When Wavesifter enters the battlefield, investigate twice. - Ability ability = new EntersBattlefieldTriggeredAbility(new InvestigateEffect().setText("investigate")); - ability.addEffect(new InvestigateEffect().setText("twice")); - this.addAbility(ability); + this.addAbility(new EntersBattlefieldTriggeredAbility(new InvestigateEffect(2))); // Evoke {G}{U} this.addAbility(new EvokeAbility("{G}{U}")); diff --git a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java index ee765aef21e..5480c3aeb00 100644 --- a/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java +++ b/Mage.Sets/src/mage/sets/InnistradMidnightHunt.java @@ -54,6 +54,7 @@ public final class InnistradMidnightHunt extends ExpansionSet { cards.add(new SetCardInfo("Plains", 268, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS)); cards.add(new SetCardInfo("Play with Fire", 154, Rarity.UNCOMMON, mage.cards.p.PlayWithFire.class)); cards.add(new SetCardInfo("Rockfall Vale", 266, Rarity.RARE, mage.cards.r.RockfallVale.class)); + cards.add(new SetCardInfo("Secrets of the Key", 73, Rarity.COMMON, mage.cards.s.SecretsOfTheKey.class)); cards.add(new SetCardInfo("Shipwreck Marsh", 267, Rarity.RARE, mage.cards.s.ShipwreckMarsh.class)); cards.add(new SetCardInfo("Sigarda, Champion of Light", 240, Rarity.MYTHIC, mage.cards.s.SigardaChampionOfLight.class)); cards.add(new SetCardInfo("Snarling Wolf", 199, Rarity.COMMON, mage.cards.s.SnarlingWolf.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java b/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java index 5349e86a740..41f7b3100f8 100644 --- a/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/keyword/InvestigateEffect.java @@ -1,37 +1,66 @@ package mage.abilities.effects.keyword; import mage.abilities.Ability; -import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.Mode; +import mage.abilities.effects.OneShotEffect; +import mage.constants.Outcome; import mage.game.Game; import mage.game.events.GameEvent; import mage.game.permanent.token.ClueArtifactToken; +import mage.util.CardUtil; /** - * * @author LevelX2 */ -public class InvestigateEffect extends CreateTokenEffect { +public class InvestigateEffect extends OneShotEffect { + + private final int amount; public InvestigateEffect() { - super(new ClueArtifactToken()); - this.staticText = "investigate. (Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")"; + this(1); + } + + public InvestigateEffect(int amount) { + super(Outcome.Benefit); + this.amount = amount; } public InvestigateEffect(final InvestigateEffect effect) { super(effect); + this.amount = effect.amount; } @Override public boolean apply(Game game, Ability source) { - if (super.apply(game, source)) { + new ClueArtifactToken().putOntoBattlefield(amount, game, source, source.getControllerId()); + for (int i = 0; i < amount; i++) { game.fireEvent(GameEvent.getEvent(GameEvent.EventType.INVESTIGATED, source.getSourceId(), source, source.getControllerId())); - return true; } - return false; + return true; } @Override public InvestigateEffect copy() { return new InvestigateEffect(this); } + + @Override + public String getText(Mode mode) { + if (staticText != null && !staticText.isEmpty()) { + return staticText; + } + String message; + switch (amount) { + case 1: + message = ". (C"; + break; + case 2: + message = "twice. (To investigate, c"; + break; + default: + message = CardUtil.numberToText(amount) + " times. (To investigate, c"; + } + return "investigate " + message + "reate a colorless Clue artifact token " + + "with \"{2}, Sacrifice this artifact: Draw a card.\")"; + } }