From ec349d44907d9f4a2c2007d485a6a27ca28a9e5f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 19:04:50 -0400 Subject: [PATCH 01/18] Implemented Beanstalk Giant --- .../src/mage/cards/b/BeanstalkGiant.java | 53 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 54 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BeanstalkGiant.java diff --git a/Mage.Sets/src/mage/cards/b/BeanstalkGiant.java b/Mage.Sets/src/mage/cards/b/BeanstalkGiant.java new file mode 100644 index 0000000000..18cd2db3f3 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BeanstalkGiant.java @@ -0,0 +1,53 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.StaticFilters; +import mage.target.common.TargetCardInLibrary; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BeanstalkGiant extends AdventureCard { + + private static final DynamicValue xValue + = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT_LANDS); + + public BeanstalkGiant(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{6}{G}", "Fertile Footsteps", "{2}{G}"); + + this.subtype.add(SubType.GIANT); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Beanstalk Giant's power and toughness are each equal to the number of lands you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetPowerToughnessSourceEffect(xValue, Duration.EndOfGame))); + + // Fertile Footsteps + // Search your library for a basic land card, put it onto the battlefield, then shuffle your library. + this.getAdventureSpellAbility().addEffect( + new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND)) + ); + } + + private BeanstalkGiant(final BeanstalkGiant card) { + super(card); + } + + @Override + public BeanstalkGiant copy() { + return new BeanstalkGiant(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 9cf309d6b1..8e9a0e7242 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -33,6 +33,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Arcane Signet", 331, Rarity.COMMON, mage.cards.a.ArcaneSignet.class)); cards.add(new SetCardInfo("Arcanist's Owl", 206, Rarity.UNCOMMON, mage.cards.a.ArcanistsOwl.class)); cards.add(new SetCardInfo("Bake into a Pie", 76, Rarity.COMMON, mage.cards.b.BakeIntoAPie.class)); + cards.add(new SetCardInfo("Beanstalk Giant", 149, Rarity.UNCOMMON, mage.cards.b.BeanstalkGiant.class)); cards.add(new SetCardInfo("Belle of the Brawl", 78, Rarity.UNCOMMON, mage.cards.b.BelleOfTheBrawl.class)); cards.add(new SetCardInfo("Chittering Witch", 319, Rarity.RARE, mage.cards.c.ChitteringWitch.class)); cards.add(new SetCardInfo("Chulane, Teller of Tales", 326, Rarity.MYTHIC, mage.cards.c.ChulaneTellerOfTales.class)); From 6c4310738772d8b1d9d71935b68f88fc6ab0cc7e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 20:25:51 -0400 Subject: [PATCH 02/18] Implemented Knight's Charge --- Mage.Sets/src/mage/cards/k/KnightsCharge.java | 88 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 89 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KnightsCharge.java diff --git a/Mage.Sets/src/mage/cards/k/KnightsCharge.java b/Mage.Sets/src/mage/cards/k/KnightsCharge.java new file mode 100644 index 0000000000..31d33c18a2 --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KnightsCharge.java @@ -0,0 +1,88 @@ +package mage.cards.k; + +import mage.abilities.Ability; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.cards.Card; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.game.Game; +import mage.players.Player; + +import java.util.UUID; +import java.util.stream.Collectors; + +/** + * @author TheElk801 + */ +public final class KnightsCharge extends CardImpl { + + private static final FilterControlledCreaturePermanent filter + = new FilterControlledCreaturePermanent(SubType.KNIGHT); + + public KnightsCharge(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{W}{B}"); + + // Whenever a Knight you control attacks, each opponent loses 1 life and you gain 1 life. + Ability ability = new AttacksCreatureYouControlTriggeredAbility( + new LoseLifeOpponentsEffect(1), false, filter + ); + ability.addEffect(new GainLifeEffect(1).concatBy("and")); + this.addAbility(ability); + + // {6}{W}{B}, Sacrifice Knights' Charge: Return all Knight creature cards from your graveyard to the battlefield. + ability = new SimpleActivatedAbility(new KnightsChargeEffect(), new ManaCostsImpl("{6}{W}{B}")); + ability.addCost(new SacrificeSourceCost()); + this.addAbility(ability); + } + + private KnightsCharge(final KnightsCharge card) { + super(card); + } + + @Override + public KnightsCharge copy() { + return new KnightsCharge(this); + } +} + +class KnightsChargeEffect extends OneShotEffect { + + KnightsChargeEffect() { + super(Outcome.Benefit); + staticText = "return all Knight creature cards from your graveyard to the battlefield"; + } + + private KnightsChargeEffect(final KnightsChargeEffect effect) { + super(effect); + } + + @Override + public KnightsChargeEffect copy() { + return new KnightsChargeEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + return player != null && player.moveCards(new CardsImpl( + player.getGraveyard() + .getCards(game) + .stream() + .filter(Card::isCreature) + .filter(card -> card.hasSubtype(SubType.KNIGHT, game)) + .collect(Collectors.toSet()) + ), Zone.BATTLEFIELD, source, game); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 8e9a0e7242..f5c92aee17 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -54,6 +54,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Golden Egg", 220, Rarity.COMMON, mage.cards.g.GoldenEgg.class)); cards.add(new SetCardInfo("Heraldic Banner", 222, Rarity.UNCOMMON, mage.cards.h.HeraldicBanner.class)); cards.add(new SetCardInfo("Inspiring Veteran", 194, Rarity.UNCOMMON, mage.cards.i.InspiringVeteran.class)); + cards.add(new SetCardInfo("Knights' Charge", 328, Rarity.RARE, mage.cards.k.KnightsCharge.class)); cards.add(new SetCardInfo("Lovestruck Beast", 165, Rarity.RARE, mage.cards.l.LovestruckBeast.class)); cards.add(new SetCardInfo("Mace of the Valiant", 314, Rarity.RARE, mage.cards.m.MaceOfTheValiant.class)); cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class)); From 3a523804e464a9f6f46b1190f3d91856b526583e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 20:37:29 -0400 Subject: [PATCH 03/18] Implemented Keeper of Fables --- .../src/mage/cards/k/KeeperOfFables.java | 93 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 94 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/k/KeeperOfFables.java diff --git a/Mage.Sets/src/mage/cards/k/KeeperOfFables.java b/Mage.Sets/src/mage/cards/k/KeeperOfFables.java new file mode 100644 index 0000000000..ff9db9fd6e --- /dev/null +++ b/Mage.Sets/src/mage/cards/k/KeeperOfFables.java @@ -0,0 +1,93 @@ +package mage.cards.k; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.events.DamagedPlayerEvent; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class KeeperOfFables extends CardImpl { + + public KeeperOfFables(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}"); + + this.subtype.add(SubType.CAT); + this.power = new MageInt(4); + this.toughness = new MageInt(5); + + // Whenever one or more non-Human creatures you control deal combat damage to a player, draw a card. + this.addAbility(new KeeperOfFablesTriggeredAbility()); + } + + private KeeperOfFables(final KeeperOfFables card) { + super(card); + } + + @Override + public KeeperOfFables copy() { + return new KeeperOfFables(this); + } +} + +class KeeperOfFablesTriggeredAbility extends TriggeredAbilityImpl { + + private final List damagedPlayerIds = new ArrayList<>(); + + KeeperOfFablesTriggeredAbility() { + super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), false); + } + + private KeeperOfFablesTriggeredAbility(final KeeperOfFablesTriggeredAbility ability) { + super(ability); + } + + @Override + public KeeperOfFablesTriggeredAbility copy() { + return new KeeperOfFablesTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER + || event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getType() == GameEvent.EventType.DAMAGED_PLAYER) { + if (((DamagedPlayerEvent) event).isCombatDamage()) { + Permanent creature = game.getPermanent(event.getSourceId()); + if (creature != null + && creature.isControlledBy(controllerId) + && !creature.hasSubtype(SubType.HUMAN, game) + && !damagedPlayerIds.contains(event.getTargetId())) { + damagedPlayerIds.add(event.getTargetId()); + return true; + } + } + } + if (event.getType() == GameEvent.EventType.END_COMBAT_STEP_POST) { + damagedPlayerIds.clear(); + } + return false; + } + + @Override + public String getRule() { + return "Whenever one or more non-Human creatures you control deal combat damage to a player, draw a card"; + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index f5c92aee17..b103a80535 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -54,6 +54,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Golden Egg", 220, Rarity.COMMON, mage.cards.g.GoldenEgg.class)); cards.add(new SetCardInfo("Heraldic Banner", 222, Rarity.UNCOMMON, mage.cards.h.HeraldicBanner.class)); cards.add(new SetCardInfo("Inspiring Veteran", 194, Rarity.UNCOMMON, mage.cards.i.InspiringVeteran.class)); + cards.add(new SetCardInfo("Keeper of Fables", 163, Rarity.UNCOMMON, mage.cards.k.KeeperOfFables.class)); cards.add(new SetCardInfo("Knights' Charge", 328, Rarity.RARE, mage.cards.k.KnightsCharge.class)); cards.add(new SetCardInfo("Lovestruck Beast", 165, Rarity.RARE, mage.cards.l.LovestruckBeast.class)); cards.add(new SetCardInfo("Mace of the Valiant", 314, Rarity.RARE, mage.cards.m.MaceOfTheValiant.class)); From 71a917a5d49b551e75521b18b388f30391a17313 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 21:08:26 -0400 Subject: [PATCH 04/18] Implemented Steelclaw Lance --- .../src/mage/cards/b/BlackbladeReforged.java | 36 +++++----- .../src/mage/cards/s/SteelclawLance.java | 49 +++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + .../abilities/keyword/EquipFilterAbility.java | 40 +++++++++++ .../keyword/EquipLegendaryAbility.java | 69 ------------------- 5 files changed, 110 insertions(+), 85 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/SteelclawLance.java create mode 100644 Mage/src/main/java/mage/abilities/keyword/EquipFilterAbility.java delete mode 100644 Mage/src/main/java/mage/abilities/keyword/EquipLegendaryAbility.java diff --git a/Mage.Sets/src/mage/cards/b/BlackbladeReforged.java b/Mage.Sets/src/mage/cards/b/BlackbladeReforged.java index 16ccb69fbd..a3ab6f157a 100644 --- a/Mage.Sets/src/mage/cards/b/BlackbladeReforged.java +++ b/Mage.Sets/src/mage/cards/b/BlackbladeReforged.java @@ -5,30 +5,35 @@ */ package mage.cards.b; -import java.util.UUID; -import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; import mage.abilities.common.SimpleStaticAbility; -import mage.filter.common.FilterControlledLandPermanent; -import mage.filter.common.FilterControlledPermanent; -import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; import mage.abilities.keyword.EquipAbility; -import mage.abilities.keyword.EquipLegendaryAbility; +import mage.abilities.keyword.EquipFilterAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.Zone; +import mage.constants.*; +import mage.filter.StaticFilters; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.mageobject.SupertypePredicate; + +import java.util.UUID; /** - * * @author Rystan */ public final class BlackbladeReforged extends CardImpl { - private static final FilterControlledPermanent filter = new FilterControlledLandPermanent(); + private static final DynamicValue count + = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND); + private static final FilterControlledCreaturePermanent filter + = new FilterControlledCreaturePermanent("legendary creature"); + + static { + filter.add(new SupertypePredicate(SuperType.LEGENDARY)); + } public BlackbladeReforged(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}"); @@ -36,17 +41,16 @@ public final class BlackbladeReforged extends CardImpl { this.subtype.add(SubType.EQUIPMENT); // Equipped creature gets +1/+1 for each land you control. - PermanentsOnBattlefieldCount count = new PermanentsOnBattlefieldCount(filter); this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(count, count))); // Equip legendary creature (3) - this.addAbility(new EquipLegendaryAbility(Outcome.AddAbility, new GenericManaCost(3))); + this.addAbility(new EquipFilterAbility(filter, new GenericManaCost(3))); // Equip {7} this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(7))); } - public BlackbladeReforged(final BlackbladeReforged card) { + private BlackbladeReforged(final BlackbladeReforged card) { super(card); } diff --git a/Mage.Sets/src/mage/cards/s/SteelclawLance.java b/Mage.Sets/src/mage/cards/s/SteelclawLance.java new file mode 100644 index 0000000000..ace1b7684f --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SteelclawLance.java @@ -0,0 +1,49 @@ +package mage.cards.s; + +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.continuous.BoostEquippedEffect; +import mage.abilities.keyword.EquipAbility; +import mage.abilities.keyword.EquipFilterAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.filter.common.FilterControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SteelclawLance extends CardImpl { + + private static final FilterControlledCreaturePermanent filter + = new FilterControlledCreaturePermanent(SubType.KNIGHT, "Knight"); + + public SteelclawLance(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{B}{R}"); + + this.subtype.add(SubType.EQUIPMENT); + + // Equipped creature gets +2/+2. + this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 2))); + + // Equip Knight {1} + this.addAbility(new EquipFilterAbility(filter, new GenericManaCost(1))); + + // Equip {3} + this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3))); + + } + + private SteelclawLance(final SteelclawLance card) { + super(card); + } + + @Override + public SteelclawLance copy() { + return new SteelclawLance(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index b103a80535..917f8a9a6f 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -70,6 +70,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class)); cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.UNCOMMON, mage.cards.s.SlayingFire.class)); cards.add(new SetCardInfo("Steelbane Hydra", 322, Rarity.RARE, mage.cards.s.SteelbaneHydra.class)); + cards.add(new SetCardInfo("Steelclaw Lance", 202, Rarity.UNCOMMON, mage.cards.s.SteelclawLance.class)); cards.add(new SetCardInfo("Taste of Death", 320, Rarity.RARE, mage.cards.t.TasteOfDeath.class)); cards.add(new SetCardInfo("The Circle of Loyalty", 9, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class)); cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/EquipFilterAbility.java b/Mage/src/main/java/mage/abilities/keyword/EquipFilterAbility.java new file mode 100644 index 0000000000..9941068604 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/EquipFilterAbility.java @@ -0,0 +1,40 @@ +package mage.abilities.keyword; + +import mage.abilities.ActivatedAbilityImpl; +import mage.abilities.costs.Cost; +import mage.abilities.effects.common.AttachEffect; +import mage.constants.Outcome; +import mage.constants.TimingRule; +import mage.constants.Zone; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.target.common.TargetControlledCreaturePermanent; + +/** + * @author TheElk801 + */ +public class EquipFilterAbility extends ActivatedAbilityImpl { + + private final FilterControlledCreaturePermanent filter; + + public EquipFilterAbility(FilterControlledCreaturePermanent filter, Cost cost) { + super(Zone.BATTLEFIELD, new AttachEffect(Outcome.AddAbility, "Equip"), cost); + this.addTarget(new TargetControlledCreaturePermanent(filter)); + this.filter = filter; + this.timing = TimingRule.SORCERY; + } + + private EquipFilterAbility(final EquipFilterAbility ability) { + super(ability); + this.filter = ability.filter; + } + + @Override + public EquipFilterAbility copy() { + return new EquipFilterAbility(this); + } + + @Override + public String getRule() { + return "Equip " + filter.getMessage() + costs.getText() + manaCosts.getText(); + } +} diff --git a/Mage/src/main/java/mage/abilities/keyword/EquipLegendaryAbility.java b/Mage/src/main/java/mage/abilities/keyword/EquipLegendaryAbility.java deleted file mode 100644 index f7aac822fd..0000000000 --- a/Mage/src/main/java/mage/abilities/keyword/EquipLegendaryAbility.java +++ /dev/null @@ -1,69 +0,0 @@ - -package mage.abilities.keyword; - -import java.util.UUID; -import mage.abilities.ActivatedAbilityImpl; -import mage.abilities.costs.Cost; -import mage.abilities.effects.common.AttachEffect; -import mage.constants.Outcome; -import mage.constants.SubType; -import mage.constants.SuperType; -import mage.constants.TimingRule; -import mage.constants.Zone; -import mage.filter.common.FilterControlledCreaturePermanent; -import mage.filter.predicate.mageobject.SupertypePredicate; -import mage.game.Game; -import mage.game.permanent.Permanent; -import mage.target.Target; -import mage.target.common.TargetControlledCreaturePermanent; - -/** - * @author Rystan - */ -public class EquipLegendaryAbility extends ActivatedAbilityImpl { - - private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("legendary creature you control"); - - static { - filter.add(new SupertypePredicate(SuperType.LEGENDARY)); - } - - public EquipLegendaryAbility(Outcome outcome, Cost cost) { - this(outcome, cost, new TargetControlledCreaturePermanent(filter)); - } - - public EquipLegendaryAbility(Outcome outcome, Cost cost, Target target) { - super(Zone.BATTLEFIELD, new AttachEffect(outcome, "Equip"), cost); - this.addTarget(target); - this.timing = TimingRule.SORCERY; - } - - @Override - public ActivationStatus canActivate(UUID playerId, Game game) { - ActivationStatus activationStatus = super.canActivate(playerId, game); - if (activationStatus.canActivate()) { - Permanent permanent = game.getPermanent(sourceId); - if (permanent != null && permanent.hasSubtype(SubType.EQUIPMENT, game)) { - return activationStatus; - } - } - return activationStatus; - } - - public EquipLegendaryAbility(final EquipLegendaryAbility ability) { - super(ability); - } - - @Override - public EquipLegendaryAbility copy() { - return new EquipLegendaryAbility(this); - } - - @Override - public String getRule() { - return "Equip legendary creature " + costs.getText() - + manaCosts.getText() + " (" + manaCosts.getText() - + ": Attach to target legendary creature you control. Equip only as a sorcery.)"; - } - -} From c6d1e5786d41e69d02a1d31e365d814ec1c42d0d Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 21:30:45 -0400 Subject: [PATCH 05/18] Implemented Syr Gwyn, Hero of Ashenvale --- .../mage/cards/s/SyrGwynHeroOfAshenvale.java | 79 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 80 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshenvale.java diff --git a/Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshenvale.java b/Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshenvale.java new file mode 100644 index 0000000000..d4864ed2cc --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshenvale.java @@ -0,0 +1,79 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.mana.GenericManaCost; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.LoseLifeSourceControllerEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.keyword.EquipFilterAbility; +import mage.abilities.keyword.MenaceAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.EquippedPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SyrGwynHeroOfAshenvale extends CardImpl { + + private static final FilterControlledCreaturePermanent filter + = new FilterControlledCreaturePermanent("an equipped creature you control"); + private static final FilterPermanent filter2 + = new FilterControlledPermanent(SubType.EQUIPMENT); + private static final FilterControlledCreaturePermanent filter3 + = new FilterControlledCreaturePermanent(SubType.KNIGHT, "Knight"); + + static { + filter.add(EquippedPredicate.instance); + } + + public SyrGwynHeroOfAshenvale(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Menace + this.addAbility(new MenaceAbility()); + + // Whenever an equipped creature you control attacks, you draw a card and you lose 1 life. + Ability ability = new AttacksCreatureYouControlTriggeredAbility( + new DrawCardSourceControllerEffect(1).setText("you draw a card and"), false, filter + ); + ability.addEffect(new LoseLifeSourceControllerEffect(1)); + this.addAbility(ability); + + // Equipment you control have equip Knight {0}. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + new EquipFilterAbility(filter3, new GenericManaCost(0)), Duration.WhileOnBattlefield, filter2 + ))); + } + + private SyrGwynHeroOfAshenvale(final SyrGwynHeroOfAshenvale card) { + super(card); + } + + @Override + public SyrGwynHeroOfAshenvale copy() { + return new SyrGwynHeroOfAshenvale(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 917f8a9a6f..0de7741858 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -71,6 +71,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.UNCOMMON, mage.cards.s.SlayingFire.class)); cards.add(new SetCardInfo("Steelbane Hydra", 322, Rarity.RARE, mage.cards.s.SteelbaneHydra.class)); cards.add(new SetCardInfo("Steelclaw Lance", 202, Rarity.UNCOMMON, mage.cards.s.SteelclawLance.class)); + cards.add(new SetCardInfo("Syr Gwyn, Hero of Ashenvale", 330, Rarity.MYTHIC, mage.cards.s.SyrGwynHeroOfAshenvale.class)); cards.add(new SetCardInfo("Taste of Death", 320, Rarity.RARE, mage.cards.t.TasteOfDeath.class)); cards.add(new SetCardInfo("The Circle of Loyalty", 9, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class)); cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class)); From 3b5d6fedc918345f7702f2d94fff827f0e39d11e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 21:47:17 -0400 Subject: [PATCH 06/18] Implemented Wintermoor Commander --- .../src/mage/cards/w/WintermoorCommander.java | 72 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 73 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WintermoorCommander.java diff --git a/Mage.Sets/src/mage/cards/w/WintermoorCommander.java b/Mage.Sets/src/mage/cards/w/WintermoorCommander.java new file mode 100644 index 0000000000..4ebf50678a --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WintermoorCommander.java @@ -0,0 +1,72 @@ +package mage.cards.w; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.effects.common.continuous.SetToughnessSourceEffect; +import mage.abilities.keyword.DeathtouchAbility; +import mage.abilities.keyword.IndestructibleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.permanent.AnotherPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WintermoorCommander extends CardImpl { + + private static final FilterPermanent filter + = new FilterControlledPermanent(SubType.KNIGHT, "Knights you control"); + private static final DynamicValue xValue + = new PermanentsOnBattlefieldCount(filter); + private static final FilterPermanent filter2 + = new FilterControlledPermanent(SubType.KNIGHT, "another target Knight you control"); + + static { + filter2.add(AnotherPredicate.instance); + } + + public WintermoorCommander(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(0); + + // Deathtouch + this.addAbility(DeathtouchAbility.getInstance()); + + // Wintermoor Commander's toughness is equal to the number of Knights you control. + this.addAbility(new SimpleStaticAbility(Zone.ALL, new SetToughnessSourceEffect(xValue, Duration.EndOfGame))); + + // Whenever Wintermoor Commander attacks, another target Knight you control gains indestructible until end of turn. + Ability ability = new AttacksTriggeredAbility(new GainAbilityTargetEffect( + IndestructibleAbility.getInstance(), Duration.EndOfTurn + ), false); + ability.addTarget(new TargetPermanent(filter2)); + this.addAbility(ability); + } + + private WintermoorCommander(final WintermoorCommander card) { + super(card); + } + + @Override + public WintermoorCommander copy() { + return new WintermoorCommander(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 0de7741858..af77c028db 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -78,6 +78,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.class)); cards.add(new SetCardInfo("Tome of Legends", 332, Rarity.RARE, mage.cards.t.TomeOfLegends.class)); cards.add(new SetCardInfo("Wind-Scarred Crag", 308, Rarity.COMMON, mage.cards.w.WindScarredCrag.class)); + cards.add(new SetCardInfo("Wintermoor Commander", 205, Rarity.UNCOMMON, mage.cards.w.WintermoorCommander.class)); cards.add(new SetCardInfo("Wishful Merfolk", 73, Rarity.COMMON, mage.cards.w.WishfulMerfolk.class)); cards.add(new SetCardInfo("Witching Well", 74, Rarity.COMMON, mage.cards.w.WitchingWell.class)); From 7c8188997206acfb114442c1f1bbe879e962f94e Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 21:55:40 -0400 Subject: [PATCH 07/18] Implemented Smitten Swordmaster --- .../src/mage/cards/s/SmittenSwordmaster.java | 77 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 78 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java diff --git a/Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java b/Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java new file mode 100644 index 0000000000..6b8641545e --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SmittenSwordmaster.java @@ -0,0 +1,77 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.effects.common.LoseLifeOpponentsEffect; +import mage.abilities.keyword.LifelinkAbility; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SmittenSwordmaster extends AdventureCard { + + public SmittenSwordmaster(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{1}{B}", "Curry Favor", "{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(2); + this.toughness = new MageInt(1); + + // Lifelink + this.addAbility(LifelinkAbility.getInstance()); + + // Curry Favor + // You gain X life and each opponent loses X life, where X is the number of Knights you control. + this.getAdventureSpellAbility().addEffect(new CurryFavorEffect()); + } + + private SmittenSwordmaster(final SmittenSwordmaster card) { + super(card); + } + + @Override + public SmittenSwordmaster copy() { + return new SmittenSwordmaster(this); + } +} + +class CurryFavorEffect extends OneShotEffect { + + CurryFavorEffect() { + super(Outcome.Benefit); + staticText = "you gain X life and each opponent loses X life, where X is the number of Knights you control"; + } + + private CurryFavorEffect(final CurryFavorEffect effect) { + super(effect); + } + + @Override + public CurryFavorEffect copy() { + return new CurryFavorEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + int xValue = game.getBattlefield() + .getAllActivePermanents(source.getControllerId()) + .stream() + .filter(permanent -> permanent != null && permanent.hasSubtype(SubType.KNIGHT, game)) + .mapToInt(p -> 1) + .sum(); + new GainLifeEffect(xValue).apply(game, source); + new LoseLifeOpponentsEffect(xValue).apply(game, source); + return true; + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index af77c028db..3b5aab37dc 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -69,6 +69,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Shining Armor", 29, Rarity.COMMON, mage.cards.s.ShiningArmor.class)); cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class)); cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.UNCOMMON, mage.cards.s.SlayingFire.class)); + cards.add(new SetCardInfo("Smitten Swordmaster", 105, Rarity.COMMON, mage.cards.s.SmittenSwordmaster.class)); cards.add(new SetCardInfo("Steelbane Hydra", 322, Rarity.RARE, mage.cards.s.SteelbaneHydra.class)); cards.add(new SetCardInfo("Steelclaw Lance", 202, Rarity.UNCOMMON, mage.cards.s.SteelclawLance.class)); cards.add(new SetCardInfo("Syr Gwyn, Hero of Ashenvale", 330, Rarity.MYTHIC, mage.cards.s.SyrGwynHeroOfAshenvale.class)); From 2e70029193b6df149bf399b390598e41d813e24c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Fri, 6 Sep 2019 22:03:36 -0400 Subject: [PATCH 08/18] fixed a spelling error --- ...nHeroOfAshenvale.java => SyrGwynHeroOfAshvale.java} | 10 +++++----- Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 2 +- Utils/mtg-cards-data.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename Mage.Sets/src/mage/cards/s/{SyrGwynHeroOfAshenvale.java => SyrGwynHeroOfAshvale.java} (90%) diff --git a/Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshenvale.java b/Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshvale.java similarity index 90% rename from Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshenvale.java rename to Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshvale.java index d4864ed2cc..6034bc8149 100644 --- a/Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshenvale.java +++ b/Mage.Sets/src/mage/cards/s/SyrGwynHeroOfAshvale.java @@ -27,7 +27,7 @@ import java.util.UUID; /** * @author TheElk801 */ -public final class SyrGwynHeroOfAshenvale extends CardImpl { +public final class SyrGwynHeroOfAshvale extends CardImpl { private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("an equipped creature you control"); @@ -40,7 +40,7 @@ public final class SyrGwynHeroOfAshenvale extends CardImpl { filter.add(EquippedPredicate.instance); } - public SyrGwynHeroOfAshenvale(UUID ownerId, CardSetInfo setInfo) { + public SyrGwynHeroOfAshvale(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{W}{B}"); this.addSuperType(SuperType.LEGENDARY); @@ -68,12 +68,12 @@ public final class SyrGwynHeroOfAshenvale extends CardImpl { ))); } - private SyrGwynHeroOfAshenvale(final SyrGwynHeroOfAshenvale card) { + private SyrGwynHeroOfAshvale(final SyrGwynHeroOfAshvale card) { super(card); } @Override - public SyrGwynHeroOfAshenvale copy() { - return new SyrGwynHeroOfAshenvale(this); + public SyrGwynHeroOfAshvale copy() { + return new SyrGwynHeroOfAshvale(this); } } diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 3b5aab37dc..134170d729 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -72,7 +72,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Smitten Swordmaster", 105, Rarity.COMMON, mage.cards.s.SmittenSwordmaster.class)); cards.add(new SetCardInfo("Steelbane Hydra", 322, Rarity.RARE, mage.cards.s.SteelbaneHydra.class)); cards.add(new SetCardInfo("Steelclaw Lance", 202, Rarity.UNCOMMON, mage.cards.s.SteelclawLance.class)); - cards.add(new SetCardInfo("Syr Gwyn, Hero of Ashenvale", 330, Rarity.MYTHIC, mage.cards.s.SyrGwynHeroOfAshenvale.class)); + cards.add(new SetCardInfo("Syr Gwyn, Hero of Ashvale", 330, Rarity.MYTHIC, mage.cards.s.SyrGwynHeroOfAshvale.class)); cards.add(new SetCardInfo("Taste of Death", 320, Rarity.RARE, mage.cards.t.TasteOfDeath.class)); cards.add(new SetCardInfo("The Circle of Loyalty", 9, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class)); cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index f5ae0cedb5..34afcae8be 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -36066,7 +36066,7 @@ Chulane, Teller of Tales|Throne of Eldraine|326|M|{2}{G}{W}{U}|Legendary Creatur Gluttonous Troll|Throne of Eldraine|327|R|{2}{B}{G}|Creature - Troll|3|3|Trample$When Gluttonous Troll enters the battlefield, create a number of Food tokens equal to the number of opponents you have.${1}{G}, Sacrifice another nonland permanent: Gluttonous Troll gets +2/+2 until end of turn.| Knights' Charge|Throne of Eldraine|328|R|{1}{W}{B}|Enchantment|||Whenever a Knight you control attacks, each opponent loses 1 life and you gain 1 life.${6}{W}{B}, Sacrifice Knights' Charge: Return all Knight creature cards from your graveyard to the battlefield.| Korvold, Fae-Cursed King|Throne of Eldraine|329|M|{2}{B}{R}{G}|Legendary Creature - Dragon Noble|4|4|Flying$Whenever Korvold, Fae-Cursed King enters the battlefield or attacks, sacrifice another permanent.$Whenever you sacrifice a permanent, put a +1/+1 counter on Korvold and draw a card.| -Syr Gwyn, Hero of Ashenvale|Throne of Eldraine|330|M|{3}{R}{W}{B}|Legendary Creature - Human Knight|5|5|Vigilance, menace$Whenever an equipped creature you control attacks, you draw a card and you lose 1 life.$Equipment you control have equip Knight {0}.| +Syr Gwyn, Hero of Ashvale|Throne of Eldraine|330|M|{3}{R}{W}{B}|Legendary Creature - Human Knight|5|5|Vigilance, menace$Whenever an equipped creature you control attacks, you draw a card and you lose 1 life.$Equipment you control have equip Knight {0}.| Arcane Signet|Throne of Eldraine|331|C|{2}|Artifact|||{T}: Add one mana of any color in your commander's color identity.| Tome of Legends|Throne of Eldraine|332|R|{2}|Artifact|||Tome of Legends enters the battlefield with a page counter on it.$Whenever your commander enters the battlefield or attacks, put a page counter on Tome of Legends.${1}, {T}, Remove a page counter from Tome of Legends: Draw a card.| Command Tower|Throne of Eldraine|333|C||Land|||{T}: Add one mana of any color in your commander's color identity.| From feb639e4339e21dbdc112e9204415cb109296837 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 07:36:37 -0400 Subject: [PATCH 09/18] Implemented Thorn Mammoth --- Mage.Sets/src/mage/cards/t/ThornMammoth.java | 60 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 61 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/ThornMammoth.java diff --git a/Mage.Sets/src/mage/cards/t/ThornMammoth.java b/Mage.Sets/src/mage/cards/t/ThornMammoth.java new file mode 100644 index 0000000000..82b9fca0b1 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/ThornMammoth.java @@ -0,0 +1,60 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility; +import mage.abilities.effects.common.FightTargetSourceEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterCreaturePermanent; +import mage.filter.predicate.permanent.ControllerPredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ThornMammoth extends CardImpl { + + private static final FilterPermanent filter = new FilterCreaturePermanent("creature you don't control"); + + static { + filter.add(new ControllerPredicate(TargetController.NOT_YOU)); + } + + public ThornMammoth(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}"); + + this.subtype.add(SubType.ELEPHANT); + this.power = new MageInt(6); + this.toughness = new MageInt(6); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever Thorn Mammoth or another creature enters the battlefield under your control, Thorn Mammoth fights up to one target creature you don't control. + Ability ability = new EntersBattlefieldControlledTriggeredAbility( + new FightTargetSourceEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, + "Whenever {this} or another creature enters the battlefield under your control, " + + "{this} fights up to one target creature you don't control." + ); + ability.addTarget(new TargetPermanent(0, 1, filter, false)); + this.addAbility(ability); + } + + private ThornMammoth(final ThornMammoth card) { + super(card); + } + + @Override + public ThornMammoth copy() { + return new ThornMammoth(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 134170d729..526fe60a6c 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -75,6 +75,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Syr Gwyn, Hero of Ashvale", 330, Rarity.MYTHIC, mage.cards.s.SyrGwynHeroOfAshvale.class)); cards.add(new SetCardInfo("Taste of Death", 320, Rarity.RARE, mage.cards.t.TasteOfDeath.class)); cards.add(new SetCardInfo("The Circle of Loyalty", 9, Rarity.MYTHIC, mage.cards.t.TheCircleOfLoyalty.class)); + cards.add(new SetCardInfo("Thorn Mammoth", 323, Rarity.RARE, mage.cards.t.ThornMammoth.class)); cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class)); cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.class)); cards.add(new SetCardInfo("Tome of Legends", 332, Rarity.RARE, mage.cards.t.TomeOfLegends.class)); From 0947df181e9f4c7d4f6b372fd35c1a562ce57a07 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 08:09:37 -0400 Subject: [PATCH 10/18] Implemented Oko, Thief of Crowns --- .../src/mage/cards/o/OkoThiefOfCrowns.java | 89 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + .../src/main/java/mage/constants/SubType.java | 1 + 3 files changed, 91 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/o/OkoThiefOfCrowns.java diff --git a/Mage.Sets/src/mage/cards/o/OkoThiefOfCrowns.java b/Mage.Sets/src/mage/cards/o/OkoThiefOfCrowns.java new file mode 100644 index 0000000000..a87c2fd372 --- /dev/null +++ b/Mage.Sets/src/mage/cards/o/OkoThiefOfCrowns.java @@ -0,0 +1,89 @@ +package mage.cards.o; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.LoyaltyAbility; +import mage.abilities.common.PlaneswalkerEntersWithLoyaltyCountersAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; +import mage.abilities.effects.common.continuous.ExchangeControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.FilterPermanent; +import mage.filter.StaticFilters; +import mage.filter.common.FilterOpponentsCreaturePermanent; +import mage.filter.predicate.mageobject.PowerPredicate; +import mage.game.permanent.token.FoodToken; +import mage.game.permanent.token.TokenImpl; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class OkoThiefOfCrowns extends CardImpl { + + private static final FilterPermanent filter = new FilterOpponentsCreaturePermanent("creature an opponent controls with power 3 or less"); + + static { + filter.add(new PowerPredicate(ComparisonType.FEWER_THAN, 4)); + } + + public OkoThiefOfCrowns(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{1}{G}{U}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.OKO); + this.addAbility(new PlaneswalkerEntersWithLoyaltyCountersAbility(4)); + + // +2: Create a Food token. + this.addAbility(new LoyaltyAbility(new CreateTokenEffect(new FoodToken(), 2))); + + // +1: Target artifact or creature loses all abilities and becomes a green Elk creature with base power and toughness 3/3. + Ability ability = new LoyaltyAbility(new BecomesCreatureTargetEffect( + new OkoThiefOfCrownsToken(), true, false, Duration.Custom + ).setText("target artifact or creature loses all abilities and becomes a green Elk creature with base power and toughness 3/3"), 1); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE)); + this.addAbility(ability); + + // −5: Exchange control of target artifact or creature you control and target creature an opponent controls with power 3 or less. + ability = new LoyaltyAbility(new ExchangeControlTargetEffect( + Duration.EndOfGame, "exchange control of target artifact or creature you control " + + "and target creature an opponent controls with power 3 or less", false, true + ), -5); + ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_OR_CREATURE)); + ability.addTarget(new TargetPermanent(filter)); + this.addAbility(ability); + } + + private OkoThiefOfCrowns(final OkoThiefOfCrowns card) { + super(card); + } + + @Override + public OkoThiefOfCrowns copy() { + return new OkoThiefOfCrowns(this); + } +} + +class OkoThiefOfCrownsToken extends TokenImpl { + + OkoThiefOfCrownsToken() { + super("", "green Elk creature with base power and toughness 3/3"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.ELK); + power = new MageInt(3); + toughness = new MageInt(3); + } + + private OkoThiefOfCrownsToken(final OkoThiefOfCrownsToken token) { + super(token); + } + + public OkoThiefOfCrownsToken copy() { + return new OkoThiefOfCrownsToken(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 526fe60a6c..d3770d9598 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -59,6 +59,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Lovestruck Beast", 165, Rarity.RARE, mage.cards.l.LovestruckBeast.class)); cards.add(new SetCardInfo("Mace of the Valiant", 314, Rarity.RARE, mage.cards.m.MaceOfTheValiant.class)); cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class)); + cards.add(new SetCardInfo("Oko, Thief of Crowns", 197, Rarity.MYTHIC, mage.cards.o.OkoThiefOfCrowns.class)); cards.add(new SetCardInfo("Order of Midnight", 99, Rarity.UNCOMMON, mage.cards.o.OrderOfMidnight.class)); cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Rosethorn Acolyte", 174, Rarity.COMMON, mage.cards.r.RosethornAcolyte.class)); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 0310341a25..d11656ccc5 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -407,6 +407,7 @@ public enum SubType { NISSA("Nissa", SubTypeSet.PlaneswalkerType), NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType), OBI_WAN("Obi-Wan", SubTypeSet.PlaneswalkerType, true), // Star Wars + OKO("Oko", SubTypeSet.PlaneswalkerType), RAL("Ral", SubTypeSet.PlaneswalkerType), ROWAN("Rowan", SubTypeSet.PlaneswalkerType), SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType), From 67ea74a11e35da52cece31fd880035f6f70b14b1 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 08:36:45 -0400 Subject: [PATCH 11/18] Implemented Frogify --- Mage.Sets/src/mage/cards/f/Frogify.java | 53 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 54 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/Frogify.java diff --git a/Mage.Sets/src/mage/cards/f/Frogify.java b/Mage.Sets/src/mage/cards/f/Frogify.java new file mode 100644 index 0000000000..886eb0b5e9 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/Frogify.java @@ -0,0 +1,53 @@ +package mage.cards.f; + +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureAttachedEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.permanent.token.custom.CreatureToken; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class Frogify extends CardImpl { + + public Frogify(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + this.subtype.add(SubType.AURA); + + // 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); + + // Enchanted creature loses all abilities and is a blue Frog creature with base power and toughness 1/1. + this.addAbility(new SimpleStaticAbility(new BecomesCreatureAttachedEffect( + new CreatureToken(1, 1, "", SubType.FROG).withColor("U"), + "Enchanted creature loses all abilities and is a blue Frog creature with base power and toughness 1/1", + Duration.WhileOnBattlefield, BecomesCreatureAttachedEffect.LoseType.ALL + ))); + } + + private Frogify(final Frogify card) { + super(card); + } + + @Override + public Frogify copy() { + return new Frogify(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index d3770d9598..c7153e1aa1 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -48,6 +48,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Fireborn Knight", 210, Rarity.UNCOMMON, mage.cards.f.FirebornKnight.class)); cards.add(new SetCardInfo("Flaxen Intruder", 155, Rarity.UNCOMMON, mage.cards.f.FlaxenIntruder.class)); cards.add(new SetCardInfo("Foulmire Knight", 90, Rarity.UNCOMMON, mage.cards.f.FoulmireKnight.class)); + cards.add(new SetCardInfo("Frogify", 47, Rarity.UNCOMMON, mage.cards.f.Frogify.class)); cards.add(new SetCardInfo("Garruk, Cursed Huntsman", 191, Rarity.MYTHIC, mage.cards.g.GarrukCursedHuntsman.class)); cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class)); cards.add(new SetCardInfo("Gluttonous Troll", 327, Rarity.RARE, mage.cards.g.GluttonousTroll.class)); From 829071010029e2293c1c91131519fba3201e370f Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 08:50:45 -0400 Subject: [PATCH 12/18] Implemented Silverwing Squadron --- .../src/mage/cards/s/SilverwingSquadron.java | 64 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 65 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SilverwingSquadron.java diff --git a/Mage.Sets/src/mage/cards/s/SilverwingSquadron.java b/Mage.Sets/src/mage/cards/s/SilverwingSquadron.java new file mode 100644 index 0000000000..b240da7e81 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SilverwingSquadron.java @@ -0,0 +1,64 @@ +package mage.cards.s; + +import mage.MageInt; +import mage.abilities.common.AttacksTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.CreaturesYouControlCount; +import mage.abilities.dynamicvalue.common.OpponentsCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessSourceEffect; +import mage.abilities.hint.common.CreaturesYouControlHint; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.game.permanent.token.KnightToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SilverwingSquadron extends CardImpl { + + public SilverwingSquadron(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + this.power = new MageInt(0); + this.toughness = new MageInt(0); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Silverwing Squadron's power and toughness are each equal to the number of creatures you control. + this.addAbility(new SimpleStaticAbility( + Zone.ALL, new SetPowerToughnessSourceEffect(CreaturesYouControlCount.instance, Duration.EndOfGame) + ).addHint(CreaturesYouControlHint.instance)); + + // Whenever Silverwing Squadron attacks, create a number of 2/2 white Knight creature tokens with vigilance equal to the number of opponents you have. + this.addAbility(new AttacksTriggeredAbility( + new CreateTokenEffect(new KnightToken(), OpponentsCount.instance).setText( + "create a number of 2/2 white Knight creature tokens with vigilance " + + "equal to the number of opponents you have" + ), false + )); + } + + private SilverwingSquadron(final SilverwingSquadron card) { + super(card); + } + + @Override + public SilverwingSquadron copy() { + return new SilverwingSquadron(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index c7153e1aa1..35fdbed4cc 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -70,6 +70,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Shinechaser", 201, Rarity.UNCOMMON, mage.cards.s.Shinechaser.class)); cards.add(new SetCardInfo("Shining Armor", 29, Rarity.COMMON, mage.cards.s.ShiningArmor.class)); cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class)); + cards.add(new SetCardInfo("Silverwing Squadron", 315, Rarity.RARE, mage.cards.s.SilverwingSquadron.class)); cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.UNCOMMON, mage.cards.s.SlayingFire.class)); cards.add(new SetCardInfo("Smitten Swordmaster", 105, Rarity.COMMON, mage.cards.s.SmittenSwordmaster.class)); cards.add(new SetCardInfo("Steelbane Hydra", 322, Rarity.RARE, mage.cards.s.SteelbaneHydra.class)); From 7a8635825759df74543dae8c6b3555f5c17389be Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 09:05:51 -0400 Subject: [PATCH 13/18] Implemented Tournament Grounds --- .../src/mage/cards/t/TournamentGrounds.java | 51 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 52 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/t/TournamentGrounds.java diff --git a/Mage.Sets/src/mage/cards/t/TournamentGrounds.java b/Mage.Sets/src/mage/cards/t/TournamentGrounds.java new file mode 100644 index 0000000000..bc357fbe08 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TournamentGrounds.java @@ -0,0 +1,51 @@ +package mage.cards.t; + +import mage.Mana; +import mage.abilities.mana.ColorlessManaAbility; +import mage.abilities.mana.ConditionalColoredManaAbility; +import mage.abilities.mana.conditional.ConditionalSpellManaBuilder; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterSpell; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.SubtypePredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TournamentGrounds extends CardImpl { + + private static final FilterSpell filter = new FilterSpell("a Knight or Equipment spell"); + + static { + filter.add(Predicates.or( + new SubtypePredicate(SubType.KNIGHT), + new SubtypePredicate(SubType.EQUIPMENT) + )); + } + + public TournamentGrounds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // {T}: Add {C}. + this.addAbility(new ColorlessManaAbility()); + + // {T}: Add {R}, {W}, or {B}. Spend this mana only to cast a Knight or Equipment spell. + this.addAbility(new ConditionalColoredManaAbility(Mana.RedMana(1), new ConditionalSpellManaBuilder(filter))); + this.addAbility(new ConditionalColoredManaAbility(Mana.WhiteMana(1), new ConditionalSpellManaBuilder(filter))); + this.addAbility(new ConditionalColoredManaAbility(Mana.BlackMana(1), new ConditionalSpellManaBuilder(filter))); + } + + private TournamentGrounds(final TournamentGrounds card) { + super(card); + } + + @Override + public TournamentGrounds copy() { + return new TournamentGrounds(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 35fdbed4cc..bfbf479d26 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -82,6 +82,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Thornwood Falls", 313, Rarity.COMMON, mage.cards.t.ThornwoodFalls.class)); cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.class)); cards.add(new SetCardInfo("Tome of Legends", 332, Rarity.RARE, mage.cards.t.TomeOfLegends.class)); + cards.add(new SetCardInfo("Tournament Grounds", 248, Rarity.UNCOMMON, mage.cards.t.TournamentGrounds.class)); cards.add(new SetCardInfo("Wind-Scarred Crag", 308, Rarity.COMMON, mage.cards.w.WindScarredCrag.class)); cards.add(new SetCardInfo("Wintermoor Commander", 205, Rarity.UNCOMMON, mage.cards.w.WintermoorCommander.class)); cards.add(new SetCardInfo("Wishful Merfolk", 73, Rarity.COMMON, mage.cards.w.WishfulMerfolk.class)); From bf1fc29f071bb20d18bb7a84bb39dd0c0f1c387c Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 11:48:10 -0400 Subject: [PATCH 14/18] Implemented Banish into Fable --- .../src/mage/cards/b/BanishIntoFable.java | 127 ++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 128 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BanishIntoFable.java diff --git a/Mage.Sets/src/mage/cards/b/BanishIntoFable.java b/Mage.Sets/src/mage/cards/b/BanishIntoFable.java new file mode 100644 index 0000000000..285f88d1ce --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BanishIntoFable.java @@ -0,0 +1,127 @@ +package mage.cards.b; + +import mage.abilities.Ability; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.game.permanent.token.KnightToken; +import mage.game.stack.Spell; +import mage.target.common.TargetNonlandPermanent; +import mage.watchers.common.CastFromHandWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BanishIntoFable extends CardImpl { + + public BanishIntoFable(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{W}{U}"); + + // When you cast this spell from your hand, copy it if you control an artifact, then copy it if you control an enchantment. You may choose new targets for the copies. + this.addAbility(new BanishIntoFableTriggeredAbility()); + + // Return target nonland permanent to its owner's hand. You create a 2/2 white Knight creature token with vigilance. + this.getSpellAbility().addEffect(new ReturnToHandTargetEffect()); + this.getSpellAbility().addTarget(new TargetNonlandPermanent()); + this.getSpellAbility().addEffect(new CreateTokenEffect(new KnightToken()) + .setText("You create a 2/2 white Knight creature token with vigilance")); + } + + private BanishIntoFable(final BanishIntoFable card) { + super(card); + } + + @Override + public BanishIntoFable copy() { + return new BanishIntoFable(this); + } +} + +class BanishIntoFableTriggeredAbility extends CastSourceTriggeredAbility { + + BanishIntoFableTriggeredAbility() { + super(null, false); + this.addWatcher(new CastFromHandWatcher()); + this.setRuleAtTheTop(true); + } + + private BanishIntoFableTriggeredAbility(BanishIntoFableTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (!super.checkTrigger(event, game)) { + return false; + } + CastFromHandWatcher watcher = game.getState().getWatcher(CastFromHandWatcher.class); + if (watcher == null || !watcher.spellWasCastFromHand(event.getSourceId())) { + return false; + } + Spell spell = game.getState().getStack().getSpell(event.getSourceId()); + if (spell == null) { + return false; + } + this.getEffects().clear(); + this.addEffect(new BanishIntoFableEffect(spell.getId())); + return true; + } + + @Override + public BanishIntoFableTriggeredAbility copy() { + return new BanishIntoFableTriggeredAbility(this); + } +} + +class BanishIntoFableEffect extends OneShotEffect { + + private final UUID spellId; + + BanishIntoFableEffect(UUID spellId) { + super(Outcome.Benefit); + this.spellId = spellId; + } + + private BanishIntoFableEffect(final BanishIntoFableEffect effect) { + super(effect); + this.spellId = effect.spellId; + } + + @Override + public BanishIntoFableEffect copy() { + return new BanishIntoFableEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Spell spell = game.getSpellOrLKIStack(spellId); + if (spell == null) { + return false; + } + if (game.getBattlefield() + .getAllActivePermanents(source.getControllerId()) + .stream() + .filter(Permanent::isArtifact) + .count() > 0) { + spell.createCopyOnStack(game, source, source.getControllerId(), true); + } + if (game.getBattlefield() + .getAllActivePermanents(source.getControllerId()) + .stream() + .filter(Permanent::isEnchantment) + .count() > 0) { + spell.createCopyOnStack(game, source, source.getControllerId(), true); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index bfbf479d26..5945f8dfb3 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -33,6 +33,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Arcane Signet", 331, Rarity.COMMON, mage.cards.a.ArcaneSignet.class)); cards.add(new SetCardInfo("Arcanist's Owl", 206, Rarity.UNCOMMON, mage.cards.a.ArcanistsOwl.class)); cards.add(new SetCardInfo("Bake into a Pie", 76, Rarity.COMMON, mage.cards.b.BakeIntoAPie.class)); + cards.add(new SetCardInfo("Banish into Fable", 325, Rarity.RARE, mage.cards.b.BanishIntoFable.class)); cards.add(new SetCardInfo("Beanstalk Giant", 149, Rarity.UNCOMMON, mage.cards.b.BeanstalkGiant.class)); cards.add(new SetCardInfo("Belle of the Brawl", 78, Rarity.UNCOMMON, mage.cards.b.BelleOfTheBrawl.class)); cards.add(new SetCardInfo("Chittering Witch", 319, Rarity.RARE, mage.cards.c.ChitteringWitch.class)); From 034f577591e8f2d56f5fcbc2a57deb384aec8897 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 15:04:00 -0400 Subject: [PATCH 15/18] Implemented Animating Faerie --- .../src/mage/cards/a/AnimatingFaerie.java | 66 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 67 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/a/AnimatingFaerie.java diff --git a/Mage.Sets/src/mage/cards/a/AnimatingFaerie.java b/Mage.Sets/src/mage/cards/a/AnimatingFaerie.java new file mode 100644 index 0000000000..d5845a452c --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AnimatingFaerie.java @@ -0,0 +1,66 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.AdventureCard; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AnimatingFaerie extends AdventureCard { + + private static final FilterPermanent filter + = new FilterControlledArtifactPermanent("noncreature artifact you control"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public AnimatingFaerie(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.SORCERY}, "{2}{U}", "Bring to Life", "{2}{U}"); + + this.subtype.add(SubType.FAERIE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Bring to Life + // Target noncreature artifact you control becomes a 0/0 artifact creature. Put four +1/+1 counters on it. + this.getAdventureSpellAbility().addEffect(new AddCardTypeTargetEffect( + Duration.EndOfGame, CardType.ARTIFACT, CardType.CREATURE + ).setText("Target noncreature artifact you control becomes")); + this.getAdventureSpellAbility().addEffect(new SetPowerToughnessTargetEffect( + 0, 0, Duration.EndOfGame + ).setText("a 0/0 artifact creature.")); + this.getAdventureSpellAbility().addEffect(new AddCountersTargetEffect( + CounterType.P1P1.createInstance(4) + ).setText("Put four +1/+1 counters on it.")); + this.getAdventureSpellAbility().addTarget(new TargetPermanent(filter)); + } + + private AnimatingFaerie(final AnimatingFaerie card) { + super(card); + } + + @Override + public AnimatingFaerie copy() { + return new AnimatingFaerie(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 5945f8dfb3..5dc5547eec 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -30,6 +30,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Alela, Artful Provocateur", 324, Rarity.MYTHIC, mage.cards.a.AlelaArtfulProvocateur.class)); cards.add(new SetCardInfo("All That Glitters", 2, Rarity.UNCOMMON, mage.cards.a.AllThatGlitters.class)); + cards.add(new SetCardInfo("Animating Faerie", 38, Rarity.UNCOMMON, mage.cards.a.AnimatingFaerie.class)); cards.add(new SetCardInfo("Arcane Signet", 331, Rarity.COMMON, mage.cards.a.ArcaneSignet.class)); cards.add(new SetCardInfo("Arcanist's Owl", 206, Rarity.UNCOMMON, mage.cards.a.ArcanistsOwl.class)); cards.add(new SetCardInfo("Bake into a Pie", 76, Rarity.COMMON, mage.cards.b.BakeIntoAPie.class)); From 10aac8ee3878dc38093f30a914024ace76719c89 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 15:21:01 -0400 Subject: [PATCH 16/18] Implemented Workshop Elders --- .../src/mage/cards/w/WorkshopElders.java | 77 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 78 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/w/WorkshopElders.java diff --git a/Mage.Sets/src/mage/cards/w/WorkshopElders.java b/Mage.Sets/src/mage/cards/w/WorkshopElders.java new file mode 100644 index 0000000000..c1f6d26438 --- /dev/null +++ b/Mage.Sets/src/mage/cards/w/WorkshopElders.java @@ -0,0 +1,77 @@ +package mage.cards.w; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.BeginningOfCombatTriggeredAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.continuous.SetPowerToughnessTargetEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.counters.CounterType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterArtifactCreaturePermanent; +import mage.filter.common.FilterControlledArtifactPermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.CardTypePredicate; +import mage.target.TargetPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class WorkshopElders extends CardImpl { + + private static final FilterPermanent filter + = new FilterArtifactCreaturePermanent("artifact creatures"); + private static final FilterPermanent filter2 + = new FilterControlledArtifactPermanent("noncreature artifact you control"); + + static { + filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE))); + } + + public WorkshopElders(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(4); + this.toughness = new MageInt(4); + + // Artifact creatures you control have flying. + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledEffect( + FlyingAbility.getInstance(), Duration.WhileOnBattlefield, filter + ))); + + // At the beginning of combat on your turn, you may have target noncreature artifact you control become a 0/0 artifact creature. If you do, put four +1/+1 counters on it. + Ability ability = new BeginningOfCombatTriggeredAbility(new AddCardTypeTargetEffect( + Duration.EndOfGame, CardType.ARTIFACT, CardType.CREATURE + ).setText("have target noncreature artifact you control become"), TargetController.YOU, true); + ability.addEffect(new SetPowerToughnessTargetEffect( + 0, 0, Duration.EndOfGame + ).setText("a 0/0 artifact creature.")); + ability.addEffect(new AddCountersTargetEffect( + CounterType.P1P1.createInstance(4) + ).setText("If you do, put four +1/+1 counters on it.")); + ability.addTarget(new TargetPermanent(filter2)); + this.addAbility(ability); + } + + private WorkshopElders(final WorkshopElders card) { + super(card); + } + + @Override + public WorkshopElders copy() { + return new WorkshopElders(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 5dc5547eec..d4bdebf01e 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -89,6 +89,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Wintermoor Commander", 205, Rarity.UNCOMMON, mage.cards.w.WintermoorCommander.class)); cards.add(new SetCardInfo("Wishful Merfolk", 73, Rarity.COMMON, mage.cards.w.WishfulMerfolk.class)); cards.add(new SetCardInfo("Witching Well", 74, Rarity.COMMON, mage.cards.w.WitchingWell.class)); + cards.add(new SetCardInfo("Workshop Elders", 318, Rarity.RARE, mage.cards.w.WorkshopElders.class)); // This is here to prevent the incomplete adventure implementation from causing problems and will be removed cards.removeIf(setCardInfo -> AdventureCard.class.isAssignableFrom(setCardInfo.getCardClass())); From 9c948582d97ce7407e098cbe3fd3751f68833ce2 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 15:38:40 -0400 Subject: [PATCH 17/18] Implemented Piper of the Swarm --- .../src/mage/cards/p/PiperOfTheSwarm.java | 72 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 73 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/p/PiperOfTheSwarm.java diff --git a/Mage.Sets/src/mage/cards/p/PiperOfTheSwarm.java b/Mage.Sets/src/mage/cards/p/PiperOfTheSwarm.java new file mode 100644 index 0000000000..ceac31b061 --- /dev/null +++ b/Mage.Sets/src/mage/cards/p/PiperOfTheSwarm.java @@ -0,0 +1,72 @@ +package mage.cards.p; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostControlledEffect; +import mage.abilities.effects.common.continuous.GainControlTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.permanent.token.RatToken; +import mage.target.common.TargetControlledPermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class PiperOfTheSwarm extends CardImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.RAT, "Rats"); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent(SubType.RAT, "Rats"); + + public PiperOfTheSwarm(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); + + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARLOCK); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Rats you control have menace. + this.addAbility(new SimpleStaticAbility( + new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter) + )); + + // {1}{B}, {T}: Create a 1/1 black Rat creature token. + Ability ability = new SimpleActivatedAbility( + new CreateTokenEffect(new RatToken()), new ManaCostsImpl("{1}{B}") + ); + ability.addCost(new TapSourceCost()); + this.addAbility(ability); + + // {2}{B}{B}, {T}, Sacrifice three Rats: Gain control of target creature. + ability = new SimpleActivatedAbility( + new GainControlTargetEffect(Duration.Custom), new ManaCostsImpl("{2}{B}{B}") + ); + ability.addCost(new TapSourceCost()); + ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(3, filter2))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + private PiperOfTheSwarm(final PiperOfTheSwarm card) { + super(card); + } + + @Override + public PiperOfTheSwarm copy() { + return new PiperOfTheSwarm(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index d4bdebf01e..2d332f4334 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -64,6 +64,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class)); cards.add(new SetCardInfo("Oko, Thief of Crowns", 197, Rarity.MYTHIC, mage.cards.o.OkoThiefOfCrowns.class)); cards.add(new SetCardInfo("Order of Midnight", 99, Rarity.UNCOMMON, mage.cards.o.OrderOfMidnight.class)); + cards.add(new SetCardInfo("Piper of the Swarm", 100, Rarity.RARE, mage.cards.p.PiperOfTheSwarm.class)); cards.add(new SetCardInfo("Rankle, Master of Pranks", 101, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Rosethorn Acolyte", 174, Rarity.COMMON, mage.cards.r.RosethornAcolyte.class)); cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); From df9f05a1323340dc492ede04a2d86b84ec4e533d Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Sat, 7 Sep 2019 17:01:01 -0400 Subject: [PATCH 18/18] Implemented Midnight Clock --- Mage.Sets/src/mage/cards/m/MidnightClock.java | 141 ++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 142 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/m/MidnightClock.java diff --git a/Mage.Sets/src/mage/cards/m/MidnightClock.java b/Mage.Sets/src/mage/cards/m/MidnightClock.java new file mode 100644 index 0000000000..5b79870930 --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MidnightClock.java @@ -0,0 +1,141 @@ +package mage.cards.m; + +import mage.abilities.Ability; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.mana.BlueManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.TargetController; +import mage.constants.Zone; +import mage.counters.CounterType; +import mage.game.Game; +import mage.game.events.GameEvent; +import mage.game.permanent.Permanent; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MidnightClock extends CardImpl { + + public MidnightClock(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{U}"); + + // {T}: Add {U}. + this.addAbility(new BlueManaAbility()); + + // {2}{U}: Put an hour counter on Midnight Clock. + this.addAbility(new SimpleActivatedAbility( + new AddCountersSourceEffect(CounterType.HOUR.createInstance()), new ManaCostsImpl("{2}{U}") + )); + + // At the beginning of each upkeep, put an hour counter on Midnight Clock. + this.addAbility(new BeginningOfUpkeepTriggeredAbility( + new AddCountersSourceEffect(CounterType.HOUR.createInstance()), TargetController.ANY, false + )); + + // When the twelfth hour counter is put on Midnight Clock, shuffle your hand and graveyard into your library, then draw seven cards. Exile Midnight Clock. + this.addAbility(new MidnightClockTriggeredAbility()); + } + + private MidnightClock(final MidnightClock card) { + super(card); + } + + @Override + public MidnightClock copy() { + return new MidnightClock(this); + } +} + +class MidnightClockTriggeredAbility extends TriggeredAbilityImpl { + + MidnightClockTriggeredAbility() { + super(Zone.ALL, new MidnightClockEffect(), false); + } + + private MidnightClockTriggeredAbility(final MidnightClockTriggeredAbility ability) { + super(ability); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.COUNTER_ADDED; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + if (event.getTargetId().equals(getSourceId()) + && event.getData().equals(CounterType.HOUR.getName())) { + int amountAdded = event.getAmount(); + int hourCounters = amountAdded; + Permanent sourcePermanent = game.getPermanent(getSourceId()); + if (sourcePermanent == null) { + sourcePermanent = game.getPermanentEntering(getSourceId()); + } + if (sourcePermanent != null) { + hourCounters = sourcePermanent.getCounters(game).getCount(CounterType.HOUR); + } + return hourCounters - amountAdded < 12 + && 12 <= hourCounters; + } + return false; + } + + @Override + public MidnightClockTriggeredAbility copy() { + return new MidnightClockTriggeredAbility(this); + } + + @Override + public String getRule() { + return "When the twelfth hour counter is put on {this}, " + + "shuffle your hand and graveyard into your library, " + + "then draw seven cards. Exile {this}."; + } +} + +class MidnightClockEffect extends OneShotEffect { + + private static final Effect effect = new ExileSourceEffect(); + + MidnightClockEffect() { + super(Outcome.Benefit); + } + + private MidnightClockEffect(final MidnightClockEffect effect) { + super(effect); + } + + @Override + public MidnightClockEffect copy() { + return new MidnightClockEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + Cards cards = new CardsImpl(player.getHand()); + cards.addAll(player.getGraveyard()); + player.putCardsOnTopOfLibrary(cards, game, source, false); + player.shuffleLibrary(source, game); + player.drawCards(7, game); + return effect.apply(game, source); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 2d332f4334..fa85bd63ce 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -62,6 +62,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Lovestruck Beast", 165, Rarity.RARE, mage.cards.l.LovestruckBeast.class)); cards.add(new SetCardInfo("Mace of the Valiant", 314, Rarity.RARE, mage.cards.m.MaceOfTheValiant.class)); cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class)); + cards.add(new SetCardInfo("Midnight Clock", 54, Rarity.RARE, mage.cards.m.MidnightClock.class)); cards.add(new SetCardInfo("Oko, Thief of Crowns", 197, Rarity.MYTHIC, mage.cards.o.OkoThiefOfCrowns.class)); cards.add(new SetCardInfo("Order of Midnight", 99, Rarity.UNCOMMON, mage.cards.o.OrderOfMidnight.class)); cards.add(new SetCardInfo("Piper of the Swarm", 100, Rarity.RARE, mage.cards.p.PiperOfTheSwarm.class));