- The art indexes in .dck files now start at 1, not at 0, and thus match the image file name conventions (e.g. index 1 for a Forest matches Forest1.full.jpg). Note that if you had decks created with different art in mind prior to this beta, the art in your decks will be slightly off (index 0 will be treated as index 1 for the sake of limited backwards compatibility). Please update your decks if necessary.

This commit is contained in:
Agetian
2014-01-17 15:37:19 +00:00
parent 88b6223820
commit 4cb2077e1a
3 changed files with 10 additions and 5 deletions

View File

@@ -169,13 +169,15 @@ public final class CardDb implements ICardDatabase {
final String cardName = isFoil ? this.removeFoilSuffix(cardName0) : cardName0;
final List<String> splitName = CardDb.splitCardName(cardName);
final int artIndex = Integer.parseInt(splitName.get(2));
final int effectiveArtIndex = artIndex == 0 ? 1 : artIndex - 1;
final PaperCard res = splitName.get(1) == null
? ( fromLastSet ? this.uniqueCardsByName.get(splitName.get(0)) : tryGetCard(splitName.get(0), Aggregates.random(this.allCardsByName.get(splitName.get(0))).getEdition(), -1))
: tryGetCard(splitName.get(0), splitName.get(1), Integer.parseInt(splitName.get(2)));
: tryGetCard(splitName.get(0), splitName.get(1), effectiveArtIndex);
if (fromLastSet && null != res && CardEdition.UNKNOWN.getCode() != res.getEdition()) {
final PaperCard res_randart = tryGetCard(res.getName(), res.getEdition(), Integer.parseInt(splitName.get(2)));
final PaperCard res_randart = tryGetCard(res.getName(), res.getEdition(), effectiveArtIndex);
return null != res_randart && isFoil ? getFoiled(res_randart) : res_randart;
}
@@ -186,11 +188,14 @@ public final class CardDb implements ICardDatabase {
public PaperCard tryGetCardPrintedByDate(final String name0, final boolean fromLatestSet, final Date printedBefore) {
final boolean isFoil = this.isFoil(name0);
final String cardName = isFoil ? this.removeFoilSuffix(name0) : name0;
final List<String> splitName = CardDb.splitCardName(cardName);
final int artIndex = Integer.parseInt(splitName.get(2));
final int effectiveArtIndex = artIndex == 0 ? 1 : artIndex - 1;
PaperCard res = null;
if (null != splitName.get(1)) // set explicitly requested, should return card from it and disregard the date
res = tryGetCard(splitName.get(0), splitName.get(1), Integer.parseInt(splitName.get(2)));
res = tryGetCard(splitName.get(0), splitName.get(1), effectiveArtIndex);
else {
Collection<PaperCard> cards = this.allCardsByName.get(splitName.get(0)); // cards are sorted by datetime desc
int idxRightSet = 0;

View File

@@ -229,7 +229,7 @@ public class Deck extends DeckBase implements Iterable<Entry<DeckSection, CardPo
sb.append("|").append(card.getEdition());
if (artCount > 1) {
sb.append("|").append(card.getArtIndex());
sb.append("|").append(card.getArtIndex() + 1); // indexes start at 1 to match image file name conventions
}
}
if(card.isFoil()) {

View File

@@ -17,7 +17,7 @@ http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=12609#p138913
- Support for multiple card art -
Forge now fully supports the distinction between cards with different art, which is most apparent with basic lands. It is now possible to specifically add cards with particular art in the deck editor, and cards with different art are now generated for random constructed decks, sealed deck pools, booster draft extra basic land pools, starting quest card pools, and quest card shop pools. The deck file (.dck) format has been adapted to account for this change so that the card art index can now be specified after the set, with the index starting at 0 for the first possible card art.
Forge now fully supports the distinction between cards with different art, which is most apparent with basic lands. It is now possible to specifically add cards with particular art in the deck editor, and cards with different art are now generated for random constructed decks, sealed deck pools, booster draft extra basic land pools, starting quest card pools, and quest card shop pools. The deck file (.dck) format has been adapted to account for this change so that the card art index can now be specified after the set, with the index starting at 1 for the first possible card art.
- Commander 2013 cards -