- Fixed March of the Machines.

This commit is contained in:
Sloth
2011-09-18 10:52:38 +00:00
parent f76b889ace
commit 36b4c240c9
2 changed files with 12 additions and 4 deletions

View File

@@ -2,9 +2,9 @@ Name:March of the Machines
ManaCost:3 U ManaCost:3 U
Types:Enchantment Types:Enchantment
Text:no text 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:RemRandomDeck:True
SVar:MarchoftheMachinesX:Count$CardManaCost SVar:AffectedX:Count$CardManaCost
SVar:Rarity:Rare SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/march_of_the_machines.jpg 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 SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/42.jpg

View File

@@ -40,7 +40,9 @@ public class StaticAbility_Continuous {
int powerBonus = 0; int powerBonus = 0;
int toughnessBonus = 0; int toughnessBonus = 0;
String setP = "";
int setPower = -1; int setPower = -1;
String setT = "";
int setToughness = -1; int setToughness = -1;
String[] addKeywords = null; String[] addKeywords = null;
String[] addHiddenKeywords = null; String[] addHiddenKeywords = null;
@@ -58,13 +60,13 @@ public class StaticAbility_Continuous {
boolean removeCreatureTypes = false; boolean removeCreatureTypes = false;
if (params.containsKey("SetPower")) { if (params.containsKey("SetPower")) {
String setP = params.get("SetPower"); setP = params.get("SetPower");
setPower = setP.matches("[0-9][0-9]?") ? Integer.parseInt(setP) setPower = setP.matches("[0-9][0-9]?") ? Integer.parseInt(setP)
: CardFactoryUtil.xCount(hostCard, hostCard.getSVar(setP)); : CardFactoryUtil.xCount(hostCard, hostCard.getSVar(setP));
} }
if (params.containsKey("SetToughness")) { if (params.containsKey("SetToughness")) {
String setT = params.get("SetToughness"); setT = params.get("SetToughness");
setToughness = setT.matches("[0-9][0-9]?") ? Integer.parseInt(setT) setToughness = setT.matches("[0-9][0-9]?") ? Integer.parseInt(setT)
: CardFactoryUtil.xCount(hostCard, hostCard.getSVar(setT)); : CardFactoryUtil.xCount(hostCard, hostCard.getSVar(setT));
} }
@@ -202,6 +204,12 @@ public class StaticAbility_Continuous {
} }
else //non CharacteristicDefining else //non CharacteristicDefining
if (setPower != -1 || setToughness != -1) { 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()); affectedCard.addNewPT(setPower, setToughness, hostCard.getTimestamp());
} }