Modified spDamageTgt to use SVar for X

This commit is contained in:
jendave
2011-08-06 03:20:57 +00:00
parent 4bdbb3daba
commit 207b570e42

View File

@@ -1532,16 +1532,18 @@ public class CardFactory implements NewConstants {
final int NumDmg[] = {-1}; final int NumDmg[] = {-1};
final String NumDmgX[] = {"none"}; final String NumDmgX[] = {"none"};
if (k[1].length() <= 2) // numeric if (k[1].matches("X"))
NumDmg[0] = Integer.parseInt(k[1]);
else // result of some sort of function
{ {
if (k[1].startsWith("Count$")) String x = card.getSVar(k[1]);
if (x.startsWith("Count$"))
{ {
String kk[] = k[1].split("\\$"); String kk[] = x.split("\\$");
NumDmgX[0] = kk[1]; NumDmgX[0] = kk[1];
} }
} }
else if (k[1].matches("[0-9][0-9]?"))
NumDmg[0] = Integer.parseInt(k[1]);
//drawbacks and descriptions //drawbacks and descriptions
final String DrawBack[] = {"none"}; final String DrawBack[] = {"none"};