- Fixed Grindstone.

This commit is contained in:
Sloth
2013-08-01 08:58:33 +00:00
parent 73f02b8c30
commit 4c73af527c
2 changed files with 5 additions and 6 deletions

View File

@@ -1,7 +1,8 @@
Name:Grindstone
ManaCost:1
Types:Artifact
A:AB$ Repeat | Cost$ 3 T | ValidTgts$ Player | RepeatSubAbility$ DBCleanAndGrind | MaxRepeat$ MaxRepeats | RepeatCheckSVar$ MilledSharesColor | RepeatSVarCompare$ EQ2 | SubAbility$ DBCleanup | SpellDescription$ Put the top two cards of target player's library into that player's graveyard. If both cards share a color, repeat this process. | StackDescription$ SpellDescription
A:AB$ Mill | Cost$ 3 T | ValidTgts$ Player | NumCards$ 2 | SubAbility$ DBRepeat | RememberMilled$ True | SpellDescription$ Put the top two cards of target player's library into that player's graveyard. If both cards share a color, repeat this process. | StackDescription$ SpellDescription
SVar:DBRepeat:DB$ Repeat | RepeatSubAbility$ DBCleanAndGrind | MaxRepeat$ MaxRepeats | RepeatCheckSVar$ MilledSharesColor | RepeatSVarCompare$ EQ2 | SubAbility$ DBCleanup | References$ MaxRepeats,MilledSharesColor | StackDescription$ None
SVar:DBCleanAndGrind:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBPeek
SVar:DBPeek:DB$ PeekAndReveal | Defined$ Targeted | PeekAmount$ 2 | NoPeek$ True | NoReveal$ True | RememberPeeked$ True | SubAbility$ DBGrind
SVar:DBGrind:DB$ Mill | NumCards$ 2 | Defined$ Targeted

View File

@@ -332,10 +332,7 @@ public class AbilityUtils {
if (amount.startsWith("Cost")) {
return 0;
}
}
// Nothing to do here if value is missing or blank
if (StringUtils.isBlank(svarval)) {
System.err.printf("SVar '%s' not defined in Card (%s)%n", amount, card.getName());
return 0;
}
@@ -349,7 +346,7 @@ public class AbilityUtils {
final String[] calcX = svarval.split("\\$", 2);
// Incorrect parses mean zero.
if ((calcX.length == 1) || calcX[1].equals("none")) {
if (calcX.length == 1 || calcX[1].equals("none")) {
return 0;
}
@@ -408,6 +405,7 @@ public class AbilityUtils {
list.add((Card) o);
}
}
System.out.println("RememberedLKI " + ability + list);
} else {
for (final Object o : newCard.getRemembered()) {
if (o instanceof Card) {