From eba1980a9abe24ee06485ac4e221d22f1c9f1d56 Mon Sep 17 00:00:00 2001 From: gp66 Date: Sat, 2 May 2020 21:52:33 -0500 Subject: [PATCH 1/3] added IKO tokens --- .../card/dl/sources/ScryfallImageSupportTokens.java | 12 ++++++++++++ Mage.Client/src/main/resources/card-pictures-tok.txt | 12 +++++++++++- Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java | 3 ++- 3 files changed, 25 insertions(+), 2 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 242acb7306..14ece56096 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 @@ -350,6 +350,18 @@ public class ScryfallImageSupportTokens { put("THB/Wolf", "https://api.scryfall.com/cards/tthb/11/en?format=image"); put("THB/Zombie", "https://api.scryfall.com/cards/tthb/7/en?format=image"); + // IKO + put("IKO/Emblem Narset Of The Ancient Way", "https://api.scryfall.com/cards/tiko/12/en?format=image"); + put("IKO/Beast", "https://api.scryfall.com/cards/tiko/10/en?format=image"); + put("IKO/Cat Bird", "https://api.scryfall.com/cards/tiko/2/en?format=image"); + put("IKO/Cat", "https://api.scryfall.com/cards/tiko/1/en?format=image"); + put("IKO/Dinosaur Beast", "https://api.scryfall.com/cards/tiko/11/en?format=image"); + put("IKO/Dinosaur", "https://api.scryfall.com/cards/tiko/8/en?format=image"); + put("IKO/Feather", "https://api.scryfall.com/cards/tiko/9/en?format=image"); + put("IKO/Human Soldier", "https://api.scryfall.com/cards/tiko/4/en?format=image"); + put("IKO/Kraken", "https://api.scryfall.com/cards/tiko/6/en?format=image"); + put("IKO/Shark", "https://api.scryfall.com/cards/tiko/7/en?format=image"); + // PCA (planes) put("PCA/Eldrazi", "https://api.scryfall.com/cards/tpca/1/en?format=image"); put("PCA/Plane - Academy at Tolaria West", "https://api.scryfall.com/cards/opca/9/en?format=image"); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index 9d1c954caf..b327471863 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -101,6 +101,7 @@ |Generate|EMBLEM:DOM|Teferi, Hero of Dominaria||Emblem Teferi|TeferiHeroOfDominariaEmblem| |Generate|EMBLEM:AER|Tezzeret the Schemer||Emblem Tezzeret|TezzeretTheSchemerEmblem| |Generate|EMBLEM:ELD|Garruk, Cursed Huntsman||Emblem Garruk|GarrukCursedHuntsmanEmblem| +|Generate|EMBLEM:IKO|Narset Of The Ancient Way||Emblem Narset|NarsetOfTheAncientWayEmblem| |Generate|PLANE:PCA|Plane - Academy at Tolaria West|||AcademyAtTolariaWestPlane| |Generate|PLANE:PCA|Plane - Agyrem|||AgyremPlane| |Generate|PLANE:PCA|Plane - Akoum|||AkoumPlane| @@ -1357,4 +1358,13 @@ |Generate|TOK:THB|Wolf|||WolfToken| |Generate|TOK:THB|Nightmare|||AshiokNightmareMuseToken| |Generate|TOK:THB|GoldToken|||Gold| -|Generate|TOK:THB|ArtifactWallToken|||Wall| \ No newline at end of file +|Generate|TOK:THB|ArtifactWallToken|||Wall| +|Generate|TOK:IKO|Beast|||BeastToken| +|Generate|TOK:IKO|Cat Bird|||CatBirdToken| +|Generate|TOK:IKO|Cat|||CatToken| +|Generate|TOK:IKO|Dinosaur Beast|||DinosaurBeastToken| +|Generate|TOK:IKO|Dinosaur|||DinosaurHasteToken| +|Generate|TOK:IKO|Feather|||FeatherToken| +|Generate|TOK:IKO|Human Soldier|||HumanSoldierToken| +|Generate|TOK:IKO|Kraken|||KrakenToken| +|Generate|TOK:IKO|Shark|||SharkToken| diff --git a/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java b/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java index 3316de6703..aa00632951 100644 --- a/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java +++ b/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java @@ -13,6 +13,7 @@ import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; import mage.game.permanent.token.BeastXToken; +import mage.game.permanent.token.DinosaurBeastToken; import mage.target.targetpointer.FixedTarget; import mage.watchers.Watcher; @@ -119,7 +120,7 @@ class QuartzwoodCrasherEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { QuartzwoodCrasherWatcher watcher = game.getState().getWatcher(QuartzwoodCrasherWatcher.class); - return watcher != null && new BeastXToken( + return watcher != null && new DinosaurBeastToken( watcher.getDamage(targetPointer.getFirst(game, source), source.getControllerId()) ).putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId()); } From 8bea930a69145c93b1c7e03d758a2d0a8ae65147 Mon Sep 17 00:00:00 2001 From: gp66 Date: Sat, 2 May 2020 21:59:22 -0500 Subject: [PATCH 2/3] added IKO tokens --- .../permanent/token/DinosaurBeastToken.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java diff --git a/Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java new file mode 100644 index 0000000000..6c0ab5730b --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java @@ -0,0 +1,33 @@ + +package mage.game.permanent.token; + +import mage.constants.CardType; +import mage.MageInt; +import mage.abilities.keyword.TrampleAbility; +import mage.constants.SubType; + +/** + * + * @author TheElk801 + */ +public final class DinosaurBeastToken extends TokenImpl { + + public DinosaurBeastToken(int xValue) { + super("Dinosaur Beast", "X/X green Dinosaur Beast creature token with trample"); + cardType.add(CardType.CREATURE); + color.setGreen(true); + subtype.add(SubType.DINOSAUR); + subtype.add(SubType.BEAST); + power = new MageInt(xValue); + toughness = new MageInt(xValue); + addAbility(TrampleAbility.getInstance()); + } + + public DinosaurBeastToken(final DinosaurBeastToken token) { + super(token); + } + + public DinosaurBeastToken copy() { + return new DinosaurBeastToken(this); + } +} From f3bde1dbabd9659ae26550524942a93f6cf96045 Mon Sep 17 00:00:00 2001 From: gp66 Date: Sun, 3 May 2020 12:52:51 -0500 Subject: [PATCH 3/3] completed suggestions for IKO tokens --- .../sources/ScryfallImageSupportTokens.java | 4 ++- .../src/main/resources/card-pictures-tok.txt | 6 ++-- .../src/mage/cards/q/QuartzwoodCrasher.java | 1 - .../game/permanent/token/BeastXToken.java | 31 ------------------- .../permanent/token/DinosaurBeastToken.java | 13 ++++---- .../permanent/token/HumanSoldierToken.java | 10 ++++++ 6 files changed, 23 insertions(+), 42 deletions(-) delete mode 100644 Mage/src/main/java/mage/game/permanent/token/BeastXToken.java 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 14ece56096..a73ed21c14 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 @@ -358,7 +358,9 @@ public class ScryfallImageSupportTokens { put("IKO/Dinosaur Beast", "https://api.scryfall.com/cards/tiko/11/en?format=image"); put("IKO/Dinosaur", "https://api.scryfall.com/cards/tiko/8/en?format=image"); put("IKO/Feather", "https://api.scryfall.com/cards/tiko/9/en?format=image"); - put("IKO/Human Soldier", "https://api.scryfall.com/cards/tiko/4/en?format=image"); + put("IKO/Human Soldier/1", "https://api.scryfall.com/cards/tiko/3/en?format=image"); + put("IKO/Human Soldier/2", "https://api.scryfall.com/cards/tiko/4/en?format=image"); + put("IKO/Human Soldier/3", "https://api.scryfall.com/cards/tiko/5/en?format=image"); put("IKO/Kraken", "https://api.scryfall.com/cards/tiko/6/en?format=image"); put("IKO/Shark", "https://api.scryfall.com/cards/tiko/7/en?format=image"); diff --git a/Mage.Client/src/main/resources/card-pictures-tok.txt b/Mage.Client/src/main/resources/card-pictures-tok.txt index b327471863..dd753ba0cf 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -1365,6 +1365,8 @@ |Generate|TOK:IKO|Dinosaur Beast|||DinosaurBeastToken| |Generate|TOK:IKO|Dinosaur|||DinosaurHasteToken| |Generate|TOK:IKO|Feather|||FeatherToken| -|Generate|TOK:IKO|Human Soldier|||HumanSoldierToken| +|Generate|TOK:IKO|Human Soldier|1||HumanSoldierToken| +|Generate|TOK:IKO|Human Soldier|2||HumanSoldierToken| +|Generate|TOK:IKO|Human Soldier|3||HumanSoldierToken| |Generate|TOK:IKO|Kraken|||KrakenToken| -|Generate|TOK:IKO|Shark|||SharkToken| +|Generate|TOK:IKO|Shark|||SharkToken| \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java b/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java index aa00632951..bc7cd43eac 100644 --- a/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java +++ b/Mage.Sets/src/mage/cards/q/QuartzwoodCrasher.java @@ -12,7 +12,6 @@ import mage.game.Game; import mage.game.events.DamagedPlayerEvent; import mage.game.events.GameEvent; import mage.game.permanent.Permanent; -import mage.game.permanent.token.BeastXToken; import mage.game.permanent.token.DinosaurBeastToken; import mage.target.targetpointer.FixedTarget; import mage.watchers.Watcher; diff --git a/Mage/src/main/java/mage/game/permanent/token/BeastXToken.java b/Mage/src/main/java/mage/game/permanent/token/BeastXToken.java deleted file mode 100644 index 8d8ea05429..0000000000 --- a/Mage/src/main/java/mage/game/permanent/token/BeastXToken.java +++ /dev/null @@ -1,31 +0,0 @@ -package mage.game.permanent.token; - -import mage.MageInt; -import mage.abilities.keyword.TrampleAbility; -import mage.constants.CardType; -import mage.constants.SubType; - -/** - * @author TheElk801 - */ -public final class BeastXToken extends TokenImpl { - - public BeastXToken(int xValue) { - super("Beast", "X/X green Beast creature token"); - cardType.add(CardType.CREATURE); - color.setGreen(true); - subtype.add(SubType.BEAST); - power = new MageInt(xValue); - toughness = new MageInt(xValue); - addAbility(TrampleAbility.getInstance()); - } - - private BeastXToken(final BeastXToken token) { - super(token); - } - - @Override - public BeastXToken copy() { - return new BeastXToken(this); - } -} diff --git a/Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java b/Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java index 6c0ab5730b..ad0026141e 100644 --- a/Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/DinosaurBeastToken.java @@ -1,13 +1,11 @@ - package mage.game.permanent.token; -import mage.constants.CardType; -import mage.MageInt; -import mage.abilities.keyword.TrampleAbility; -import mage.constants.SubType; + import mage.MageInt; + import mage.abilities.keyword.TrampleAbility; + import mage.constants.CardType; + import mage.constants.SubType; /** - * * @author TheElk801 */ public final class DinosaurBeastToken extends TokenImpl { @@ -23,10 +21,11 @@ public final class DinosaurBeastToken extends TokenImpl { addAbility(TrampleAbility.getInstance()); } - public DinosaurBeastToken(final DinosaurBeastToken token) { + private DinosaurBeastToken(final DinosaurBeastToken token) { super(token); } + @Override public DinosaurBeastToken copy() { return new DinosaurBeastToken(this); } diff --git a/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java b/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java index 1d99d2328c..d331b634d5 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanSoldierToken.java @@ -3,6 +3,7 @@ package mage.game.permanent.token; import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; +import mage.util.RandomUtil; public final class HumanSoldierToken extends TokenImpl { @@ -16,6 +17,15 @@ public final class HumanSoldierToken extends TokenImpl { toughness = new MageInt(1); } + @Override + public void setExpansionSetCodeForImage(String code) { + super.setExpansionSetCodeForImage(code); + + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("IKO")) { + setTokenType(RandomUtil.nextInt(3) + 1); // 1...3 + } + } + public HumanSoldierToken(final HumanSoldierToken token) { super(token); }