From 2640a509f95a80b4a598c570fdd4773289edba8c Mon Sep 17 00:00:00 2001 From: Hans Mackowiak Date: Sun, 13 Jan 2019 14:10:44 +0000 Subject: [PATCH] Sunburst: rewrite using ETB counter --- .../src/main/java/forge/ai/ComputerUtil.java | 4 +- .../java/forge/ai/ComputerUtilCombat.java | 2 +- .../java/forge/ai/ability/ManifestAi.java | 2 +- .../src/main/java/forge/game/card/Card.java | 5 +- .../java/forge/game/card/CardFactoryUtil.java | 53 +++++++------------ .../game/replacement/ReplacementEffect.java | 2 +- .../game/replacement/ReplacementLayer.java | 3 +- .../res/cardsfolder/b/benalish_lancer.txt | 8 +-- .../res/cardsfolder/b/bloodspore_thrinax.txt | 8 +-- .../res/cardsfolder/b/bramblewood_paragon.txt | 7 +-- .../res/cardsfolder/d/dearly_departed.txt | 7 +-- forge-gui/res/cardsfolder/k/kavu_titan.txt | 8 +-- .../res/cardsfolder/m/master_biomancer.txt | 8 +-- .../res/cardsfolder/m/metallic_mimic.txt | 6 +-- .../cardsfolder/m/muzzios_preparations.txt | 5 +- .../res/cardsfolder/o/oath_of_gideon.txt | 6 +-- .../res/cardsfolder/o/oonas_blackguard.txt | 7 +-- .../res/cardsfolder/p/protean_raider.txt | 2 +- .../res/cardsfolder/s/sage_of_fables.txt | 6 +-- .../res/cardsfolder/z/zameck_guildmage.txt | 2 +- 20 files changed, 70 insertions(+), 81 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtil.java b/forge-ai/src/main/java/forge/ai/ComputerUtil.java index 96ec1f25169..d1c5aca39a8 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtil.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtil.java @@ -2847,7 +2847,7 @@ public class ComputerUtil { repParams.put("Source", source); List list = player.getGame().getReplacementHandler().getReplacementList(repParams, - ReplacementLayer.None); + ReplacementLayer.Other); if (Iterables.any(list, CardTraitPredicates.hasParam("AiLogic", "NoLife"))) { return false; @@ -2878,7 +2878,7 @@ public class ComputerUtil { repParams.put("Source", source); List list = player.getGame().getReplacementHandler().getReplacementList(repParams, - ReplacementLayer.None); + ReplacementLayer.Other); if (Iterables.any(list, CardTraitPredicates.hasParam("AiLogic", "NoLife"))) { // no life gain is not negative diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java b/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java index e2393972f59..800f623ca5e 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtilCombat.java @@ -2590,7 +2590,7 @@ public class ComputerUtilCombat { // repParams.put("PreventMap", preventMap); List list = game.getReplacementHandler().getReplacementList(repParams, - ReplacementLayer.None); + ReplacementLayer.Other); return !list.isEmpty(); } diff --git a/forge-ai/src/main/java/forge/ai/ability/ManifestAi.java b/forge-ai/src/main/java/forge/ai/ability/ManifestAi.java index 509ff22f3a0..94a878c8afe 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ManifestAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ManifestAi.java @@ -113,7 +113,7 @@ public class ManifestAi extends SpellAbilityAi { repParams.put("Origin", ZoneType.Library); repParams.put("Destination", ZoneType.Battlefield); repParams.put("Source", sa.getHostCard()); - List list = game.getReplacementHandler().getReplacementList(repParams, ReplacementLayer.None); + List list = game.getReplacementHandler().getReplacementList(repParams, ReplacementLayer.Other); if (!list.isEmpty()) { return false; } diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index a7b361ccb6e..8ded947cd48 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -1051,7 +1051,8 @@ public class Card extends GameEntity implements Comparable { } public final boolean hasConverge() { - return "Count$Converge".equals(getSVar("X")) || "Count$Converge".equals(getSVar("Y")) || hasKeyword("Sunburst"); + return "Count$Converge".equals(getSVar("X")) || "Count$Converge".equals(getSVar("Y")) || + hasKeyword(Keyword.SUNBURST) || hasKeyword("Modular:Sunburst"); } @Override @@ -1594,7 +1595,7 @@ public class Card extends GameEntity implements Comparable { || keyword.equals("Soulbond") || keyword.equals("Partner") || keyword.equals("Retrace") || keyword.equals("Living Weapon") || keyword.equals("Myriad") || keyword.equals("Exploit") || keyword.equals("Changeling") || keyword.equals("Delve") - || keyword.equals("Split second") + || keyword.equals("Split second") || keyword.equals("Sunburst") || keyword.equals("Suspend") // for the ones without amounnt || keyword.equals("Hideaway") || keyword.equals("Ascend") || keyword.equals("Totem armor") || keyword.equals("Battle cry") diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index 6beef16d590..874cf123dcf 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -25,7 +25,6 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import forge.GameCommand; import forge.card.*; import forge.card.mana.ManaAtom; import forge.card.mana.ManaCost; @@ -2099,7 +2098,7 @@ public class CardFactoryUtil { String abStr = "DB$ PutCounter | Defined$ Self | CounterType$ " + splitkw[1] + " | ETB$ True | CounterNum$ " + amount; - if (!StringUtils.isNumeric(amount)) { + if (!StringUtils.isNumeric(amount) && card.hasSVar(amount)) { abStr += " | References$ " + amount; } @@ -3452,12 +3451,10 @@ public class CardFactoryUtil { sb.append(m); sb.append(" (").append(inst.getReminderText()).append(")"); - if ("Sunburst".equals(m)) { - card.setSVar(m, "Count$Converge"); - } - final ReplacementEffect re = makeEtbCounter(sb.toString(), card, intrinsic); - + if ("Sunburst".equals(m)) { + re.getOverridingAbility().setSVar("Sunburst", "Count$Converge"); + } inst.addReplacement(re); } else if (keyword.equals("Rebound")) { String repeffstr = "Event$ Moved | ValidCard$ Card.Self+wasCastFromHand+YouOwn+YouCtrl " @@ -3512,6 +3509,19 @@ public class CardFactoryUtil { String sb = "etbCounter:LORE:1:no Condition:no desc"; final ReplacementEffect re = makeEtbCounter(sb, card, intrinsic); + inst.addReplacement(re); + } else if (keyword.equals("Sunburst")) { + // Rule 702.43a If this object is entering the battlefield as a creature, + // ignoring any type-changing effects that would affect it + CounterType t = card.isCreature() ? CounterType.P1P1 : CounterType.CHARGE; + + StringBuilder sb = new StringBuilder("etbCounter:"); + sb.append(t).append(":Sunburst:no Condition:"); + sb.append("Sunburst (").append(inst.getReminderText()).append(")"); + + final ReplacementEffect re = makeEtbCounter(sb.toString(), card, intrinsic); + re.getOverridingAbility().setSVar("Sunburst", "Count$Converge"); + inst.addReplacement(re); } else if (keyword.equals("Totem armor")) { String repeffstr = "Event$ Destroy | ActiveZones$ Battlefield | ValidCard$ Card.EnchantedBy" @@ -4182,18 +4192,17 @@ public class CardFactoryUtil { String effect = "AB$ PutCounter | Cost$ " + manacost + " ExileFromGrave<1/CARDNAME> " + "| ActivationZone$ Graveyard | ValidTgts$ Creature | CounterType$ P1P1 " + - "| CounterNum$ ScavengeX | SorcerySpeed$ True | References$ ScavengeX " + + "| CounterNum$ ScavengeX | SorcerySpeed$ True " + "| PrecostDesc$ Scavenge | CostDesc$ " + ManaCostParser.parse(manacost) + "| SpellDescription$ (" + inst.getReminderText() + ")"; - card.setSVar("ScavengeX", "Count$CardPower"); - final SpellAbility sa = AbilityFactory.getAbility(effect, card); + sa.setSVar("ScavengeX", "Count$CardPower"); sa.setIntrinsic(intrinsic); sa.setTemporary(!intrinsic); inst.addSpellAbility(sa); - + } else if (keyword.startsWith("Spectacle")) { final String[] k = keyword.split(":"); final Cost cost = new Cost(k[1], false); @@ -4211,28 +4220,6 @@ public class CardFactoryUtil { newSA.setTemporary(!intrinsic); inst.addSpellAbility(newSA); - } else if (keyword.equals("Sunburst") && intrinsic) { - final GameCommand sunburstCIP = new GameCommand() { - private static final long serialVersionUID = 1489845860231758299L; - - @Override - public void run() { - CounterType t = card.isCreature() ? CounterType.P1P1 : CounterType.CHARGE; - card.addCounter(t, card.getSunburstValue(), card.getController(), true); - } - }; - - final GameCommand sunburstLP = new GameCommand() { - private static final long serialVersionUID = -7564420917490677427L; - - @Override - public void run() { - card.setSunburstValue(0); - } - }; - - card.addComesIntoPlayCommand(sunburstCIP); - card.addLeavesPlayCommand(sunburstLP); } else if (keyword.startsWith("Surge")) { final String[] k = keyword.split(":"); final Cost surgeCost = new Cost(k[1], false); diff --git a/forge-game/src/main/java/forge/game/replacement/ReplacementEffect.java b/forge-game/src/main/java/forge/game/replacement/ReplacementEffect.java index 27c8e14e79a..0614d3f4bc3 100644 --- a/forge-game/src/main/java/forge/game/replacement/ReplacementEffect.java +++ b/forge-game/src/main/java/forge/game/replacement/ReplacementEffect.java @@ -39,7 +39,7 @@ public abstract class ReplacementEffect extends TriggerReplacementBase { /** The ID. */ private int id; - private ReplacementLayer layer = ReplacementLayer.None; + private ReplacementLayer layer = ReplacementLayer.Other; /** The has run. */ private boolean hasRun = false; diff --git a/forge-game/src/main/java/forge/game/replacement/ReplacementLayer.java b/forge-game/src/main/java/forge/game/replacement/ReplacementLayer.java index 313bf855f1e..93bd3a33970 100644 --- a/forge-game/src/main/java/forge/game/replacement/ReplacementLayer.java +++ b/forge-game/src/main/java/forge/game/replacement/ReplacementLayer.java @@ -8,8 +8,7 @@ package forge.game.replacement; public enum ReplacementLayer { Control, Copy, - Other, - None; + Other; /** * TODO: Write javadoc for this method. diff --git a/forge-gui/res/cardsfolder/b/benalish_lancer.txt b/forge-gui/res/cardsfolder/b/benalish_lancer.txt index a66b8a14820..2fc850c9c21 100644 --- a/forge-gui/res/cardsfolder/b/benalish_lancer.txt +++ b/forge-gui/res/cardsfolder/b/benalish_lancer.txt @@ -3,9 +3,9 @@ ManaCost:2 W Types:Creature Human Knight PT:2/2 K:Kicker:2 W -R:Event$ Moved | ValidCard$ Card.Self+kicked | Destination$ Battlefield | ReplaceWith$ DBPutCounter | Description$ If CARDNAME was kicked, it enters the battlefield with two +1/+1 counters on it and with first strike. -SVar:DBPutCounter:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P1 | CounterNum$ 2 | SubAbility$ DBPump -SVar:DBPump:DB$ Animate | Defined$ Self | Keywords$ First Strike | Permanent$ True | SubAbility$ DBMoveToPlay -SVar:DBMoveToPlay:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:DBPutCounter:Mandatory::Card.Self+kicked +SVar:DBPutCounter:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P1 | CounterNum$ 2 | SubAbility$ DBPump | SpellDescription$ If CARDNAME was kicked, it enters the battlefield with two +1/+1 counters on it and with first strike. +SVar:DBPump:DB$ Animate | Defined$ Self | Keywords$ First Strike | Permanent$ True +DeckHas:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/benalish_lancer.jpg Oracle:Kicker {2}{W} (You may pay an additional {2}{W} as you cast this spell.)\nIf Benalish Lancer was kicked, it enters the battlefield with two +1/+1 counters on it and with first strike. diff --git a/forge-gui/res/cardsfolder/b/bloodspore_thrinax.txt b/forge-gui/res/cardsfolder/b/bloodspore_thrinax.txt index 5873dca7ecf..0e293948036 100644 --- a/forge-gui/res/cardsfolder/b/bloodspore_thrinax.txt +++ b/forge-gui/res/cardsfolder/b/bloodspore_thrinax.txt @@ -3,9 +3,9 @@ ManaCost:2 G G Types:Creature Lizard PT:2/2 K:Devour:1 -R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Battlefield | ValidCard$ Creature.YouCtrl+Other | ReplaceWith$ AddExtraCounter | Description$ Each other creature you control enters the battlefield with an additional X +1/+1 counters on it, where X is the number of +1/+1 counters on CARDNAME. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ X | References$ X | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.YouCtrl+Other +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ X | References$ X | SpellDescription$ Each other creature you control enters the battlefield with an additional X +1/+1 counters on it, where X is the number of +1/+1 counters on CARDNAME. SVar:X:Count$CardCounters.P1P1 +DeckHas:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/bloodspore_thrinax.jpg -Oracle:Devour 1 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with that many +1/+1 counters on it.)\nEach other creature you control enters the battlefield with an additional X +1/+1 counters on it, where X is the number of +1/+1 counters on Bloodspore Thrinax. \ No newline at end of file +Oracle:Devour 1 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with that many +1/+1 counters on it.)\nEach other creature you control enters the battlefield with an additional X +1/+1 counters on it, where X is the number of +1/+1 counters on Bloodspore Thrinax. diff --git a/forge-gui/res/cardsfolder/b/bramblewood_paragon.txt b/forge-gui/res/cardsfolder/b/bramblewood_paragon.txt index 2cd4cb6de24..19ed4cefb71 100644 --- a/forge-gui/res/cardsfolder/b/bramblewood_paragon.txt +++ b/forge-gui/res/cardsfolder/b/bramblewood_paragon.txt @@ -2,9 +2,10 @@ Name:Bramblewood Paragon ManaCost:1 G Types:Creature Elf Warrior PT:2/2 -R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Battlefield | ValidCard$ Creature.Warrior+YouCtrl+Other | ReplaceWith$ AddExtraCounter | Description$ Each other Warrior creature you control enters the battlefield with an additional +1/+1 counter on it. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.Warrior+YouCtrl+Other +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Each other Warrior creature you control enters the battlefield with an additional +1/+1 counter on it. S:Mode$ Continuous | Affected$ Creature.YouCtrl+counters_GE1_P1P1 | AddKeyword$ Trample | Description$ Each creature you control with a +1/+1 counter on it has trample. +DeckNeeds:Type$Warrior +DeckHas:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/bramblewood_paragon.jpg Oracle:Each other Warrior creature you control enters the battlefield with an additional +1/+1 counter on it.\nEach creature you control with a +1/+1 counter on it has trample. diff --git a/forge-gui/res/cardsfolder/d/dearly_departed.txt b/forge-gui/res/cardsfolder/d/dearly_departed.txt index 9ec1fae20ff..db7322a2bf7 100644 --- a/forge-gui/res/cardsfolder/d/dearly_departed.txt +++ b/forge-gui/res/cardsfolder/d/dearly_departed.txt @@ -3,8 +3,9 @@ ManaCost:4 W W Types:Creature Spirit PT:5/5 K:Flying -R:Event$ Moved | ActiveZones$ Graveyard | Destination$ Battlefield | ValidCard$ Creature.Human+YouCtrl | ReplaceWith$ AddExtraCounter | Description$ As long as CARDNAME is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.Human+YouCtrl +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ As long as CARDNAME is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it. +DeckNeeds:Type$Human +DeckHas:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/dearly_departed.jpg Oracle:Flying\nAs long as Dearly Departed is in your graveyard, each Human creature you control enters the battlefield with an additional +1/+1 counter on it. diff --git a/forge-gui/res/cardsfolder/k/kavu_titan.txt b/forge-gui/res/cardsfolder/k/kavu_titan.txt index 6ca044c4e3d..09d9cd2bd75 100644 --- a/forge-gui/res/cardsfolder/k/kavu_titan.txt +++ b/forge-gui/res/cardsfolder/k/kavu_titan.txt @@ -3,9 +3,9 @@ ManaCost:1 G Types:Creature Kavu PT:2/2 K:Kicker:2 G -R:Event$ Moved | ValidCard$ Card.Self+kicked | Destination$ Battlefield | ReplaceWith$ DBPutCounter | Description$ If CARDNAME was kicked, it enters the battlefield with three +1/+1 counters on it and with trample. -SVar:DBPutCounter:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P1 | CounterNum$ 3 | SubAbility$ Dustwalk -SVar:Dustwalk:DB$ Animate | Defined$ Self | Keywords$ Trample | Permanent$ True | SubAbility$ DBMoveToPlay -SVar:DBMoveToPlay:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:DBPutCounter:Mandatory::Card.Self+kicked +SVar:DBPutCounter:DB$ PutCounter | ETB$ True | Defined$ Self | CounterType$ P1P1 | CounterNum$ 3 | SubAbility$ Dustwalk | SpellDescription$ If CARDNAME was kicked, it enters the battlefield with three +1/+1 counters on it and with trample. +SVar:Dustwalk:DB$ Animate | Defined$ Self | Keywords$ Trample | Permanent$ True +DeckHas:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/kavu_titan.jpg Oracle:Kicker {2}{G} (You may pay an additional {2}{G} as you cast this spell.)\nIf Kavu Titan was kicked, it enters the battlefield with three +1/+1 counters on it and with trample. diff --git a/forge-gui/res/cardsfolder/m/master_biomancer.txt b/forge-gui/res/cardsfolder/m/master_biomancer.txt index 54879327300..3143a74734b 100644 --- a/forge-gui/res/cardsfolder/m/master_biomancer.txt +++ b/forge-gui/res/cardsfolder/m/master_biomancer.txt @@ -2,10 +2,10 @@ Name:Master Biomancer ManaCost:2 G U Types:Creature Elf Wizard PT:2/4 -R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Battlefield | ValidCard$ Creature.YouCtrl+Other | ReplaceWith$ AddExtraCounter | Description$ Each other creature you control enters the battlefield with a number of additional +1/+1 counters on it equal to CARDNAME's power and as a Mutant in addition to its other types. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ X | References$ X | SubAbility$ DBAnimate -SVar:DBAnimate:DB$ Animate | Types$ Mutant | Permanent$ True | Defined$ ReplacedCard | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.YouCtrl+Other +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ X | References$ X | SubAbility$ DBAnimate | SpellDescription$ Each other creature you control enters the battlefield with a number of additional +1/+1 counters on it equal to CARDNAME's power and as a Mutant in addition to its other types. +SVar:DBAnimate:DB$ Animate | Types$ Mutant | Permanent$ True | Defined$ ReplacedCard SVar:X:Count$CardPower +DeckHas:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/master_biomancer.jpg Oracle:Each other creature you control enters the battlefield with a number of additional +1/+1 counters on it equal to Master Biomancer's power and as a Mutant in addition to its other types. diff --git a/forge-gui/res/cardsfolder/m/metallic_mimic.txt b/forge-gui/res/cardsfolder/m/metallic_mimic.txt index ab13f612d59..d653be0da56 100644 --- a/forge-gui/res/cardsfolder/m/metallic_mimic.txt +++ b/forge-gui/res/cardsfolder/m/metallic_mimic.txt @@ -3,10 +3,10 @@ ManaCost:2 Types:Artifact Creature Shapeshifter PT:2/1 K:ETBReplacement:Other:ChooseCT +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.ChosenType+Other+YouCtrl SVar:ChooseCT:DB$ ChooseType | Type$ Creature | AILogic$ MostProminentInComputerDeck | SpellDescription$ As CARDNAME enters the battlefield, choose a creature type. S:Mode$ Continuous | EffectZone$ All | Affected$ Card.Self | CharacteristicDefining$ True | AddType$ ChosenType | Description$ CARDNAME is the chosen type in addition to its other types. -R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Battlefield | ValidCard$ Creature.ChosenType+Other+YouCtrl | ReplaceWith$ AddExtraCounter | Description$ Each other creature you control of the chosen type enters the battlefield with an additional +1/+1 counter on it. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Each other creature you control of the chosen type enters the battlefield with an additional +1/+1 counter on it. +DeckHas:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/metallic_mimic.jpg Oracle:As Metallic Mimic enters the battlefield, choose a creature type.\nMetallic Mimic is the chosen type in addition to its other types.\nEach other creature you control of the chosen type enters the battlefield with an additional +1/+1 counter on it. diff --git a/forge-gui/res/cardsfolder/m/muzzios_preparations.txt b/forge-gui/res/cardsfolder/m/muzzios_preparations.txt index dc4d27938db..e3f7ff11de3 100644 --- a/forge-gui/res/cardsfolder/m/muzzios_preparations.txt +++ b/forge-gui/res/cardsfolder/m/muzzios_preparations.txt @@ -2,8 +2,7 @@ Name:Muzzio's Preparations ManaCost:no cost Types:Conspiracy K:Hidden agenda -R:Event$ Moved | ActiveZones$ Command | Destination$ Battlefield | ValidCard$ Creature.YouCtrl+NamedCard | ReplaceWith$ AddExtraCounter | Description$ Each creature with the named card you control enters the battlefield with an additional +1/+1 counter on it. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Command:Creature.YouCtrl+NamedCard +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Each creature with the named card you control enters the battlefield with an additional +1/+1 counter on it. SVar:AgendaLogic:MostProminentCreatureInComputerDeck Oracle:Hidden agenda (Start the game with this conspiracy face down in the command zone and secretly name a card. You may turn this conspiracy face up any time and reveal the chosen name.)\nEach creature you control with the chosen name enters the battlefield with an additional +1/+1 counter on it. diff --git a/forge-gui/res/cardsfolder/o/oath_of_gideon.txt b/forge-gui/res/cardsfolder/o/oath_of_gideon.txt index a52ae1c30ba..9a04bc406a9 100644 --- a/forge-gui/res/cardsfolder/o/oath_of_gideon.txt +++ b/forge-gui/res/cardsfolder/o/oath_of_gideon.txt @@ -3,9 +3,9 @@ ManaCost:2 W Types:Legendary Enchantment T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, create two 1/1 white Kor Ally creature tokens. SVar:TrigToken:DB$Token | TokenImage$ w 1 1 kor ally | TokenName$ Kor Ally | TokenColors$ White | TokenTypes$ Creature,Kor,Ally | TokenPower$ 1 | TokenToughness$ 1 | TokenOwner$ You | TokenAmount$ 2 -R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Battlefield | ValidCard$ Planeswalker.YouCtrl | ReplaceWith$ AddExtraCounter | Description$ Each planeswalker you control enters the battlefield with an additional loyalty counter on it. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ LOYALTY | CounterNum$ 1 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard + +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Planeswalker.YouCtrl +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ LOYALTY | CounterNum$ 1 | SpellDescription$ Each planeswalker you control enters the battlefield with an additional loyalty counter on it. DeckHints:Type$Ally SVar:Picture:http://www.wizards.com/global/images/magic/general/oath_of_gideon.jpg Oracle:When Oath of Gideon enters the battlefield, create two 1/1 white Kor Ally creature tokens.\nEach planeswalker you control enters the battlefield with an additional loyalty counter on it. diff --git a/forge-gui/res/cardsfolder/o/oonas_blackguard.txt b/forge-gui/res/cardsfolder/o/oonas_blackguard.txt index c9af8d5849b..f905161f090 100644 --- a/forge-gui/res/cardsfolder/o/oonas_blackguard.txt +++ b/forge-gui/res/cardsfolder/o/oonas_blackguard.txt @@ -3,11 +3,12 @@ ManaCost:1 B Types:Creature Faerie Rogue PT:1/1 K:Flying -R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Battlefield | ValidCard$ Creature.Rogue+YouCtrl+Other | ReplaceWith$ AddExtraCounter | Description$ Each other Rogue creature you control enters the battlefield with an additional +1/+1 counter on it. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.Rogue+Other+YouCtrl +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Each other Rogue creature you control enters the battlefield with an additional +1/+1 counter on it. T:Mode$ DamageDone | ValidSource$ Creature.YouCtrl+counters_GE1_P1P1 | ValidTarget$ Player | TriggerZones$ Battlefield | CombatDamage$ True | Execute$ TrigDiscardOpp | TriggerDescription$ Whenever a creature you control with a +1/+1 counter on it deals combat damage to a player, that player discards a card. SVar:TrigDiscardOpp:DB$ Discard | Defined$ TriggeredTarget | NumCards$ 1 | Mode$ TgtChoose SVar:PlayMain1:TRUE +DeckNeeds:Type$Rogue +DeckHas:Ability$Discard & Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/oonas_blackguard.jpg Oracle:Flying\nEach other Rogue creature you control enters the battlefield with an additional +1/+1 counter on it.\nWhenever a creature you control with a +1/+1 counter on it deals combat damage to a player, that player discards a card. diff --git a/forge-gui/res/cardsfolder/p/protean_raider.txt b/forge-gui/res/cardsfolder/p/protean_raider.txt index 5818ffb6450..8426dc32a39 100644 --- a/forge-gui/res/cardsfolder/p/protean_raider.txt +++ b/forge-gui/res/cardsfolder/p/protean_raider.txt @@ -2,7 +2,7 @@ Name:Protean Raider ManaCost:1 U R Types:Creature Shapeshifter Pirate PT:2/2 -R:Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self | Optional$ True | ReplaceWith$ DBCopy | CheckSVar$ RaidTest | References$ RaidTest | Description$ Raid — If you attacked with a creature this turn, you may have CARDNAME enter the battlefield as a copy of any creature on the battlefield. +R:Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self | Layer$ Clone | Optional$ True | ReplaceWith$ DBCopy | CheckSVar$ RaidTest | References$ RaidTest | Description$ Raid — If you attacked with a creature this turn, you may have CARDNAME enter the battlefield as a copy of any creature on the battlefield. SVar:DBCopy:DB$ Clone | Choices$ Creature.Other | SubAbility$ DBChangeZone | SpellDescription$ Raid — If you attacked with a creature this turn, you may have CARDNAME enter the battlefield as a copy of any creature on the battlefield. SVar:DBChangeZone:DB$ ChangeZone | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard SVar:RaidTest:Count$AttackersDeclared diff --git a/forge-gui/res/cardsfolder/s/sage_of_fables.txt b/forge-gui/res/cardsfolder/s/sage_of_fables.txt index fc2d3596fe7..ba91cf66ee5 100644 --- a/forge-gui/res/cardsfolder/s/sage_of_fables.txt +++ b/forge-gui/res/cardsfolder/s/sage_of_fables.txt @@ -2,11 +2,11 @@ Name:Sage of Fables ManaCost:2 U Types:Creature Merfolk Wizard PT:2/2 -R:Event$ Moved | ActiveZones$ Battlefield | Destination$ Battlefield | ValidCard$ Creature.Wizard+Other+YouCtrl | ReplaceWith$ AddExtraCounter | Description$ Each other Wizard creature you control enters the battlefield with an additional +1/+1 counter on it. -SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard +K:ETBReplacement:Other:AddExtraCounter:Mandatory:Battlefield:Creature.Wizard+Other+YouCtrl +SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SpellDescription$ Each other Wizard creature you control enters the battlefield with an additional +1/+1 counter on it. A:AB$ Draw | Cost$ 2 SubCounter<1/P1P1/Creature.YouCtrl/Creature you control> | NumCards$ 1 | SpellDescription$ Draw a card. DeckNeeds:Type$Wizard +DeckHas:Ability$Counters #TODO: The AI won't use the "draw a card" ability on this yet, needs some logic improvement. Otherwise, the AI uses this card fine #and it may be good in a Wizard-themed deck. SVar:Picture:http://www.wizards.com/global/images/magic/general/sage_of_fables.jpg diff --git a/forge-gui/res/cardsfolder/z/zameck_guildmage.txt b/forge-gui/res/cardsfolder/z/zameck_guildmage.txt index 072f70b6658..1cfbb5e8e4f 100644 --- a/forge-gui/res/cardsfolder/z/zameck_guildmage.txt +++ b/forge-gui/res/cardsfolder/z/zameck_guildmage.txt @@ -6,7 +6,7 @@ A:AB$ Effect | Cost$ G U | Name$ Zameck Guildmage Effect | ReplacementEffects$ E SVar:ExtraETBCounter:Event$ Moved | ActiveZones$ Command | Destination$ Battlefield | ValidCard$ Creature.YouCtrl | ReplaceWith$ AddExtraCounter | Description$ This turn, each creature you control enters the battlefield with an additional +1/+1 counter on it. SVar:AddExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ MoveToBattlefield SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard -A:AB$ Draw |Cost$ G U SubCounter<1/P1P1/Creature.YouCtrl/Creature you Control> | Defined$ You | NumCards$ 1 | SpellDescription$ Draw a card. +A:AB$ Draw | Cost$ G U SubCounter<1/P1P1/Creature.YouCtrl/Creature you Control> | Defined$ You | NumCards$ 1 | SpellDescription$ Draw a card. DeckHas:Ability$Counters DeckHints:Ability$Counters SVar:Picture:http://www.wizards.com/global/images/magic/general/zameck_guildmage.jpg