diff --git a/res/cardsfolder/transcendent_master.txt b/res/cardsfolder/transcendent_master.txt index 5045c0db218..602f87d9bfa 100644 --- a/res/cardsfolder/transcendent_master.txt +++ b/res/cardsfolder/transcendent_master.txt @@ -5,9 +5,10 @@ Text:no text PT:3/3 K:stSetPT:3:3:LevelGE6:6:6:LevelGE12:9:9:LEVEL 6-11 6/6 Lifelink LEVEL 12+ 9/9 Lifelink Indestructible K:stPumpSelf:Creature.countersGE6LEVEL:0/0/Lifelink:No Condition:no text -K:stPumpSelf:Creature.countersGE12LEVEL:0/0/HIDDEN Indestructible:No Condition:no text +K:stPumpSelf:Creature.countersGEXLEVEL:0/0/HIDDEN Indestructible:No Condition:no text K:Level up:1 K:maxLevel:12 +SVar:X:Number$12 SVar:Rarity:Mythic SVar:Picture:http://www.wizards.com/global/images/magic/general/transcendent_master.jpg SetInfo:ROE|Mythic|http://magiccards.info/scans/en/roe/51.jpg diff --git a/src/forge/Card.java b/src/forge/Card.java index 43f258c757b..a4a474dd3ae 100644 --- a/src/forge/Card.java +++ b/src/forge/Card.java @@ -2578,9 +2578,21 @@ public class Card extends MyObservable { if (!compare(y, Property, x)) return false; } - - else if (Property.startsWith("counters")) // syntax example: countersGE9 P1P1 or countersLT12TIME (greater number than 99 not supported) + // syntax example: countersGE9 P1P1 or countersLT12TIME (greater number than 99 not supported) + /* + * slapshot5 - fair warning, you cannot use numbers with 2 digits (greater number than 9 not supported + * you can use X and the SVar:X:Number$12 to get two digits. This will need a better fix, and I have the + * beginnings of a regex below + */ + else if (Property.startsWith("counters")) { + /* + Pattern p = Pattern.compile("[a-z]*[A-Z][A-Z][X0-9]+.*$"); + String[] parse = ??? + System.out.println("Parsing completed of: "+Property); + for(int i = 0; i < parse.length; i++) { + System.out.println("parse["+i+"]: "+parse[i]); + }*/ int number = 0; if (Property.substring(10,11).equals("X")) number = CardFactoryUtil.xCount(source, getSVar("X")); diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index 23f7818f9ff..84d6acd0601 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -3584,6 +3584,12 @@ public class CardFactoryUtil { final String m[] = {"none"}; if(l.length > 1) m[0] = l[1]; + //accept straight numbers + if(l[0].contains("Number$")) { + String number = l[0].replace("Number$", ""); + return Integer.parseInt(number); + } + // count valid cards on the battlefield if(l[0].contains("Valid")) { String restrictions = l[0].replace("Valid ", "");