Revert Comment out some currently unsupported cards in Commander precons

This commit is contained in:
tool4EvEr
2021-09-04 11:33:44 +02:00
committed by leriomaggio
parent 3e9e9396b0
commit ba5ef78f31
12 changed files with 17 additions and 19 deletions

View File

@@ -67,7 +67,7 @@ public final class CardRules implements ICardCharacteristics {
}
void reinitializeFromRules(CardRules newRules) {
if(!newRules.getName().equals(this.getName()))
if (!newRules.getName().equals(this.getName()))
throw new UnsupportedOperationException("You cannot rename the card using the same CardRules object");
splitType = newRules.splitType;
@@ -91,7 +91,7 @@ public final class CardRules implements ICardCharacteristics {
}
}
int len = oracleText.length();
for(int i = 0; i < len; i++) {
for (int i = 0; i < len; i++) {
char c = oracleText.charAt(i); // This is to avoid needless allocations performed by toCharArray()
switch(c) {
case('('): isReminder = i > 0; break; // if oracle has only reminder, consider it valid rules (basic and true lands need this)
@@ -99,7 +99,7 @@ public final class CardRules implements ICardCharacteristics {
case('{'): isSymbol = true; break;
case('}'): isSymbol = false; break;
default:
if(isSymbol && !isReminder) {
if (isSymbol && !isReminder) {
switch(c) {
case('W'): res |= MagicColor.WHITE; break;
case('U'): res |= MagicColor.BLUE; break;
@@ -317,7 +317,7 @@ public final class CardRules implements ICardCharacteristics {
/** Instantiates class, reads a card. For batch operations better create you own reader instance. */
public static CardRules fromScript(Iterable<String> script) {
Reader crr = new Reader();
for(String line : script) {
for (String line : script) {
crr.parseLine(line);
}
return crr.getCard();

View File

@@ -270,7 +270,6 @@ public final class CardRulesPredicates {
return new PredicateSuperType(type, isEqual);
}
/**
* Checks for color.
*

View File

@@ -122,7 +122,7 @@ public class PaperToken implements InventoryItemFromSet, IPaperCard {
String formatEdition = null == edition || CardEdition.UNKNOWN == edition ? "" : "_" + edition.getCode().toLowerCase();
this.imageFileName.add(String.format("%s%s", imageFileName, formatEdition));
for(int idx = 2; idx <= this.artIndex; idx++) {
for (int idx = 2; idx <= this.artIndex; idx++) {
this.imageFileName.add(String.format("%s%d%s", imageFileName, idx, formatEdition));
}
}

View File

@@ -40,7 +40,7 @@ public class TokenDb implements ITokenDatabase {
}
public void preloadTokens() {
for(CardEdition edition : this.editions) {
for (CardEdition edition : this.editions) {
for (String name : edition.getTokens().keySet()) {
try {
getToken(name, edition.getCode());