Modified spDrawCards to use SVar for X

This commit is contained in:
jendave
2011-08-06 03:21:22 +00:00
parent ed4abaed2d
commit bcd1a918b9

View File

@@ -2401,16 +2401,17 @@ public class CardFactory implements NewConstants {
final int NumCards[] = {-1}; final int NumCards[] = {-1};
final String NumCardsX[] = {"none"}; final String NumCardsX[] = {"none"};
if (k[1].length() <= 2) if (k[1].matches("X"))
NumCards[0] = Integer.parseInt(k[1]);
else
{ {
if (k[1].startsWith("Count$")) String x = card.getSVar(k[1]);
{ if (x.startsWith("Count$"))
String kk[] = k[1].split("\\$"); {
NumCardsX[0] = kk[1]; String kk[] = x.split("\\$");
} NumCardsX[0] = kk[1];
}
} }
else if (k[1].matches("[0-9][0-9]?"))
NumCards[0] = Integer.parseInt(k[1]);
// drawbacks and descriptions // drawbacks and descriptions
final String DrawBack[] = {"none"}; final String DrawBack[] = {"none"};