From 112f7af0fb2bb3f0cc59773572553507f0b35279 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Thu, 26 Jan 2023 03:55:05 +0000 Subject: [PATCH] Add DMR token images --- .../dl/sources/ScryfallImageSupportTokens.java | 16 ++++++++++++++++ .../src/main/resources/card-pictures-tok.txt | 16 ++++++++++++++++ .../mage/game/permanent/token/BirdToken.java | 3 +-- .../token/Elemental31TrampleHasteToken.java | 2 +- .../mage/game/permanent/token/ElephantToken.java | 2 +- .../mage/game/permanent/token/GoblinToken.java | 2 +- .../game/permanent/token/GreenCat2Token.java | 5 ++++- .../mage/game/permanent/token/GriffinToken.java | 2 +- .../mage/game/permanent/token/InsectToken.java | 2 +- .../game/permanent/token/KarnConstructToken.java | 2 +- .../game/permanent/token/MaritLageToken.java | 2 +- .../permanent/token/PenumbraBobcatToken.java | 3 +++ .../game/permanent/token/SaprolingToken.java | 3 ++- .../mage/game/permanent/token/SheepToken.java | 2 ++ .../mage/game/permanent/token/SquirrelToken.java | 2 +- .../mage/game/permanent/token/ZombieToken.java | 3 ++- 16 files changed, 54 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 6f4107bc1b..311c23a89d 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 @@ -1845,6 +1845,22 @@ public class ScryfallImageSupportTokens { put ("BRC/Servo", "https://api.scryfall.com/cards/tbrc/13/en?format=image"); put ("BRC/Thopter", "https://api.scryfall.com/cards/tbrc/6/en?format=image"); + // DMR + put ("DMR/Bird", "https://api.scryfall.com/cards/tdmr/1/en?format=image"); + put ("DMR/Cat/1", "https://api.scryfall.com/cards/tdmr/3/en?format=image"); + put ("DMR/Cat/2", "https://api.scryfall.com/cards/tdmr/8/en?format=image"); + put ("DMR/Construct", "https://api.scryfall.com/cards/tdmr/14/en?format=image"); + put ("DMR/Elemental", "https://api.scryfall.com/cards/tdmr/6/en?format=image"); + put ("DMR/ELephant", "https://api.scryfall.com/cards/tdmr/9/en?format=image"); + put ("DMR/Goblin", "https://api.scryfall.com/cards/tdmr/7/en?format=image"); + put ("DMR/Griffin", "https://api.scryfall.com/cards/tdmr/2/en?format=image"); + put ("DMR/Insect", "https://api.scryfall.com/cards/tdmr/10/en?format=image"); + put ("DMR/Marit Lage", "https://api.scryfall.com/cards/tdmr/4/en?format=image"); + put ("DMR/Saproling", "https://api.scryfall.com/cards/tdmr/11/en?format=image"); + put ("DMR/Sheep", "https://api.scryfall.com/cards/tdmr/12/en?format=image"); + put ("DMR/Squirrel", "https://api.scryfall.com/cards/tdmr/13/en?format=image"); + put ("DMR/Zombie", "https://api.scryfall.com/cards/tdmr/5/en?format=image"); + // generate supported sets supportedSets.clear(); for (String cardName : this.keySet()) { diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index a3d9b615b0..8f250398d9 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1966,3 +1966,19 @@ |Generate|TOK:BRC|Scrap|||ScrapToken| |Generate|TOK:BRC|Servo|||ServoToken| |Generate|TOK:BRC|Thopter|||ThopterToken| + +# DMR +|Generate|TOK:DMR|Bird|||BirdToken| +|Generate|TOK:DMR|Cat|1||PenumbraBobcatToken| +|Generate|TOK:DMR|Cat|2||GreenCat2Token| +|Generate|TOK:DMR|Construct|||KarnConstructToken| +|Generate|TOK:DMR|Elemental|||Elemental31TrampleHasteToken| +|Generate|TOK:DMR|Elephant|||ElephantToken| +|Generate|TOK:DMR|Goblin|||GoblinToken| +|Generate|TOK:DMR|Griffin|||GriffinToken| +|Generate|TOK:DMR|Insect|||InsectToken| +|Generate|TOK:DMR|Marit Lage|||MaritLageToken| +|Generate|TOK:DMR|Saproling|||SaprolingToken| +|Generate|TOK:DMR|Sheep|||SheepToken| +|Generate|TOK:DMR|Squirrel|||SquirrelToken| +|Generate|TOK:DMR|Zombie|||ZombieToken| diff --git a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java index 5b0c085796..60ba75c1d0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/BirdToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/BirdToken.java @@ -4,7 +4,6 @@ import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; import mage.constants.SubType; -import mage.util.RandomUtil; import java.util.Arrays; @@ -24,7 +23,7 @@ public final class BirdToken extends TokenImpl { addAbility(FlyingAbility.getInstance()); availableImageSetCodes = Arrays.asList("BNG", "CSP", "JUD", "MM3", "RTR", "VMA", "ZEN", - "MH1", "C16", "C20", "M21", "ZNC", "KHC", "MH2", "IMA", "CM2", "DMU"); + "MH1", "C16", "C20", "M21", "ZNC", "KHC", "MH2", "IMA", "CM2", "DMU", "DMR"); } public BirdToken(final BirdToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/Elemental31TrampleHasteToken.java b/Mage/src/main/java/mage/game/permanent/token/Elemental31TrampleHasteToken.java index 84bb49db62..e649b41678 100644 --- a/Mage/src/main/java/mage/game/permanent/token/Elemental31TrampleHasteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/Elemental31TrampleHasteToken.java @@ -22,7 +22,7 @@ public final class Elemental31TrampleHasteToken extends TokenImpl { toughness = new MageInt(1); this.addAbility(TrampleAbility.getInstance()); this.addAbility(HasteAbility.getInstance()); - availableImageSetCodes.addAll(Arrays.asList("BFZ", "MH1", "DOM")); + availableImageSetCodes.addAll(Arrays.asList("BFZ", "MH1", "DOM", "DMR")); } @Override diff --git a/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java index 71f7c51f4d..cbdc915856 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ElephantToken.java @@ -20,7 +20,7 @@ public final class ElephantToken extends TokenImpl { toughness = new MageInt(3); availableImageSetCodes = Arrays.asList("C14", "C15", "CMA", "CNS", "GVL", "DDD", - "EMA", "INV", "JUD", "MM2", "ODY", "VMA", "WWK", "MH1", "CMR", "C21", "MIC", "NEC", "2XM", "NCC", "MM3", "DDS", "DMC"); + "EMA", "INV", "JUD", "MM2", "ODY", "VMA", "WWK", "MH1", "CMR", "C21", "MIC", "NEC", "2XM", "NCC", "MM3", "DDS", "DMC", "DMR"); } public ElephantToken(final ElephantToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java index 166bd47cc2..2ead8f60b5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java @@ -34,7 +34,7 @@ public final class GoblinToken extends TokenImpl { "MMA", "M15", "C14", "KTK", "EVG", "DTK", "ORI", "DDG", "DDN", "MM3", "EMA", "DOM", "RNA", "WAR", "MH1", "TSR", "MH2", "AFR", "NEC", "M19", "CM2", "PCA", "DD1", "DDS", "DDT", "A25", "GRN", - "GK1", "DMU"); + "GK1", "DMU", "DMR"); } public GoblinToken(final GoblinToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/GreenCat2Token.java b/Mage/src/main/java/mage/game/permanent/token/GreenCat2Token.java index 1b9feda07e..eaaed763fd 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GreenCat2Token.java +++ b/Mage/src/main/java/mage/game/permanent/token/GreenCat2Token.java @@ -19,7 +19,7 @@ public final class GreenCat2Token extends TokenImpl { power = new MageInt(2); toughness = new MageInt(2); - availableImageSetCodes = Arrays.asList("M21", "KHM"); + availableImageSetCodes = Arrays.asList("M21", "KHM", "DMR"); } private GreenCat2Token(final GreenCat2Token token) { @@ -37,5 +37,8 @@ public final class GreenCat2Token extends TokenImpl { if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("M21")) { this.setTokenType(2); } + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("DMR")) { + this.setTokenType(2); + } } } diff --git a/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java b/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java index 50cfa75252..f991f973f9 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GriffinToken.java @@ -23,7 +23,7 @@ public final class GriffinToken extends TokenImpl { // Flying this.addAbility(FlyingAbility.getInstance()); - availableImageSetCodes = Arrays.asList("DDH", "DDL", "M21", "TSR", "DMC"); + availableImageSetCodes = Arrays.asList("DDH", "DDL", "M21", "TSR", "DMC", "DMR"); } public GriffinToken(final GriffinToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/InsectToken.java b/Mage/src/main/java/mage/game/permanent/token/InsectToken.java index 78685e2ffb..12433a9340 100644 --- a/Mage/src/main/java/mage/game/permanent/token/InsectToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/InsectToken.java @@ -24,7 +24,7 @@ public final class InsectToken extends TokenImpl { power = new MageInt(1); toughness = new MageInt(1); - availableImageSetCodes = Arrays.asList("M10", "MM2", "SOI", "ZNR", "VOW", "NCC", "PCA", "CN2", "A25"); + availableImageSetCodes = Arrays.asList("M10", "MM2", "SOI", "ZNR", "VOW", "NCC", "PCA", "CN2", "A25", "DMR"); } public InsectToken(final InsectToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java b/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java index 169d8a514b..3111cfeafb 100644 --- a/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/KarnConstructToken.java @@ -29,7 +29,7 @@ public final class KarnConstructToken extends TokenImpl { .setText("This creature gets +1/+1 for each artifact you control") )); - availableImageSetCodes = Arrays.asList("DOM", "MH1", "C21", "MH2", "MED", "BRO"); + availableImageSetCodes = Arrays.asList("DOM", "MH1", "C21", "MH2", "MED", "BRO", "DMR"); } public KarnConstructToken(final KarnConstructToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java b/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java index db91abe74f..271cd2c56b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MaritLageToken.java @@ -27,7 +27,7 @@ public final class MaritLageToken extends TokenImpl { this.addAbility(FlyingAbility.getInstance()); this.addAbility(IndestructibleAbility.getInstance()); - availableImageSetCodes.addAll(Arrays.asList("CSP", "MH1", "UMA", "2XM", "V16")); + availableImageSetCodes.addAll(Arrays.asList("CSP", "MH1", "UMA", "2XM", "V16", "DMR")); } public MaritLageToken(final MaritLageToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java b/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java index 316f45153a..fb7f0f9f5a 100644 --- a/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/PenumbraBobcatToken.java @@ -18,6 +18,9 @@ public final class PenumbraBobcatToken extends TokenImpl { subtype.add(SubType.CAT); power = new MageInt(2); toughness = new MageInt(1); + + setOriginalExpansionSetCode("DMR"); + setTokenType(1); } public PenumbraBobcatToken(final PenumbraBobcatToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java b/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java index 1fe42175c5..c8da6be6bd 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SaprolingToken.java @@ -56,7 +56,8 @@ public final class SaprolingToken extends TokenImpl { "GK2", "CLB", "2X2", - "DMU" + "DMU", + "DMR" )); } diff --git a/Mage/src/main/java/mage/game/permanent/token/SheepToken.java b/Mage/src/main/java/mage/game/permanent/token/SheepToken.java index ab2f53d1b0..ee6da4c098 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SheepToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SheepToken.java @@ -18,6 +18,8 @@ public final class SheepToken extends TokenImpl { subtype.add(SubType.SHEEP); power = new MageInt(0); toughness = new MageInt(1); + + setOriginalExpansionSetCode("DMR"); } public SheepToken(final SheepToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java b/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java index 4ee42f702d..6bb8b173a0 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SquirrelToken.java @@ -20,7 +20,7 @@ public final class SquirrelToken extends TokenImpl { toughness = new MageInt(1); availableImageSetCodes = Arrays.asList("CNS", "ODY", "PCY", "TOR", "ULG", "UNH", "WMA", - "WTH", "MH1", "MH2", "2XM", "CLB"); + "WTH", "MH1", "MH2", "2XM", "CLB", "DMR"); } public SquirrelToken(final SquirrelToken token) { diff --git a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java index 78a1245f76..e6d506c158 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java @@ -33,7 +33,8 @@ public final class ZombieToken extends TokenImpl { "MIC", "VOW", "UMA", "NCC", "MED", "BBD", "M19", "CM2", "PCA", "AVR", "DDQ", "CN2", - "2X2", "CC2", "DMC", "GN3"); + "2X2", "CC2", "DMC", "GN3", + "DMR"); } @Override