From 7de85069237bb082aec4a0e5a941c6374d9126e6 Mon Sep 17 00:00:00 2001 From: jmharmon <37360760+jmharmon@users.noreply.github.com> Date: Wed, 4 Sep 2019 18:49:36 -0700 Subject: [PATCH 01/10] Implement Warlock creature type --- Mage/src/main/java/mage/constants/SubType.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index 449a6d7c1e..a917fb171f 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -353,6 +353,7 @@ public enum SubType { VOLVER("Volver", SubTypeSet.CreatureType), // W WALL("Wall", SubTypeSet.CreatureType), + WARLOCK("Warlock", SubTypeSet.CreatureType), WARRIOR("Warrior", SubTypeSet.CreatureType), WEEQUAY("Weequay", SubTypeSet.CreatureType, true), WEIRD("Weird", SubTypeSet.CreatureType), From e4212423656a3f6beca3492210bf9e1635e93274 Mon Sep 17 00:00:00 2001 From: jmharmon <37360760+jmharmon@users.noreply.github.com> Date: Wed, 4 Sep 2019 18:51:46 -0700 Subject: [PATCH 02/10] Implement a few more cards --- Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 554e5d8929..b94922cb9c 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -28,10 +28,14 @@ public final class ThroneOfEldraine extends ExpansionSet { this.maxCardNumberInBooster = 269; // unconfirmed for now cards.add(new SetCardInfo("Arcane Signet", 331, Rarity.COMMON, mage.cards.a.ArcaneSignet.class)); + cards.add(new SetCardInfo("Bake into a Pie", 76, Rarity.COMMON, mage.cards.b.BakeIntoAPie.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)); cards.add(new SetCardInfo("Crystal Slipper", 119, Rarity.COMMON, mage.cards.c.CrystalSlipper.class)); + cards.add(new SetCardInfo("Fireborn Knight", 210, Rarity.UNCOMMON, mage.cards.f.FirebornKnight.class)); cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class)); 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("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class)); cards.add(new SetCardInfo("Rankle, Master of Pranks", 356, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); From cc58b9fb2d183528934c7d6d4a1f02f29c642c7a Mon Sep 17 00:00:00 2001 From: jmharmon <37360760+jmharmon@users.noreply.github.com> Date: Wed, 4 Sep 2019 18:56:22 -0700 Subject: [PATCH 03/10] Implement Fireborn Knight --- .../src/mage/cards/f/FirebornKnight.java | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/f/FirebornKnight.java diff --git a/Mage.Sets/src/mage/cards/f/FirebornKnight.java b/Mage.Sets/src/mage/cards/f/FirebornKnight.java new file mode 100644 index 0000000000..7a2d0e8298 --- /dev/null +++ b/Mage.Sets/src/mage/cards/f/FirebornKnight.java @@ -0,0 +1,47 @@ +package mage.cards.f; + +import mage.MageInt; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +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 java.util.UUID; + +/** + * @author jmharmon + */ + +public final class FirebornKnight extends CardImpl { + + public FirebornKnight(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R/W}{R/W}{R/W}{R/W}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.KNIGHT); + + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // Double strike + this.addAbility(DoubleStrikeAbility.getInstance()); + + // {R/W}{R/W}{R/W}{R/W}: Fireborn Knight gets +1/+1 until end of turn. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 1, Duration.EndOfTurn), + new ManaCostsImpl("{R/W}{R/W}{R/W}{R/W}"))); + } + + public FirebornKnight(final FirebornKnight card) { + super(card); + } + + @Override + public FirebornKnight copy() { + return new FirebornKnight(this); + } +} From 7103791d86aba408d6dbfdd5d31d494baef75fc8 Mon Sep 17 00:00:00 2001 From: jmharmon <37360760+jmharmon@users.noreply.github.com> Date: Wed, 4 Sep 2019 18:57:11 -0700 Subject: [PATCH 04/10] Implement Chittering Witch --- .../src/mage/cards/c/ChitteringWitch.java | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/ChitteringWitch.java diff --git a/Mage.Sets/src/mage/cards/c/ChitteringWitch.java b/Mage.Sets/src/mage/cards/c/ChitteringWitch.java new file mode 100644 index 0000000000..645f8bf62f --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChitteringWitch.java @@ -0,0 +1,60 @@ +package mage.cards.c; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.dynamicvalue.common.OpponentsCount; +import mage.abilities.effects.Effect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.continuous.BoostTargetEffect; +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 static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT; +import mage.game.permanent.token.RatToken; +import mage.target.common.TargetControlledCreaturePermanent; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author jmharmon + */ + +public final class ChitteringWitch extends CardImpl { + + public ChitteringWitch(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}"); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.WARLOCK); + + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // When Chittering Witch enters the battlefield, create a number of 1/1 black Rat creature tokens equal to the number of opponents you have. + Effect effect = new CreateTokenEffect(new RatToken(), OpponentsCount.instance); + effect.setText("create a number of 1/1 black Rat creature tokens equal to the number of opponents you have"); + this.addAbility(new EntersBattlefieldTriggeredAbility(effect)); + + // {1}{B}, Sacrifice a creature: Target creature gets -2/-2 until end of turn. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(-2, -2, Duration.EndOfTurn), new ManaCostsImpl("{1}{B}")); + ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT))); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public ChitteringWitch(final ChitteringWitch card) { + super(card); + } + + @Override + public ChitteringWitch copy() { + return new ChitteringWitch(this); + } +} From 9346f3ec833a92d620dd4f563c5fb75812d742c5 Mon Sep 17 00:00:00 2001 From: jmharmon <37360760+jmharmon@users.noreply.github.com> Date: Wed, 4 Sep 2019 18:58:12 -0700 Subject: [PATCH 05/10] Implement Bake into a Pie --- Mage.Sets/src/mage/cards/b/BakeIntoAPie.java | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/b/BakeIntoAPie.java diff --git a/Mage.Sets/src/mage/cards/b/BakeIntoAPie.java b/Mage.Sets/src/mage/cards/b/BakeIntoAPie.java new file mode 100644 index 0000000000..769b503759 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BakeIntoAPie.java @@ -0,0 +1,36 @@ +package mage.cards.b; + +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.game.permanent.token.custom.FoodToken; +import mage.target.common.TargetCreaturePermanent; + +import java.util.UUID; + +/** + * @author jmharmon + */ + +public final class BakeIntoAPie extends CardImpl { + + public BakeIntoAPie(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}{B}"); + + // Destroy target creature. Create a Food token. + this.getSpellAbility().addTarget(new TargetCreaturePermanent()); + this.getSpellAbility().addEffect(new DestroyTargetEffect()); + this.getSpellAbility().addEffect(new CreateTokenEffect(new FoodToken(), 1)); + } + + public BakeIntoAPie(final BakeIntoAPie card) { + super(card); + } + + @Override + public BakeIntoAPie copy() { + return new BakeIntoAPie(this); + } +} From 100f623df9529c329d0765e0092d8b4c4c639cdd Mon Sep 17 00:00:00 2001 From: jmharmon <37360760+jmharmon@users.noreply.github.com> Date: Wed, 4 Sep 2019 18:59:03 -0700 Subject: [PATCH 06/10] Implement Heraldic Banner --- .../src/mage/cards/h/HeraldicBanner.java | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/h/HeraldicBanner.java diff --git a/Mage.Sets/src/mage/cards/h/HeraldicBanner.java b/Mage.Sets/src/mage/cards/h/HeraldicBanner.java new file mode 100644 index 0000000000..6e40a48304 --- /dev/null +++ b/Mage.Sets/src/mage/cards/h/HeraldicBanner.java @@ -0,0 +1,83 @@ +package mage.cards.h; + +import mage.ObjectColor; +import mage.abilities.Ability; +import mage.abilities.common.AsEntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.ChooseColorEffect; +import mage.abilities.effects.mana.AddManaChosenColorEffect; +import mage.abilities.mana.SimpleManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterCreaturePermanent; +import mage.game.Game; +import mage.game.permanent.Permanent; + +import java.util.UUID; + +/** + * @author jmharmon + */ + +public final class HeraldicBanner extends CardImpl { + + public HeraldicBanner(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}"); + + // As Heraldic Banner enters the battlefield, choose a color. + this.addAbility(new AsEntersBattlefieldAbility(new ChooseColorEffect(Outcome.Benefit))); + + // Creatures you control of the chosen color get +1/+0. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HeraldicBannerEffect())); + + // {T}: Add one mana of the chosen color. + this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new AddManaChosenColorEffect(), new TapSourceCost())); + } + + public HeraldicBanner(final HeraldicBanner card) { + super(card); + } + + @Override + public HeraldicBanner copy() { + return new HeraldicBanner(this); + } +} + +class HeraldicBannerEffect extends ContinuousEffectImpl { + + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); + + public HeraldicBannerEffect() { + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.ModifyPT_7c, Outcome.BoostCreature); + staticText = "Creatures you control of the chosen color get +1/+0"; + } + + public HeraldicBannerEffect(final HeraldicBannerEffect effect) { + super(effect); + } + + @Override + public HeraldicBannerEffect copy() { + return new HeraldicBannerEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent != null) { + ObjectColor color = (ObjectColor) game.getState().getValue(permanent.getId() + "_color"); + if (color != null) { + for (Permanent perm : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { + if (perm.getColor(game).contains(color)) { + perm.addPower(1); + } + } + } + } + return true; + } +} From f39495f3104312fc8fbb4409e53ab8f1a55a2bd9 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 4 Sep 2019 22:40:31 -0400 Subject: [PATCH 07/10] updated ELD spoiler --- Utils/mtg-cards-data.txt | 42 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 0116f0b580..af31f2dd96 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -35993,26 +35993,60 @@ Island|Commander 2019|291|C||Basic Land - Island|||({T}: Add {U}.)| Swamp|Commander 2019|294|C||Basic Land - Swamp|||({T}: Add {B}.)| Mountain|Commander 2019|297|C||Basic Land - Mountain|||({T}: Add {R}.)| Forest|Commander 2019|300|C||Basic Land - Forest|||({T}: Add {G}.)| +Silverflame Ritual|Throne of Eldraine|30|C|{3}{W}|Sorcery|||Put a +1/+1 counter on each creature you control.$Adamant — If at least three white mana was spent to cast this spell, creatures you controol gain vigilance until end of turn.| Faerie Vandal|Throne of Eldraine|45|U|{1}{U}|Creature - Faerie Rogue|1|2|Flash$Flying$Whenever you draw your second card each turn, put a +1/+1 counter on Faerie Vandal.| Run Away Together|Throne of Eldraine|62|C|{1}{U}|Instant|||Choose two target creatures controlled by different players. Return those creatures to their owners' hands.| Tome Raider|Throne of Eldraine|68|C|{2}{U}|Creature - Faerie|1|1|Flying$When Tome Raider enters the battlefield, draw a card.| Wishful Merfolk|Throne of Eldraine|73|C|{1}{U}|Creature - Merfolk|3|2|Defender${1}{U}: Wishful Merfolk loses defender and becomes a Human until end of turn.| Witching Well|Throne of Eldraine|74|C|{U}|Artifact|||When Witching Well enters the battlefield, scry 2.${3}{U}, Sacrifice Witching Well: Draw two cards.| +Bake into a Pie|Throne of Eldraine|76|C|{2}{B}{B}|Instant|||Destroy target creature. Create a Food token.| Eye Collector|Throne of Eldraine|86|C|{B}|Creature - Faerie|1|1|Flying$Whenever Eye Collector deals combat damage to a player, each player puts the top card of their library into their graveyard.| +Foulmire Knight|Throne of Eldraine|90|U|{B}|Creature - Zombie Knight|1|1|Deathtouch| +Profane Insight|Throne of Eldraine|90|U|{2}{B}|Instant - Adventure|1|1|You draw a card and you lose 1 life.| +Alter Fate|Throne of Eldraine|99|U|{1}{B}|Sorcery - Adventure|2|2|Return target creature card from your graveyard to your hand.| +Order of Midnight|Throne of Eldraine|99|U|{1}{B}|Creature - Human Knight|2|2|Flying$Order of Midnight can't block.| +Curry Favor|Throne of Eldraine|105|C|{B}|Sorcery - Adventure|2|1|You gain X life and each opponent loses X life, where X is the number of Knights you control.| +Smitten Swordmaster|Throne of Eldraine|105|C|{1}{B}|Creature - Human Knight|2|1|Lifelink| Syr Konrad, the Grim|Throne of Eldraine|107|U|{3}{B}{B}|Legendary Creature - Human Knight|5|4|Whenever another creature dies, or a creature card is put into a graveyard from anywhere other than the battlefield, or a creature card leaves your graveyard, Syr Konrad, the Grim deals 1 damage to each opponent.${1}{B}: Each player puts the top card of their library into their graveyard.| Crystal Slipper|Throne of Eldraine|119|C|{1}{R}|Artifact - Equipment|||Equipped creature gets +1/+0 and has haste.$Equip {1}| +Embereth Paladin|Throne of Eldraine|121|C|{3}{R}|Creature - Human Knight|4|1|Haste$Adamant — If at least three red mana was spent to cast this spell, Embereth Paladin enters the battlefield with a +1/+1 counter on it.| +Slaying Fire|Throne of Eldraine|143|C|{2}{R}|Instant|||Slaying Fire deals 3 damage to any target.$Adamant — If at least three red mana was spent to cast this spell, it deals 4 damage instead.| +Beanstalk Giant|Throne of Eldraine|149|U|{6}{G}|Creature - Giant|*|*|Beanstalk Giant's power and toughness are each equal to the number of lands you control.| +Fertile Footsteps|Throne of Eldraine|149|U|{2}{G}|Sorcery - Adventure|*|*|Search your library for a basic land card, put it onto the battlefield, then shuffle your library.| Gilded Goose|Throne of Eldraine|160|R|{G}|Creature - Bird|0|2|Flying$When Gilded Goose enters the battlefield, create a Food token.${1}{G}, {T}: Create a Food token.${T}, Sacrifice a Food: Add one mana of any color.| Maraleaf Pixie|Throne of Eldraine|196|U|{G}{U}|Creature - Faerie|2|2|Flying${T}: Add {G} or {U}.| Oko, Thief of Crowns|Throne of Eldraine|197|M|{1}{G}{U}|Legendary Planeswalker - Oko|4|+2: Create a Food token.$+1: Target artifact or creature loses all abilities and becomes a green Elk creature with base power and toughness 3/3.$−5: Exchange control of target artifact or creature you control and target creature an opponent controls with power 3 or less.| Wintermoor Commander|Throne of Eldraine|205|U|{W}{B}|Creature - Human Knight|2|*|Deathtouch$Wintermoor Commander's toughness is equal to the number of Knights you control.$Whenever Wintermoor Commander attacks, another target Knight you control gains indestructible until end of turn.| +Fireborn Knight|Throne of Eldraine|210|U|{R/W}{R/W}{R/W}{R/W}|Creature - Human Knight|2|3|Double strike${R/W}{R/W}{R/W}{R/W}: Fireborn Knight gets +1/+1 until end of turn.| Golden Egg|Throne of Eldraine|220|C|{2}|Artifact - Food|||When Golden Egg enters the battlefield, draw a card.${1}, {T}: Sacrifice Golden Egg: Add one mana of any color.${2}, {T}, Sacrifice Golden Egg: You gain 3 life.| +Heraldic Banner|Throne of Eldraine|222|U|{3}|Artifact|||As Heraldic Banner enters the battlefield, choose a color.$Creatures you control of the chosen color get +1/+0.${T}: Add one mana of the chosen color.| Tournament Grounds|Throne of Eldraine|248|U||Land|||{T}: Add {C}.${T}: Add {R}, {W}, or {B}. Spend this mana only to cast a Knight or Equipment spell.| Witch's Cottage|Throne of Eldraine|249|C||Land - Swamp|||({T}: Add {B}.)$Witch's Cottage enters the battlefield tapped unless you control three or more other Swamps.$When Witch's Cottage enters the battlefield untapped, you may put target creature card from your graveyard on top of your library.| -Embereth Shieldbreaker|Throne of Eldraine|292|U|{1}{R}|Creature - Human Knight|2|1|Battle Display {R}$Sorcery — Adventure$Destroy target artifact.| -Flaxen Intruder|Throne of Eldraine|297|U|{G}|Creature - Human Berserker|1|2|Whenever Flaxen Intruder deals combat damage to a player, you may sacrifice it. When you do, destroy target artifact or enchantment.$Welcome Home {5}{G}{G}$Sorcery — Adventure$Create three 2/2 green Bear creature tokens.| -Lovestruck Beast|Throne of Eldraine|299|R|{2}{G}|Creature - Beast Noble|5|5|Lovestruck Beast can't attack unless you control a 1/1 creature.$Heart's Desire {G}$Sorcery — Adventure$Create a 1/1 white Human creature token.| +Garruk, Cursed Huntsman|Throne of Eldraine|270|M|{4}{B}{G}|Legendary Planeswalker - Garruk|5|0: Create two 2/2 black and green Wolf creature tokens with "When this creature dies, put a loyalty counter on each Garruk you control."$−3: Destroy target creature. Draw a card.$−6: You get an emblem with "Creatures you control get +3/+3 and have trample."| +Battle Display|Throne of Eldraine|292|U|{R}|Sorcery - Adventure|2|1|Destroy target artifact.| +Embereth Shieldbreaker|Throne of Eldraine|292|U|{1}{R}|Creature - Human Knight|2|1|| +Flaxen Intruder|Throne of Eldraine|297|U|{G}|Creature - Human Berserker|1|2|Whenever Flaxen Intruder deals combat damage to a player, you may sacrifice it. When you do, destroy target artifact or enchantment.| +Welcome Home|Throne of Eldraine|297|U|{5}{G}{G}|Sorcery - Adventure|1|2|Create three 2/2 green Bear creature tokens.| +Heart's Desire|Throne of Eldraine|299|R|{G}|Sorcery - Adventure|5|5|Create a 1/1 white Human creature token.| +Lovestruck Beast|Throne of Eldraine|299|R|{2}{G}|Creature - Beast Noble|5|5|Lovestruck Beast can't attack unless you control a 1/1 creature.| +Mace of the Valiant|Throne of Eldraine|314|R|{2}{W}|Artifact - Equipment|||Equipped creature gets +1/+1 for each charge counter on Mace of the Valiant and has vigilance.$Whenever a creature enters the battlefield under your control, put a charge counter on Mace of the Valiant.$Equip {3}| +Silverwing Squadron|Throne of Eldraine|315|R|{5}{W}|Creature - Human Knight|*|*|Flying, vigilance$Silverwing Squadron's power and toughness are each equal to the number of creatures you control.$Whenever Silverwing Squadron attacks, create a number of 2/2 white Knight creature tokens with vigilance equal to the number of opponents you have.| +Shimmer Dragon|Throne of Eldraine|317|R|{4}{U}{U}|Creature - Dragon|5|6|Flying$As long as you control four or more artifacts, Shimmer Dragon has hexproof.$Tap two untapped artifacts you control: Draw a card.| +Workshop Elders|Throne of Eldraine|318|R|{6}{U}|Creature - Human Artificer|4|4|Artifact creatures you control have flying.$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.| +Chittering Witch|Throne of Eldraine|319|R|{3}{B}|Creature - Human Warlock|2|2|When Chittering Witch enters the battlefield, create a number of 1/1 black Rat creature tokens equal to the number of opponents you have.${1}{B}, Sacrifice a creature: Target creature gets -2/-2 until end of turn.| +Embereth Skyblazer|Throne of Eldraine|321|R|{3}{R}|Creature - Human Knight|4|3|As long as it's your turn, Embereth Skyblazer has flying.$Whenever Embereth Skyblazer attacks, you may pay {2}{R}. If you do, creatures you control get +X/+0 until end of turn, where X is the number of opponents you have.| +Steelbane Hydra|Throne of Eldraine|322|R|{X}{G}{G}|Creature - Turtle Hydra|||Steelbane Hydra enters the battlefield with X +1/+1 counters on it.${2}{G}, Remove a +1/+1 counter from Steelbane Hydra: Destroy target artifact or enchantment.| +Thorn Mammoth|Throne of Eldraine|323|R|{5}{G}{G}|Creature - Elephant|6|6|Trample$Whenever Thorn Mammoth or another creature enters the battlefield under your control, Thorn Mammoth fights up to one target creature you don't control.| +Alela, Artful Provocateur|Throne of Eldraine|324|M|{1}{W}{U}{B}|Legendary Creature - Faerie Warlock|2|3|Flying, deathtouch, lifelink$Other creatures you control with flying get +1/+0.$Whenever you cast an artifact or enchantment spell, create a 1/1 blue Faerie creature token with flying.| +Banish into Fable|Throne of Eldraine|325|R|{4}{W}{U}|Instant|||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.$Return target nonland permanent to its owner's hand. You create a 2/2 white Knight creature token with vigilance.| Chulane, Teller of Tales|Throne of Eldraine|326|M|{2}{G}{W}{U}|Legendary Creature - Human Druid|2|4|Vigilance$Whenever you cast a creature spell, draw a card, then you may put a land card from your hand onto the battlefield.${3}, {T}: Return target creature you control to its owner's hand.| +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.| +Knight's 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 Knight's 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}.| 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.| The Circle of Loyalty|Throne of Eldraine|336|M|{4}{W}{W}|Legendary Artifact|||This spell costs {1} less to cast for each Knight you control.$Creatures you control get +1/+1.$Whenever you cast a legendary spell, create a 2/2 white Knight creature token with vigilance.${3}{W}, {T}: Create a 2/2 white Knight creature token with vigilance.| -Midnight Clock|Throne of Eldraine|346|R|{2}{U}|Artifact|||{T}: Add {U}.${2}{U}: Put an hour counter on Midnight Clock.$At the beginning of your upkeep, put an hour counter on Midnight Clock.$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.| +Midnight Clock|Throne of Eldraine|346|R|{2}{U}|Artifact|||{T}: Add {U}.${2}{U}: Put an hour counter on Midnight Clock.$At the beginning of each upkeep, put an hour counter on Midnight Clock.$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.| +Piper of the Swarm|Throne of Eldraine|355|R|{1}{B}|Creature - Human Warlock|1|3|Rats you control have menace.${1}{B}, {T}: Create a 1/1 black Rat creature token.${2}{B}{B}, {T}, Sacrifice three Rats: Gain control of target creature.| Rankle, Master of Pranks|Throne of Eldraine|356|M|{2}{B}{B}|Legendary Creature - Faerie Rogue|3|3|Flying, haste$Whenever Rankle, Master of Pranks deals combat damage to a player, choose any number —$• Each player discards a card.$• Each player loses 1 life and draws a card.$• Each player sacrifices a creature.| From 3179d351672c68ce1937e0b297942fda0ed2b3d6 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 4 Sep 2019 23:12:11 -0400 Subject: [PATCH 08/10] Implemented Slaying Fire --- Mage.Sets/src/mage/cards/s/SlayingFire.java | 42 ++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + .../condition/common/AdamantCondition.java | 44 +++++++++++++++++++ .../main/java/mage/constants/AbilityWord.java | 3 +- 4 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 Mage.Sets/src/mage/cards/s/SlayingFire.java create mode 100644 Mage/src/main/java/mage/abilities/condition/common/AdamantCondition.java diff --git a/Mage.Sets/src/mage/cards/s/SlayingFire.java b/Mage.Sets/src/mage/cards/s/SlayingFire.java new file mode 100644 index 0000000000..45b715cb31 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SlayingFire.java @@ -0,0 +1,42 @@ +package mage.cards.s; + +import mage.abilities.condition.common.AdamantCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.DamageTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.target.common.TargetAnyTarget; +import mage.watchers.common.ManaSpentToCastWatcher; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SlayingFire extends CardImpl { + + public SlayingFire(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{R}"); + + // Slaying Fire deals 3 damage to any target. + // Adamant — If at least three red mana was spent to cast this spell, it deals 4 damage instead. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new DamageTargetEffect(4), new DamageTargetEffect(3), + AdamantCondition.RED, "{this} deals 3 damage to any target." + + "
Adamant — If at least three red mana was spent to cast this spell, " + + "it deals 4 damage instead." + )); + this.getSpellAbility().addTarget(new TargetAnyTarget()); + this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); + } + + private SlayingFire(final SlayingFire card) { + super(card); + } + + @Override + public SlayingFire copy() { + return new SlayingFire(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index b94922cb9c..d7ff3629c5 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -39,6 +39,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("Rankle, Master of Pranks", 356, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); + cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.COMMON, mage.cards.s.SlayingFire.class)); cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.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)); diff --git a/Mage/src/main/java/mage/abilities/condition/common/AdamantCondition.java b/Mage/src/main/java/mage/abilities/condition/common/AdamantCondition.java new file mode 100644 index 0000000000..63b511921e --- /dev/null +++ b/Mage/src/main/java/mage/abilities/condition/common/AdamantCondition.java @@ -0,0 +1,44 @@ +package mage.abilities.condition.common; + +import mage.Mana; +import mage.abilities.Ability; +import mage.abilities.condition.Condition; +import mage.constants.AbilityType; +import mage.constants.ColoredManaSymbol; +import mage.game.Game; +import mage.watchers.common.ManaSpentToCastWatcher; + +/** + * @author TheElk801 + */ + + +public enum AdamantCondition implements Condition { + WHITE(ColoredManaSymbol.W), + BLUE(ColoredManaSymbol.U), + BLACK(ColoredManaSymbol.B), + RED(ColoredManaSymbol.R), + GREEN(ColoredManaSymbol.G); + + protected ColoredManaSymbol coloredManaSymbol; + + private AdamantCondition(ColoredManaSymbol coloredManaSymbol) { + this.coloredManaSymbol = coloredManaSymbol; + } + + @Override + public boolean apply(Game game, Ability source) { + if (source.getAbilityType() == AbilityType.SPELL) { + return (source.getManaCostsToPay().getPayment().getColor(coloredManaSymbol) > 0); + } + ManaSpentToCastWatcher watcher = game.getState().getWatcher(ManaSpentToCastWatcher.class, source.getSourceId()); + if (watcher == null) { + return false; + } + Mana payment = watcher.getAndResetLastPayment(); + if (payment == null) { + return false; + } + return payment.getColor(coloredManaSymbol) > 2; + } +} diff --git a/Mage/src/main/java/mage/constants/AbilityWord.java b/Mage/src/main/java/mage/constants/AbilityWord.java index 898cc8ea6c..e37da7f9d0 100644 --- a/Mage/src/main/java/mage/constants/AbilityWord.java +++ b/Mage/src/main/java/mage/constants/AbilityWord.java @@ -1,13 +1,12 @@ - package mage.constants; /** - * * @author LevelX2 */ public enum AbilityWord { ADDENDUM("Addendum"), + ADAMANT("Adamant"), BATTALION("Battalion"), BLOODRUSH("Bloodrush"), CHANNEL("Channel"), From 83d95cfe9627a8a5c2335835b2dda8e79a399969 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 4 Sep 2019 23:31:04 -0400 Subject: [PATCH 09/10] Implemented Silverflame Ritual --- .../src/mage/cards/s/SilverflameRitual.java | 75 +++++++++++++++++++ Mage.Sets/src/mage/sets/ThroneOfEldraine.java | 1 + 2 files changed, 76 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/s/SilverflameRitual.java diff --git a/Mage.Sets/src/mage/cards/s/SilverflameRitual.java b/Mage.Sets/src/mage/cards/s/SilverflameRitual.java new file mode 100644 index 0000000000..2095301a80 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SilverflameRitual.java @@ -0,0 +1,75 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.condition.common.AdamantCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SilverflameRitual extends CardImpl { + + public SilverflameRitual(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}"); + + // Put a +1/+1 counter on each creature you control. + this.getSpellAbility().addEffect(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE + )); + + // Adamant — If at least three white mana was spent to cast this spell, creatures you control gain vigilance until end of turn. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new SilverflameRitualEffect(), AdamantCondition.WHITE, + "
Adamant — If at least three white mana was spent to cast this spell, " + + "creatures you control gain vigilance until end of turn." + )); + } + + private SilverflameRitual(final SilverflameRitual card) { + super(card); + } + + @Override + public SilverflameRitual copy() { + return new SilverflameRitual(this); + } +} + +class SilverflameRitualEffect extends OneShotEffect { + + SilverflameRitualEffect() { + super(Outcome.Benefit); + } + + private SilverflameRitualEffect(final SilverflameRitualEffect effect) { + super(effect); + } + + @Override + public SilverflameRitualEffect copy() { + return new SilverflameRitualEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + game.addEffect(new GainAbilityControlledEffect( + VigilanceAbility.getInstance(), Duration.EndOfTurn, + StaticFilters.FILTER_PERMANENT_CREATURE + ), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index d7ff3629c5..8042252774 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -39,6 +39,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("Rankle, Master of Pranks", 356, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); + cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class)); cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.COMMON, mage.cards.s.SlayingFire.class)); cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.class)); cards.add(new SetCardInfo("Wishful Merfolk", 73, Rarity.COMMON, mage.cards.w.WishfulMerfolk.class)); From 6f3bc826ab9210d9c342c2a4d36be85efd4ab603 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 4 Sep 2019 23:33:34 -0400 Subject: [PATCH 10/10] added missing watcher --- Mage.Sets/src/mage/cards/s/SilverflameRitual.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mage.Sets/src/mage/cards/s/SilverflameRitual.java b/Mage.Sets/src/mage/cards/s/SilverflameRitual.java index 2095301a80..c49488678f 100644 --- a/Mage.Sets/src/mage/cards/s/SilverflameRitual.java +++ b/Mage.Sets/src/mage/cards/s/SilverflameRitual.java @@ -15,6 +15,7 @@ import mage.constants.Outcome; import mage.counters.CounterType; import mage.filter.StaticFilters; import mage.game.Game; +import mage.watchers.common.ManaSpentToCastWatcher; import java.util.UUID; @@ -37,6 +38,7 @@ public final class SilverflameRitual extends CardImpl { "
Adamant — If at least three white mana was spent to cast this spell, " + "creatures you control gain vigilance until end of turn." )); + this.getSpellAbility().addWatcher(new ManaSpentToCastWatcher()); } private SilverflameRitual(final SilverflameRitual card) {