mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring
This commit is contained in:
@@ -414,7 +414,7 @@ public final class CardRules implements ICardCharacteristics {
|
||||
String key = colonPos > 0 ? line.substring(0, colonPos) : line;
|
||||
String value = colonPos > 0 ? line.substring(1+colonPos).trim() : null;
|
||||
|
||||
switch(key.charAt(0)) {
|
||||
switch (key.charAt(0)) {
|
||||
case 'A':
|
||||
if ("A".equals(key)) {
|
||||
this.faces[curFace].addAbility(value);
|
||||
|
||||
@@ -759,7 +759,6 @@ public final class CardType implements Comparable<CardType>, CardTypeView {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
///////// Utility methods
|
||||
public static boolean isACardType(final String cardType) {
|
||||
return CoreType.isValidEnum(cardType);
|
||||
|
||||
@@ -40,7 +40,6 @@ public class PrintSheet {
|
||||
|
||||
private final ItemPool<PaperCard> cardsWithWeights;
|
||||
|
||||
|
||||
private final String name;
|
||||
public PrintSheet(String name0) {
|
||||
this(name0, null);
|
||||
|
||||
@@ -43,9 +43,8 @@ public class DeckGenPool implements IDeckGenPool {
|
||||
Iterable<PaperCard> editionCards=Iterables.filter(cards.values(), filter);
|
||||
if (editionCards.iterator().hasNext()){
|
||||
return editionCards.iterator().next();
|
||||
}else {
|
||||
return getCard(name);
|
||||
}
|
||||
return getCard(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,9 +3,6 @@ package forge.item;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Filtering conditions for miscellaneous InventoryItems.
|
||||
*/
|
||||
|
||||
@@ -351,4 +351,3 @@ public final class PaperCard implements Comparable<IPaperCard>, InventoryItemFro
|
||||
|| (this.getName().equals("Mountain"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class PaperToken implements InventoryItemFromSet, IPaperCard {
|
||||
build.add(subtypes);
|
||||
|
||||
// Are these keywords sorted?
|
||||
for(String keyword : rules.getMainPart().getKeywords()) {
|
||||
for (String keyword : rules.getMainPart().getKeywords()) {
|
||||
build.add(keyword);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ImageUtil {
|
||||
}
|
||||
|
||||
public static PaperCard getPaperCardFromImageKey(String key) {
|
||||
if ( key == null ) {
|
||||
if (key == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,10 @@ public class ImageUtil {
|
||||
String edition = key.substring(index + 1);
|
||||
if (script.startsWith("emblem"))
|
||||
return null;
|
||||
if (null == StaticData.instance().getCardEdition(edition)) {
|
||||
script = key;
|
||||
edition = "???";
|
||||
}
|
||||
script = script.replaceAll("[0-9]*$", "");
|
||||
return StaticData.instance().getAllTokens().getToken(script, edition);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user