mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
* Images: added embalm ability tokens and missed Insect token from Amonkhet (see #3201);
This commit is contained in:
parent
4006e9e909
commit
9df32a571b
3 changed files with 63 additions and 25 deletions
|
@ -94,16 +94,34 @@ public class ScryfallImageSupportTokens {
|
|||
put("HOU/Insect", "https://api.scryfall.com/cards/thou/12/en?format=image");
|
||||
put("HOU/Snake", "https://api.scryfall.com/cards/thou/11/en?format=image");
|
||||
|
||||
//AKH
|
||||
//AKH - tokens
|
||||
put("AKH/Beast", "https://api.scryfall.com/cards/takh/21/en?format=image");
|
||||
put("AKH/Cat", "https://api.scryfall.com/cards/takh/16/en?format=image");
|
||||
put("AKH/Drake", "https://api.scryfall.com/cards/takh/18/en?format=image");
|
||||
put("AKH/Emblem Gideon", "https://api.scryfall.com/cards/takh/25/en?format=image");
|
||||
put("AKH/Hippo", "https://api.scryfall.com/cards/takh/22/en?format=image");
|
||||
put("AKH/Insect", "https://api.scryfall.com/cards/takh/19/en?format=image");
|
||||
put("AKH/Snake", "https://api.scryfall.com/cards/takh/23/en?format=image");
|
||||
put("AKH/Warrior", "https://api.scryfall.com/cards/takh/17/en?format=image");
|
||||
put("AKH/Wurm", "https://api.scryfall.com/cards/takh/24/en?format=image");
|
||||
put("AKH/Zombie", "https://api.scryfall.com/cards/takh/20/en?format=image");
|
||||
//AKH - embalm ability (token from card)
|
||||
put("AKH/Angel of Sanctions", "https://api.scryfall.com/cards/takh/1/en?format=image");
|
||||
put("AKH/Anointer Priest", "https://api.scryfall.com/cards/takh/2/en?format=image");
|
||||
put("AKH/Aven Initiate", "https://api.scryfall.com/cards/takh/3/en?format=image");
|
||||
put("AKH/Aven Wind Guide", "https://api.scryfall.com/cards/takh/4/en?format=image");
|
||||
put("AKH/Gideon of the Trials Emblem", "https://api.scryfall.com/cards/takh/25/en?format=image");
|
||||
put("AKH/Glyph Keeper", "https://api.scryfall.com/cards/takh/5/en?format=image");
|
||||
put("AKH/Heart-Piercer Manticore", "https://api.scryfall.com/cards/takh/6/en?format=image");
|
||||
put("AKH/Honored Hydra", "https://api.scryfall.com/cards/takh/7/en?format=image");
|
||||
put("AKH/Labyrinth Guardian", "https://api.scryfall.com/cards/takh/8/en?format=image");
|
||||
put("AKH/Oketra's Attendant", "https://api.scryfall.com/cards/takh/9/en?format=image");
|
||||
put("AKH/Sacred Cat", "https://api.scryfall.com/cards/takh/10/en?format=image");
|
||||
put("AKH/Tah-Crop Skirmisher", "https://api.scryfall.com/cards/takh/11/en?format=image");
|
||||
put("AKH/Temmet, Vizier of Naktamun", "https://api.scryfall.com/cards/takh/12/en?format=image");
|
||||
put("AKH/Trueheart Duelist", "https://api.scryfall.com/cards/takh/13/en?format=image");
|
||||
put("AKH/Unwavering Initiate", "https://api.scryfall.com/cards/takh/14/en?format=image");
|
||||
put("AKH/Vizier of Many Faces", "https://api.scryfall.com/cards/takh/15/en?format=image");
|
||||
|
||||
//AER
|
||||
put("AER/Etherium Cell", "https://api.scryfall.com/cards/taer/3/en?format=image");
|
||||
|
@ -187,7 +205,7 @@ public class ScryfallImageSupportTokens {
|
|||
put("BFZ/Plant", "https://api.scryfall.com/cards/tbfz/10/en?format=image");
|
||||
|
||||
// C17
|
||||
|
||||
|
||||
|
||||
// WAR
|
||||
put("WAR/Angel", "https://api.scryfall.com/cards/twar/2/en?format=image");
|
||||
|
|
|
@ -84,13 +84,21 @@ public final class ImageCache {
|
|||
|
||||
boolean cardback = false;
|
||||
String path;
|
||||
if (collectorId.isEmpty() || "0".equals(collectorId)) {
|
||||
if (collectorId.isEmpty() || "0".equals(collectorId) || !tokenDescriptor.isEmpty()) { // tokenDescriptor for embalm ability
|
||||
info.setToken(true);
|
||||
path = CardImageUtils.generateTokenImagePath(info);
|
||||
if (path == null) {
|
||||
cardback = true;
|
||||
// TODO: replace empty token by other default card, not cardback
|
||||
path = CardImageUtils.buildImagePathToDefault(DirectLinksForDownload.cardbackFilename);
|
||||
// try token image from card
|
||||
CardDownloadData newInfo = new CardDownloadData(info);
|
||||
newInfo.setToken(false);
|
||||
path = CardImageUtils.buildImagePathToCard(newInfo);
|
||||
TFile tokenFile = getTFile(path);
|
||||
if (tokenFile == null || !tokenFile.exists()) {
|
||||
// token empty token image
|
||||
// TODO: replace empty token by other default card, not cardback
|
||||
path = CardImageUtils.buildImagePathToDefault(DirectLinksForDownload.cardbackFilename);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
path = CardImageUtils.buildImagePathToCard(info);
|
||||
|
@ -245,12 +253,20 @@ public final class ImageCache {
|
|||
CardDownloadData info = new CardDownloadData(name, set, collectorId, usesVariousArt, type, tokenSetCode, tokenDescriptor);
|
||||
|
||||
String path;
|
||||
if (collectorId.isEmpty() || "0".equals(collectorId)) {
|
||||
if (collectorId.isEmpty() || "0".equals(collectorId) || !tokenDescriptor.isEmpty()) { // tokenDescriptor for embalm ability
|
||||
info.setToken(true);
|
||||
path = CardImageUtils.generateFullTokenImagePath(info);
|
||||
path = CardImageUtils.generateTokenImagePath(info);
|
||||
if (path == null) {
|
||||
// TODO: replace empty token by other default card, not cardback
|
||||
path = CardImageUtils.buildImagePathToDefault(DirectLinksForDownload.cardbackFilename);
|
||||
// try token image from card
|
||||
CardDownloadData newInfo = new CardDownloadData(info);
|
||||
newInfo.setToken(false);
|
||||
path = CardImageUtils.buildImagePathToCard(newInfo);
|
||||
TFile tokenFile = getTFile(path);
|
||||
if (tokenFile == null || !tokenFile.exists()) {
|
||||
// token empty token image
|
||||
// TODO: replace empty token by other default card, not cardback
|
||||
path = CardImageUtils.buildImagePathToDefault(DirectLinksForDownload.cardbackFilename);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
path = CardImageUtils.buildImagePathToCard(info);
|
||||
|
|
|
@ -168,30 +168,34 @@
|
|||
|Generate|TOK:AER|Etherium Cell|||EtheriumCellToken|
|
||||
|Generate|TOK:AER|Gremlin|||GremlinToken|
|
||||
|Generate|TOK:AER|Ragavan|||RagavanToken|
|
||||
|
||||
# AKH
|
||||
|Generate|TOK:AKH|Beast|||BeastToken3|
|
||||
|Generate|TOK:AKH|Cat|||CatToken2|
|
||||
|Generate|TOK:AKH|Drake|||DrakeToken|
|
||||
|Generate|TOK:AKH|Hippo|||HippoToken2|
|
||||
|Generate|TOK:AKH|Insect|||NestOfScarabsBlackInsectToken|
|
||||
|Generate|TOK:AKH|Snake|||DeathtouchSnakeToken|
|
||||
|Generate|TOK:AKH|Warrior|||WarriorVigilantToken|
|
||||
|Generate|TOK:AKH|Wurm|||Wurm55Token|
|
||||
|Generate|TOK:AKH|Zombie|||ZombieToken
|
||||
|Generate|TOK:AKH|Zombie|||ZombieToken|
|
||||
#TOK:AKH - some tokens from real cards (see Embalm ability)
|
||||
#|Generate|TOK:AKH|Angel of Sanctions||
|
||||
#|Generate|TOK:AKH|Anointer Priest||
|
||||
#|Generate|TOK:AKH|Aven Initiate||
|
||||
#|Generate|TOK:AKH|Aven Wind Guide||
|
||||
#|Generate|TOK:AKH|Glyph Keeper||
|
||||
#|Generate|TOK:AKH|Heart-Piercer Manticore||
|
||||
#|Generate|TOK:AKH|Honored Hydra||
|
||||
#|Generate|TOK:AKH|Labyrinth Guardian||
|
||||
#|Generate|TOK:AKH|Oketra's Attendant||
|
||||
#|Generate|TOK:AKH|Sacred Cat||
|
||||
#|Generate|TOK:AKH|Tah-Crop Skirmisher||
|
||||
#|Generate|TOK:AKH|Temmet, Vizier of Naktamun||
|
||||
#|Generate|TOK:AKH|Trueheart Duelist||
|
||||
#|Generate|TOK:AKH|Unwavering Initiate||
|
||||
#|Generate|TOK:AKH|Vizier of Many Faces||
|
||||
|Generate|TOK:AKH|Angel of Sanctions||
|
||||
|Generate|TOK:AKH|Anointer Priest||
|
||||
|Generate|TOK:AKH|Aven Initiate||
|
||||
|Generate|TOK:AKH|Aven Wind Guide||
|
||||
|Generate|TOK:AKH|Glyph Keeper||
|
||||
|Generate|TOK:AKH|Heart-Piercer Manticore||
|
||||
|Generate|TOK:AKH|Honored Hydra||
|
||||
|Generate|TOK:AKH|Labyrinth Guardian||
|
||||
|Generate|TOK:AKH|Oketra's Attendant||
|
||||
|Generate|TOK:AKH|Sacred Cat||
|
||||
|Generate|TOK:AKH|Tah-Crop Skirmisher||
|
||||
|Generate|TOK:AKH|Temmet, Vizier of Naktamun||
|
||||
|Generate|TOK:AKH|Trueheart Duelist||
|
||||
|Generate|TOK:AKH|Unwavering Initiate||
|
||||
|Generate|TOK:AKH|Vizier of Many Faces||
|
||||
|
||||
|Generate|TOK:ALA|Beast|||GodSireBeastToken|
|
||||
|Generate|TOK:ALA|Dragon|||DragonToken|
|
||||
|Generate|TOK:ALA|Goblin|||GoblinTokenWithHaste|
|
||||
|
|
Loading…
Reference in a new issue