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 db48a3ad5e..b74a5fe708 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 @@ -34,6 +34,22 @@ public class ScryfallImageSupportTokens { put("RIX/Emblem Huatli, Radiant Champion", "https://api.scryfall.com/cards/trix/5/en?format=image"); put("RIX/Saproling", "https://api.scryfall.com/cards/trix/3/en?format=image"); + // RNA + put("RNA/Beast", "https://api.scryfall.com/cards/trna/8/en?format=image"); + put("RNA/Centaur", "https://api.scryfall.com/cards/trna/5/en?format=image"); + put("RNA/Domri, Chaos Bringer", "https://api.scryfall.com/cards/trna/13/en?format=image"); + put("RNA/Frog Lizard", "https://api.scryfall.com/cards/trna/6/en?format=image"); + put("RNA/Goblin", "https://api.scryfall.com/cards/trna/4/en?format=image"); + put("RNA/Human", "https://api.scryfall.com/cards/trna/1/en?format=image"); + put("RNA/Illusion", "https://api.scryfall.com/cards/trna/2/en?format=image"); + put("RNA/Ooze", "https://api.scryfall.com/cards/trna/7/en?format=image"); + put("RNA/Sphinx", "https://api.scryfall.com/cards/trna/9/en?format=image"); + put("RNA/Spirit", "https://api.scryfall.com/cards/trna/10/en?format=image"); + put("RNA/Thopter", "https://api.scryfall.com/cards/trna/11/en?format=image"); + put("RNA/Treasure", "https://api.scryfall.com/cards/trna/12/en?format=image"); + put("RNA/Zombie", "https://api.scryfall.com/cards/trna/3/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 bdb9410a86..fd3f65f7aa 100644 --- a/Mage.Client/src/main/resources/card-pictures-tok.txt +++ b/Mage.Client/src/main/resources/card-pictures-tok.txt @@ -86,6 +86,7 @@ |Generate|EMBLEM:MMA|Elspeth, Knight Errant||Emblem Elspeth|ElspethKnightErrantEmblem| |Generate|EMBLEM:SWS|Obi-Wan Kenobi||Emblem Obi-Wan Kenobi|ObiWanKenobiEmblem| |Generate|EMBLEM:RIX|Huatli, Radiant Champion||Emblem Huatli|HuatliRadiantChampionEmblem| +|Generate|EMBLEM:RNA|Domri, Chaos Bringer||Emblem Domri|DomriChaosBringerEmblem| |Generate|PLANE:PCA|Plane - Academy At Tolaria West|||AcademyAtTolariaWestPlane| |Generate|PLANE:PCA|Plane - Agyrem|||AgyremPlane| |Generate|PLANE:PCA|Plane - Akoum|||AkoumPlane| @@ -1185,3 +1186,15 @@ |Generate|TOK:ZEN|Vampire|| |Generate|TOK:ZEN|Wolf|||WolfToken| |Generate|TOK:ZEN|Zombie Giant|||QuestForTheGravelordZombieToken| +|Generate|TOK:RNA|Beast|||RedGreenBeastToken| +|Generate|TOK:RNA|Centaur|||CentaurToken| +|Generate|TOK:RNA|Frog Lizard|||FrogLizardToken| +|Generate|TOK:RNA|Goblin|||GoblinToken| +|Generate|TOK:RNA|Human|||HumanToken| +|Generate|TOK:RNA|Illusion|||MesmerizingBenthidToken| +|Generate|TOK:RNA|Ooze|||BiogenicOozeToken| +|Generate|TOK:RNA|Sphinx|||WardenSphinxToken| +|Generate|TOK:RNA|Spirit|||SpiritWhiteToken| +|Generate|TOK:RNA|Thopter|||ThopterToken| +|Generate|TOK:RNA|Treasure|||TreasureToken| +|Generate|TOK:RNA|Zombie|||ZombieToken| \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/b/BiogenicOoze.java b/Mage.Sets/src/mage/cards/b/BiogenicOoze.java index 98aad42039..2ed74d5137 100644 --- a/Mage.Sets/src/mage/cards/b/BiogenicOoze.java +++ b/Mage.Sets/src/mage/cards/b/BiogenicOoze.java @@ -17,7 +17,7 @@ import mage.counters.CounterType; import mage.filter.FilterPermanent; import mage.filter.common.FilterControlledPermanent; import mage.filter.predicate.mageobject.SubtypePredicate; -import mage.game.permanent.token.OozeToken; +import mage.game.permanent.token.BiogenicOozeToken; import java.util.UUID; @@ -41,7 +41,7 @@ public final class BiogenicOoze extends CardImpl { // When Biogenic Ooze enters the battlefield, create a 2/2 green Ooze creature token. this.addAbility(new EntersBattlefieldTriggeredAbility( - new CreateTokenEffect(new OozeToken(2, 2)) + new CreateTokenEffect(new BiogenicOozeToken()) )); // At the beginning if your end step, put a +1/+1 counter on each Ooze you control. @@ -52,7 +52,7 @@ public final class BiogenicOoze extends CardImpl { // {1}{G}{G}{G}: Create a 2/2 green Ooze creature token. Ability ability = new SimpleActivatedAbility( - new CreateTokenEffect(new OozeToken(2, 2)), + new CreateTokenEffect(new BiogenicOozeToken()), new ManaCostsImpl("{1}{G}{G}{G}") ); } diff --git a/Mage.Sets/src/mage/cards/w/WarrantWarden.java b/Mage.Sets/src/mage/cards/w/WarrantWarden.java index 1e89140d73..f115a5cd53 100644 --- a/Mage.Sets/src/mage/cards/w/WarrantWarden.java +++ b/Mage.Sets/src/mage/cards/w/WarrantWarden.java @@ -2,13 +2,11 @@ package mage.cards.w; import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.PutOnLibraryTargetEffect; -import mage.abilities.keyword.FlyingAbility; -import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardSetInfo; import mage.cards.SplitCard; import mage.constants.CardType; import mage.constants.SpellAbilityType; -import mage.game.permanent.token.custom.CreatureToken; +import mage.game.permanent.token.WardenSphinxToken; import mage.target.common.TargetAttackingOrBlockingCreature; import java.util.UUID; @@ -28,12 +26,7 @@ public final class WarrantWarden extends SplitCard { // Warden // Create a 4/4 white and blue Sphinx creature token with flying and vigilance. - this.getRightHalfCard().getSpellAbility().addEffect(new CreateTokenEffect( - new CreatureToken(4, 4, "4/4 white and blue Sphinx creature token with flying and vigilance") - .withColor("WU") - .withAbility(FlyingAbility.getInstance()) - .withAbility(VigilanceAbility.getInstance()) - )); + this.getRightHalfCard().getSpellAbility().addEffect(new CreateTokenEffect(new WardenSphinxToken())); } private WarrantWarden(final WarrantWarden card) { diff --git a/Mage/src/main/java/mage/game/permanent/token/BiogenicOozeToken.java b/Mage/src/main/java/mage/game/permanent/token/BiogenicOozeToken.java new file mode 100644 index 0000000000..3f25f1635e --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/BiogenicOozeToken.java @@ -0,0 +1,26 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +public final class BiogenicOozeToken extends TokenImpl { + + public BiogenicOozeToken() { + super("Ooze", "2/2 green Ooze creature token"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.OOZE); + color.setGreen(true); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + setOriginalExpansionSetCode("RNA"); + } + + public BiogenicOozeToken(final BiogenicOozeToken token) { + super(token); + } + + public BiogenicOozeToken copy() { + return new BiogenicOozeToken(this); + } +} diff --git a/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java b/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java index a9984358df..593a757c1c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/CentaurToken.java @@ -1,17 +1,15 @@ - - package mage.game.permanent.token; +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.util.RandomUtil; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import mage.constants.CardType; -import mage.constants.SubType; -import mage.MageInt; -import mage.util.RandomUtil; /** - * * @author LevelX2 */ public final class CentaurToken extends TokenImpl { @@ -19,13 +17,16 @@ public final class CentaurToken extends TokenImpl { final static private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("RTR", "MM3")); + tokenImageSets.addAll(Arrays.asList("RTR", "MM3", "RNA")); } public CentaurToken() { super("Centaur", "3/3 green Centaur creature token"); cardType.add(CardType.CREATURE); - setTokenType(RandomUtil.nextInt(2) +1); // randomly take image 1 or 2 + availableImageSetCodes = tokenImageSets; + if (getOriginalExpansionSetCode() != null && getOriginalExpansionSetCode().equals("RNA")) { + setTokenType(RandomUtil.nextInt(2) + 1); // randomly take image 1 or 2 + } color.setGreen(true); subtype.add(SubType.CENTAUR); power = new MageInt(3); diff --git a/Mage/src/main/java/mage/game/permanent/token/FrogLizardToken.java b/Mage/src/main/java/mage/game/permanent/token/FrogLizardToken.java index bf46efa927..5a11a15633 100644 --- a/Mage/src/main/java/mage/game/permanent/token/FrogLizardToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/FrogLizardToken.java @@ -1,19 +1,16 @@ - - package mage.game.permanent.token; + +import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; -import mage.MageInt; /** - * * @author spjspj */ public final class FrogLizardToken extends TokenImpl { public FrogLizardToken() { super("Frog Lizard", "3/3 green Frog Lizard creature token"); - this.setOriginalExpansionSetCode("GTC"); cardType.add(CardType.CREATURE); color.setGreen(true); 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 79a3a2236d..19a6571f9d 100644 --- a/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/GoblinToken.java @@ -1,16 +1,15 @@ - package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import mage.MageInt; import mage.abilities.keyword.HasteAbility; import mage.constants.CardType; import mage.constants.SubType; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** - * * @author North */ public final class GoblinToken extends TokenImpl { @@ -20,7 +19,7 @@ public final class GoblinToken extends TokenImpl { static { tokenImageSets.addAll(Arrays.asList("10E", "ALA", "SOM", "M10", "NPH", "M13", "RTR", "MMA", "M15", "C14", "KTK", "EVG", "DTK", "ORI", "DDG", "DDN", "DD3EVG", "MM2", - "MM3", "EMA", "C16", "DOM", "ANA")); + "MM3", "EMA", "C16", "DOM", "ANA", "RNA")); } public GoblinToken(boolean withHaste) { 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 83524c1f95..b1509f116b 100644 --- a/Mage/src/main/java/mage/game/permanent/token/HumanToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/HumanToken.java @@ -1,14 +1,12 @@ - - package mage.game.permanent.token; -import java.util.Arrays; +import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; -import mage.MageInt; + +import java.util.Arrays; /** - * * @author LoneFox */ public final class HumanToken extends TokenImpl { @@ -20,7 +18,7 @@ public final class HumanToken extends TokenImpl { subtype.add(SubType.HUMAN); power = new MageInt(1); toughness = new MageInt(1); - availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP")); + availableImageSetCodes.addAll(Arrays.asList("DKA", "AVR", "FNMP", "RNA")); } public HumanToken(final HumanToken token) { @@ -28,7 +26,7 @@ public final class HumanToken extends TokenImpl { } @Override - public HumanToken copy() { + public HumanToken copy() { return new HumanToken(this); } diff --git a/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java b/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java index 8c23d37635..c2d50814b8 100644 --- a/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/MesmerizingBenthidToken.java @@ -1,4 +1,3 @@ - package mage.game.permanent.token; import mage.MageInt; @@ -16,6 +15,7 @@ public final class MesmerizingBenthidToken extends TokenImpl { super("Illusion", "0/2 blue Illusion creature token with \"Whenever this creature blocks a creature, that creature doesn't untap during its controller's next untap step.\""); cardType.add(CardType.CREATURE); color.setBlue(true); + setOriginalExpansionSetCode("RNA"); subtype.add(SubType.ILLUSION); power = new MageInt(0); diff --git a/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java b/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java index 64668eb42a..b3bc59eeba 100644 --- a/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/SpiritWhiteToken.java @@ -1,14 +1,14 @@ - package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import mage.MageInt; import mage.abilities.keyword.FlyingAbility; import mage.constants.CardType; import mage.constants.SubType; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** * @author nantuko */ @@ -17,7 +17,8 @@ public final class SpiritWhiteToken extends TokenImpl { final static private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("AVR", "C14", "CNS", "DDC", "DDK", "FRF", "ISD", "KTK", "M15", "MM2", "SHM", "SOI", "EMA", "C16", "MM3", "CMA", "E01", "ANA")); + tokenImageSets.addAll(Arrays.asList("AVR", "C14", "CNS", "DDC", "DDK", "FRF", "ISD", "KTK", "M15", "MM2", "SHM", + "SOI", "EMA", "C16", "MM3", "CMA", "E01", "ANA", "RNA")); } public SpiritWhiteToken() { diff --git a/Mage/src/main/java/mage/game/permanent/token/TokenImpl.java b/Mage/src/main/java/mage/game/permanent/token/TokenImpl.java index 86ba65c2c7..222b063c81 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TokenImpl.java +++ b/Mage/src/main/java/mage/game/permanent/token/TokenImpl.java @@ -1,9 +1,5 @@ package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.UUID; import mage.MageObject; import mage.MageObjectImpl; import mage.abilities.Ability; @@ -18,6 +14,11 @@ import mage.game.permanent.PermanentToken; import mage.players.Player; import mage.util.RandomUtil; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.UUID; + public abstract class TokenImpl extends MageObjectImpl implements Token { protected String description; @@ -241,6 +242,8 @@ public abstract class TokenImpl extends MageObjectImpl implements Token { @Override public void setOriginalExpansionSetCode(String originalExpansionSetCode) { + // TODO: remove original set code at all... token image must be takes by card source or by latest set (on null source) + // TODO: if set have same tokens then selects it by random this.originalExpansionSetCode = originalExpansionSetCode; setTokenDescriptor(); } 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 aba3940cb6..6325461b40 100644 --- a/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/TreasureToken.java @@ -1,9 +1,5 @@ - package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import mage.abilities.Ability; import mage.abilities.costs.common.SacrificeSourceCost; import mage.abilities.costs.common.TapSourceCost; @@ -13,8 +9,11 @@ import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Zone; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** - * * @author TheElk801 */ public final class TreasureToken extends TokenImpl { @@ -22,7 +21,7 @@ public final class TreasureToken extends TokenImpl { final static private List tokenImageSets = new ArrayList<>(); static { - tokenImageSets.addAll(Arrays.asList("XLN")); + tokenImageSets.addAll(Arrays.asList("XLN", "RNA")); } public TreasureToken() { diff --git a/Mage/src/main/java/mage/game/permanent/token/WardenSphinxToken.java b/Mage/src/main/java/mage/game/permanent/token/WardenSphinxToken.java new file mode 100644 index 0000000000..45542d6ae0 --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/WardenSphinxToken.java @@ -0,0 +1,34 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author JayDi85 + */ +public final class WardenSphinxToken extends TokenImpl { + + public WardenSphinxToken() { + super("Sphinx", "4/4 white and blue Sphinx creature token with flying and vigilance"); + this.setOriginalExpansionSetCode("RNA"); + color.setWhite(true); + color.setBlue(true); + cardType.add(CardType.CREATURE); + subtype.add(SubType.SPHINX); + power = new MageInt(4); + toughness = new MageInt(4); + this.addAbility(FlyingAbility.getInstance()); + this.addAbility(VigilanceAbility.getInstance()); + } + + public WardenSphinxToken(final WardenSphinxToken token) { + super(token); + } + + public WardenSphinxToken copy() { + return new WardenSphinxToken(this); + } +} 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 d0080034f4..432de3e57c 100644 --- a/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java +++ b/Mage/src/main/java/mage/game/permanent/token/ZombieToken.java @@ -1,17 +1,15 @@ - package mage.game.permanent.token; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - import mage.MageInt; import mage.constants.CardType; import mage.constants.SubType; import mage.util.RandomUtil; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + /** - * * @author BetaSteward_at_googlemail.com */ public final class ZombieToken extends TokenImpl { @@ -20,7 +18,7 @@ public final class ZombieToken extends TokenImpl { static { tokenImageSets.addAll(Arrays.asList("10E", "M10", "M11", "M12", "M13", "M14", "M15", "MBS", "ALA", "ISD", "C14", "C15", "C16", "C17", "CNS", - "MMA", "BNG", "KTK", "DTK", "ORI", "OGW", "SOI", "EMN", "EMA", "MM3", "AKH", "CMA", "E01")); + "MMA", "BNG", "KTK", "DTK", "ORI", "OGW", "SOI", "EMN", "EMA", "MM3", "AKH", "CMA", "E01", "RNA")); } public ZombieToken() {