fixed typo in getter name, added comparable getter for AI support

This commit is contained in:
Maxmtg
2011-08-30 23:12:15 +00:00
parent 8382c62a69
commit 138a85b5de

View File

@@ -51,8 +51,8 @@ public final class CardRules {
public final String getToughness() { return toughness; }
public final int getIntToughness() { return iToughness; }
public final String getLoyalty() { return loyalty; }
public final boolean getemovedFromAIDecks() { return isRemovedFromAIDecks; }
public final boolean getRemovedFromRandomDecks() { return isRemovedFromRandomDecks; }
public final boolean getRemAIDecks() { return isRemovedFromAIDecks; }
public final boolean getRemRandomDecks() { return isRemovedFromRandomDecks; }
public String getPTorLoyalty() {
if (getType().isCreature()) { return power + "/" + toughness; }
@@ -115,6 +115,12 @@ public final class CardRules {
public String getAiStatus() {
return isRemovedFromAIDecks ? (isRemovedFromRandomDecks ? "AI ?" : "AI") : (isRemovedFromRandomDecks ? "?" :"");
}
public Integer getAiStatusComparable() {
if (isRemovedFromAIDecks && isRemovedFromRandomDecks) { return Integer.valueOf(3); }
else if (isRemovedFromAIDecks) { return Integer.valueOf(4); }
else if (isRemovedFromRandomDecks) { return Integer.valueOf(2); }
else { return Integer.valueOf(1); }
}
public abstract static class Predicates {