mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Only write out the card art index to the deck if the art count for the card is greater than 1.
This commit is contained in:
@@ -277,7 +277,7 @@ public final class CardDb implements ICardDatabase {
|
||||
|
||||
Collection<PaperCard> cards = allCardsByName.get(cardName);
|
||||
if ( null == cards ) {
|
||||
throw new NoSuchElementException(String.format("Card '%s' not found in our database.", cardName));
|
||||
return 0;
|
||||
}
|
||||
|
||||
for ( PaperCard pc : cards ) {
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Predicate;
|
||||
import forge.StaticData;
|
||||
|
||||
import forge.card.CardDb;
|
||||
import forge.card.ColorSet;
|
||||
@@ -223,9 +224,17 @@ public class Deck extends DeckBase implements Iterable<Entry<DeckSection, CardPo
|
||||
sb.append(n).append(" ").append(card.getName());
|
||||
|
||||
if (!hasBadSetInfo) {
|
||||
int artCount = StaticData.instance().getCommonCards().getArtCount(card.getName(), card.getEdition());
|
||||
if (artCount < 1) {
|
||||
artCount = StaticData.instance().getVariantCards().getArtCount(card.getName(), card.getEdition());
|
||||
}
|
||||
|
||||
sb.append("|").append(card.getEdition());
|
||||
|
||||
if (artCount > 1) {
|
||||
sb.append("|").append(card.getArtIndex());
|
||||
}
|
||||
}
|
||||
if(card.isFoil()) {
|
||||
sb.append(CardDb.foilSuffix);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user