mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Merge branch 'fixnpe' into 'master'
Fix NPE See merge request core-developers/forge!5141
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.
|
||||
*/
|
||||
|
||||
@@ -349,4 +349,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user