mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
kind of a band-aid fix for Transcendent Master. It works now at least.
CardFactoryUtil.xCount will now accept Number$12 (and give back 12; 12 is just an example. works for any int.)
This commit is contained in:
@@ -5,9 +5,10 @@ Text:no text
|
|||||||
PT:3/3
|
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: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.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:Level up:1
|
||||||
K:maxLevel:12
|
K:maxLevel:12
|
||||||
|
SVar:X:Number$12
|
||||||
SVar:Rarity:Mythic
|
SVar:Rarity:Mythic
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/transcendent_master.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/transcendent_master.jpg
|
||||||
SetInfo:ROE|Mythic|http://magiccards.info/scans/en/roe/51.jpg
|
SetInfo:ROE|Mythic|http://magiccards.info/scans/en/roe/51.jpg
|
||||||
|
|||||||
@@ -2578,9 +2578,21 @@ public class Card extends MyObservable {
|
|||||||
if (!compare(y, Property, x))
|
if (!compare(y, Property, x))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// syntax example: countersGE9 P1P1 or countersLT12TIME (greater number than 99 not supported)
|
||||||
else if (Property.startsWith("counters")) // 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;
|
int number = 0;
|
||||||
if (Property.substring(10,11).equals("X"))
|
if (Property.substring(10,11).equals("X"))
|
||||||
number = CardFactoryUtil.xCount(source, getSVar("X"));
|
number = CardFactoryUtil.xCount(source, getSVar("X"));
|
||||||
|
|||||||
@@ -3584,6 +3584,12 @@ public class CardFactoryUtil {
|
|||||||
final String m[] = {"none"};
|
final String m[] = {"none"};
|
||||||
if(l.length > 1) m[0] = l[1];
|
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
|
// count valid cards on the battlefield
|
||||||
if(l[0].contains("Valid")) {
|
if(l[0].contains("Valid")) {
|
||||||
String restrictions = l[0].replace("Valid ", "");
|
String restrictions = l[0].replace("Valid ", "");
|
||||||
|
|||||||
Reference in New Issue
Block a user