diff --git a/res/cardsfolder/m/march_of_the_machines.txt b/res/cardsfolder/m/march_of_the_machines.txt index 3bd8fc5b608..1131f9ff418 100644 --- a/res/cardsfolder/m/march_of_the_machines.txt +++ b/res/cardsfolder/m/march_of_the_machines.txt @@ -2,9 +2,9 @@ Name:March of the Machines ManaCost:3 U Types:Enchantment Text:no text -S:Mode$ Continuous | Affected$ Artifact.nonCreature | SetPower$ MarchoftheMachinesX | SetToughness$ MarchoftheMachinesX | AddType$ Creature | AddSVar$ MarchoftheMachinesX | Description$ Each noncreature artifact is an artifact creature with power and toughness each equal to its converted mana cost. (Equipment that's a creature can't equip a creature.) +S:Mode$ Continuous | Affected$ Artifact.nonCreature | SetPower$ AffectedX | SetToughness$ AffectedX | AddType$ Creature | Description$ Each noncreature artifact is an artifact creature with power and toughness each equal to its converted mana cost. (Equipment that's a creature can't equip a creature.) SVar:RemRandomDeck:True -SVar:MarchoftheMachinesX:Count$CardManaCost +SVar:AffectedX:Count$CardManaCost SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/march_of_the_machines.jpg SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/42.jpg diff --git a/src/main/java/forge/card/staticAbility/StaticAbility_Continuous.java b/src/main/java/forge/card/staticAbility/StaticAbility_Continuous.java index be81f14def2..1d88ca11bbc 100644 --- a/src/main/java/forge/card/staticAbility/StaticAbility_Continuous.java +++ b/src/main/java/forge/card/staticAbility/StaticAbility_Continuous.java @@ -40,7 +40,9 @@ public class StaticAbility_Continuous { int powerBonus = 0; int toughnessBonus = 0; + String setP = ""; int setPower = -1; + String setT = ""; int setToughness = -1; String[] addKeywords = null; String[] addHiddenKeywords = null; @@ -58,13 +60,13 @@ public class StaticAbility_Continuous { boolean removeCreatureTypes = false; if (params.containsKey("SetPower")) { - String setP = params.get("SetPower"); + setP = params.get("SetPower"); setPower = setP.matches("[0-9][0-9]?") ? Integer.parseInt(setP) : CardFactoryUtil.xCount(hostCard, hostCard.getSVar(setP)); } if (params.containsKey("SetToughness")) { - String setT = params.get("SetToughness"); + setT = params.get("SetToughness"); setToughness = setT.matches("[0-9][0-9]?") ? Integer.parseInt(setT) : CardFactoryUtil.xCount(hostCard, hostCard.getSVar(setT)); } @@ -202,6 +204,12 @@ public class StaticAbility_Continuous { } else //non CharacteristicDefining if (setPower != -1 || setToughness != -1) { + if (setP.startsWith("AffectedX")) { + setPower = CardFactoryUtil.xCount(affectedCard, hostCard.getSVar(setP)); + } + if (setT.startsWith("AffectedX")) { + setToughness = CardFactoryUtil.xCount(affectedCard, hostCard.getSVar(setT)); + } affectedCard.addNewPT(setPower, setToughness, hostCard.getTimestamp()); }