Modified spPumpTgt to use SVar for X and Y variables

This commit is contained in:
jendave
2011-08-06 03:20:39 +00:00
parent 3fb9b4a592
commit 8a50154c4a

View File

@@ -2881,24 +2881,42 @@ public class CardFactory implements NewConstants {
if (ptk.length >= 2)
{
if (ptk[0].length() <= 3)
NumAttack[0] = Integer.parseInt(ptk[0].replace("+", ""));
else
if (ptk[0].startsWith("Count$"))
if (ptk[0].matches("[\\+\\-][XY]"))
{
String kk[] = ptk[0].split("\\$");
AttackX[0] = kk[1].replace("\\", "/");
}
String xy = card.getSVar(ptk[0].replaceAll("[\\+\\-]", ""));
if (xy.startsWith("Count$"))
{
String kk[] = xy.split("\\$");
AttackX[0] = kk[1];
if (ptk[1].length() <= 3)
NumDefense[0] = Integer.parseInt(ptk[1].replace("+", ""));
if (ptk[0].contains("-"))
if (AttackX[0].contains("/"))
AttackX[0].replace("/", "/Negative");
else
if (ptk[1].startsWith("Count$"))
{
String kk[] = ptk[1].split("\\$");
DefenseX[0] = kk[1].replace("\\", "/");
AttackX[0] += "/Negative";
}
}
else if (ptk[0].matches("[\\+\\-][0-9]"))
NumAttack[0] = Integer.parseInt(ptk[0].replace("+", ""));
if (ptk[1].matches("[\\+\\-][XY]"))
{
String xy = card.getSVar(ptk[1].replaceAll("[\\+\\-]", ""));
if (xy.startsWith("Count$"))
{
String kk[] = xy.split("\\$");
DefenseX[0] = kk[1];
if (ptk[1].contains("-"))
if (DefenseX[0].contains("/"))
DefenseX[0].replace("/", "/Negative");
else
DefenseX[0] += "/Negative";
}
}
else if(ptk[1].matches("[\\+\\-][0-9]"))
NumDefense[0] = Integer.parseInt(ptk[1].replace("+", ""));
}
if (ptk.length == 3)
Keyword[0] = ptk[2];