From 85c98bc23962194200db7760a3ed4087ee62b71e Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Tue, 18 Apr 2023 15:02:13 +0100 Subject: [PATCH] Add 30A token images --- .../dl/sources/ScryfallImageSupportTokens.java | 16 +++++++++++++++- .../src/main/resources/card-pictures-tok.txt | 18 ++++++++++++++++-- .../mage/game/permanent/token/BeastToken.java | 2 +- .../game/permanent/token/BlueBirdToken.java | 2 +- .../permanent/token/ClueArtifactToken.java | 6 +++++- .../mage/game/permanent/token/DemonToken.java | 2 +- .../game/permanent/token/HumanClericToken.java | 4 ++++ .../mage/game/permanent/token/HumanToken.java | 2 +- .../permanent/token/HumanWarriorToken.java | 2 +- .../game/permanent/token/HumanWizardToken.java | 4 ++++ .../game/permanent/token/SkeletonToken.java | 2 +- .../game/permanent/token/SoldierToken.java | 2 +- .../game/permanent/token/TreasureToken.java | 5 ++++- .../mage/game/permanent/token/WolfToken.java | 2 +- 14 files changed, 56 insertions(+), 13 deletions(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java index 437df50f44..e74924e309 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/dl/sources/ScryfallImageSupportTokens.java @@ -1901,8 +1901,22 @@ public class ScryfallImageSupportTokens { put ("ONC/Thopter", "https://api.scryfall.com/cards/tonc/21/en?format=image"); // 30A - // TODO: add another tokens + put ("30A/Beast", "https://api.scryfall.com/cards/t30a/8/en?format=image"); + put ("30A/Bird", "https://api.scryfall.com/cards/t30a/4/en?format=image"); + put ("30A/Clue/1", "https://api.scryfall.com/cards/t30a/11/en?format=image"); + put ("30A/Clue/2", "https://api.scryfall.com/cards/t30a/12/en?format=image"); + put ("30A/Demon", "https://api.scryfall.com/cards/t30a/6/en?format=image"); + put ("30A/Human", "https://api.scryfall.com/cards/t30a/1/en?format=image"); + put ("30A/Human Cleric", "https://api.scryfall.com/cards/t30a/10/en?format=image"); + put ("30A/Human Warrior", "https://api.scryfall.com/cards/t30a/2/en?format=image"); + put ("30A/Human Wizard", "https://api.scryfall.com/cards/t30a/5/en?format=image"); + put ("30A/Skeleton", "https://api.scryfall.com/cards/t30a/7/en?format=image"); + put ("30A/Soldier", "https://api.scryfall.com/cards/t30a/3/en?format=image"); + put ("30A/Treasure/1", "https://api.scryfall.com/cards/t30a/13/en?format=image"); + put ("30A/Treasure/2", "https://api.scryfall.com/cards/t30a/14/en?format=image"); + put ("30A/Treasure/3", "https://api.scryfall.com/cards/t30a/15/en?format=image"); put ("30A/Wasp", "https://api.scryfall.com/cards/t30a/16/en?format=image"); + put ("30A/Wolf", "https://api.scryfall.com/cards/t30a/9/en?format=image"); // generate supported sets supportedSets.clear(); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 51ea8c8b9b..ab689a6b9f 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -2017,5 +2017,19 @@ |Generate|TOK:ONC|Thopter|||ThopterColorlessToken| # 30A -# TODO: add all 30A tokens here -|Generate|TOK:30A|Wasp|||WaspToken| \ No newline at end of file +|Generate|TOK:30A|Beast|||BeastToken| +|Generate|TOK:30A|Bird|||BlueBirdToken| +|Generate|TOK:30A|Clue|1||ClueArtifactToken| +|Generate|TOK:30A|Clue|2||ClueArtifactToken| +|Generate|TOK:30A|Demon|||DemonToken| +|Generate|TOK:30A|Human|||HumanToken| +|Generate|TOK:30A|Human Cleric|||HumanCleric| +|Generate|TOK:30A|Human Warrior|||HumanWarriorToken| +|Generate|TOK:30A|Human Wizard|||HumanWizardToken| +|Generate|TOK:30A|Skeleton|||SkeletonToken| +|Generate|TOK:30A|Soldier|||SoldierToken| +|Generate|TOK:30A|Treasure|1||TreasureToken| +|Generate|TOK:30A|Treasure|2||TreasureToken| +|Generate|TOK:30A|Treasure|3||TreasureToken| +|Generate|TOK:30A|Wasp|||WaspToken| +|Generate|TOK:30A|Wolf|||WolfToken| diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastToken.java b/Mage/src/main/java/mage/game/permanent/token/BeastToken.java index 2a200efd38..7551faf6ae 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BeastToken.java @@ -23,7 +23,7 @@ public final class BeastToken extends TokenImpl { availableImageSetCodes = Arrays.asList("C14", "C16", "C19", "CMA", "CN2", "GVL", "DD3C", "DD3GVL", "DDD", "DDL", "DST", "E01", "EVE", "LRW", "M10", "M11", "M12", "M13", "M14", "M15", "MM3", "NPH", "PC2", "USG", "M19", "IKO", "M21", "CMR", "C21", - "AFC", "MIC", "NEC", "2XM", "NCC", "BBD", "PCA", "CLB", "DMU", "ONC"); + "AFC", "MIC", "NEC", "2XM", "NCC", "BBD", "PCA", "CLB", "DMU", "ONC", "30A"); } @Override diff --git a/Mage/src/main/java/mage/game/permanent/token/BlueBirdToken.java b/Mage/src/main/java/mage/game/permanent/token/BlueBirdToken.java index 71702fe0a1..80944459b8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BlueBirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BlueBirdToken.java @@ -22,7 +22,7 @@ public final class BlueBirdToken extends TokenImpl { this.addAbility(FlyingAbility.getInstance()); - availableImageSetCodes = Arrays.asList("EVE", "INV", "KHM"); + availableImageSetCodes = Arrays.asList("EVE", "INV", "KHM", "30A"); } public BlueBirdToken(final BlueBirdToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java b/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java index 2cb5c3f891..dff81fd7ae 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ClueArtifactToken.java @@ -29,7 +29,7 @@ public final class ClueArtifactToken extends TokenImpl { ability.addCost(cost); this.addAbility(ability); - availableImageSetCodes = Arrays.asList("C18", "SOI", "MH2", "AFC", "MID", "VOC", "SLD", "2XM", "NCC", "CLB", "40K"); + availableImageSetCodes = Arrays.asList("C18", "SOI", "MH2", "AFC", "MID", "VOC", "SLD", "2XM", "NCC", "CLB", "40K", "30A"); } @Override @@ -43,6 +43,10 @@ public final class ClueArtifactToken extends TokenImpl { if (getOriginalExpansionSetCode().equals("MH2")) { this.setTokenType(RandomUtil.nextInt(2) + 1); // 2 different images } + + if (getOriginalExpansionSetCode().equals("30A")) { + this.setTokenType(RandomUtil.nextInt(2) + 1); // 2 different images + } } public ClueArtifactToken(final ClueArtifactToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/DemonToken.java b/Mage/src/main/java/mage/game/permanent/token/DemonToken.java index 7fb9584c35..f2915df4b8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DemonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DemonToken.java @@ -21,7 +21,7 @@ public final class DemonToken extends TokenImpl { toughness = new MageInt(5); addAbility(FlyingAbility.getInstance()); - availableImageSetCodes.addAll(Arrays.asList("AVR", "C14", "DD3A", "ISD", "ORI", "M20", "M21", "2XM", "DDR", "GN3")); + availableImageSetCodes.addAll(Arrays.asList("AVR", "C14", "DD3A", "ISD", "ORI", "M20", "M21", "2XM", "DDR", "GN3", "30A")); } public DemonToken(final DemonToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java index d8ba920dd9..0c286833eb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanClericToken.java @@ -5,6 +5,8 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.MageInt; +import java.util.Arrays; + /** * * @author spjspj @@ -20,6 +22,8 @@ public final class HumanClericToken extends TokenImpl { color.setBlack(true); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes.addAll(Arrays.asList("SOI", "30A")); } public HumanClericToken(final HumanClericToken token) { super(token); diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanToken.java index ccdb2f9d6c..8e60df7782 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanToken.java @@ -19,7 +19,7 @@ public final class HumanToken extends TokenImpl { power = new MageInt(1); toughness = new MageInt(1); - availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP", "RNA", "ELD", "C19", "C20", "MID", "VOW", "NCC", "DDQ", "CLB", "DMC", "ONC")); + availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP", "RNA", "ELD", "C19", "C20", "MID", "VOW", "NCC", "DDQ", "CLB", "DMC", "ONC", "30A")); } public HumanToken(final HumanToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanWarriorToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanWarriorToken.java index 58b464fb87..b9afdf97cb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanWarriorToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanWarriorToken.java @@ -20,7 +20,7 @@ public final class HumanWarriorToken extends TokenImpl { power = new MageInt(1); toughness = new MageInt(1); - availableImageSetCodes = Arrays.asList("KHM"); + availableImageSetCodes = Arrays.asList("KHM", "30A"); } private HumanWarriorToken(final HumanWarriorToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java index 419666e196..44a6380e63 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanWizardToken.java @@ -4,6 +4,8 @@ import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; +import java.util.Arrays; + public final class HumanWizardToken extends TokenImpl { public HumanWizardToken() { @@ -14,6 +16,8 @@ public final class HumanWizardToken extends TokenImpl { color.setBlue(true); power = new MageInt(1); toughness = new MageInt(1); + + availableImageSetCodes = Arrays.asList("EMN", "30A"); } public HumanWizardToken(final HumanWizardToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java b/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java index 1124a7c878..4dbe7343c8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SkeletonToken.java @@ -19,7 +19,7 @@ public final class SkeletonToken extends TokenImpl { power = new MageInt(1); toughness = new MageInt(1); - availableImageSetCodes = Arrays.asList("AFR"); + availableImageSetCodes = Arrays.asList("AFR", "30A"); } public SkeletonToken(final SkeletonToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java index 5fedc32980..b00382abf0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SoldierToken.java @@ -22,7 +22,7 @@ public final class SoldierToken extends TokenImpl { availableImageSetCodes = Arrays.asList("10E", "M15", "C14", "ORI", "ALA", "DDF", "THS", "M12", "M13", "MM2", "MMA", "RTR", "SOM", "DDO", "M10", "ORI", "EMN", "EMA", "CN2", "C16", "C18", "MM3", "E01", - "DOM", "MH1", "M20", "C20", "M21", "CMR", "KHC", "TSR", "2XM", "MED", "M19", "MD1", "A25", "CLB", "2X2", "DMU", "GN3", "40K", "ONC"); + "DOM", "MH1", "M20", "C20", "M21", "CMR", "KHC", "TSR", "2XM", "MED", "M19", "MD1", "A25", "CLB", "2X2", "DMU", "GN3", "40K", "ONC", "30A"); } public SoldierToken(final SoldierToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java b/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java index 338be0a06e..e57c9440ff 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java @@ -30,7 +30,7 @@ public final class TreasureToken extends TokenImpl { availableImageSetCodes = Arrays.asList("XLN", "RNA", "M20", "C19", "C20", "M21", "CMR", "KHM", "STX", "MH2", "AFR", "VOW", "NEO", "SLD", "2XM", - "SNC", "CLB", "2X2", "DMC", "GN3"); + "SNC", "CLB", "2X2", "DMC", "GN3", "30A"); } public TreasureToken(final TreasureToken token) { @@ -54,5 +54,8 @@ public final class TreasureToken extends TokenImpl { if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("MH2")) { this.setTokenType(RandomUtil.nextInt(2) + 1); } + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("30A")) { + this.setTokenType(RandomUtil.nextInt(3) + 1); + } } } diff --git a/Mage/src/main/java/mage/game/permanent/token/WolfToken.java b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java index b09eabd2ab..dae18612e2 100644 --- a/Mage/src/main/java/mage/game/permanent/token/WolfToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/WolfToken.java @@ -23,7 +23,7 @@ public final class WolfToken extends TokenImpl { availableImageSetCodes = Arrays.asList("BNG", "C14", "C15", "CMA", "CNS", "ISD", "LRW", "M10", "M14", "MM2", "SHM", "SOI", "SOM", "V10", "ZEN", "WAR", "M20", - "THB", "AFR", "MID", "VOW", "2XM", "A25", "CLB"); + "THB", "AFR", "MID", "VOW", "2XM", "A25", "CLB", "30A"); } @Override