mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[ZNR] Added tokens support and download
This commit is contained in:
parent
778729f20a
commit
6bc040ef6c
17 changed files with 90 additions and 56 deletions
|
@ -448,6 +448,18 @@ public class ScryfallImageSupportTokens {
|
|||
put("M21/Weird", "https://api.scryfall.com/cards/tm21/13/en?format=image");
|
||||
put("M21/Zombie", "https://api.scryfall.com/cards/tm21/7/en?format=image");
|
||||
|
||||
// ZNR
|
||||
put("ZNR/Angel Warrior", "https://api.scryfall.com/cards/tznr/1/en?format=image");
|
||||
put("ZNR/Cat Beast", "https://api.scryfall.com/cards/tznr/3/en?format=image");
|
||||
put("ZNR/Cat", "https://api.scryfall.com/cards/tznr/2/en?format=image");
|
||||
put("ZNR/Construct", "https://api.scryfall.com/cards/tznr/10/en?format=image");
|
||||
put("ZNR/Drake", "https://api.scryfall.com/cards/tznr/5/en?format=image");
|
||||
put("ZNR/Goblin Construct", "https://api.scryfall.com/cards/tznr/11/en?format=image");
|
||||
put("ZNR/Hydra", "https://api.scryfall.com/cards/tznr/9/en?format=image");
|
||||
put("ZNR/Illusion", "https://api.scryfall.com/cards/tznr/6/en?format=image");
|
||||
put("ZNR/Insect", "https://api.scryfall.com/cards/tznr/7/en?format=image");
|
||||
put("ZNR/Kor Warrior", "https://api.scryfall.com/cards/tznr/4/en?format=image");
|
||||
put("ZNR/Plant", "https://api.scryfall.com/cards/tznr/8/en?format=image");
|
||||
|
||||
// generate supported sets
|
||||
supportedSets.clear();
|
||||
|
|
|
@ -1425,4 +1425,17 @@
|
|||
# JMP
|
||||
# Jumpstart uses tokens and emblems from M21 set,
|
||||
# TODO: check scryfall for JMP tokens after set's release
|
||||
|Generate|TOK:JMP|Unicorn|||UnicornToken|
|
||||
|Generate|TOK:JMP|Unicorn|||UnicornToken|
|
||||
|
||||
# ZNR
|
||||
|Generate|TOK:ZNR|Angel Warrior|||AngelWarriorToken|
|
||||
|Generate|TOK:ZNR|Cat|||CatToken3|
|
||||
|Generate|TOK:ZNR|Cat Beast|||CatBeastToken|
|
||||
|Generate|TOK:ZNR|Construct|||ConstructToken|
|
||||
|Generate|TOK:ZNR|Goblin Construct|||RelicRobberToken|
|
||||
|Generate|TOK:ZNR|Drake|||DrakeToken|
|
||||
|Generate|TOK:ZNR|Hydra|||GrakmawSkyclaveRavagerHydraToken|
|
||||
|Generate|TOK:ZNR|Illusion|||CustomIllusionToken|
|
||||
|Generate|TOK:ZNR|Insect|||InsectToken|
|
||||
|Generate|TOK:ZNR|Kor Warrior|||KorWarriorToken|
|
||||
|Generate|TOK:ZNR|Plant|||PlantToken|
|
|
@ -3,6 +3,7 @@ package mage.cards.g;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -18,10 +19,9 @@ import mage.filter.common.FilterControlledCreaturePermanent;
|
|||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.GrakmawSkyclaveRavagerToken;
|
||||
import mage.game.permanent.token.GrakmawSkyclaveRavagerHydraToken;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
|
@ -96,7 +96,7 @@ class GrakmawSkyclaveRavagerEffect extends OneShotEffect {
|
|||
if (permanent != null) {
|
||||
counters = permanent.getCounters(game).getCount(CounterType.P1P1);
|
||||
}
|
||||
return new GrakmawSkyclaveRavagerToken(counters).putOntoBattlefield(
|
||||
return new GrakmawSkyclaveRavagerHydraToken(counters).putOntoBattlefield(
|
||||
1, game, source.getSourceId(), source.getControllerId()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.InscriptionOfInsightToken;
|
||||
import mage.game.permanent.token.CustomIllusionToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
@ -80,8 +80,8 @@ class InscriptionOfInsightEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int cardsInHand = player.getHand().size();
|
||||
return new InscriptionOfInsightToken(player.getHand().size()).putOntoBattlefield(
|
||||
|
||||
return new CustomIllusionToken(player.getHand().size()).putOntoBattlefield(
|
||||
1, game, source.getSourceId(), source.getFirstTarget()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import mage.filter.predicate.permanent.TokenPredicate;
|
|||
import mage.game.ExileZone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.InscriptionOfInsightToken;
|
||||
import mage.game.permanent.token.CustomIllusionToken;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
|
@ -104,7 +104,7 @@ class SkyclaveApparitionEffect extends OneShotEffect {
|
|||
card.getOwnerId(), (u, i) -> i == null ? card.getConvertedManaCost() : Integer.sum(card.getConvertedManaCost(), i)
|
||||
));
|
||||
for (Map.Entry<UUID, Integer> entry : map.entrySet()) {
|
||||
new InscriptionOfInsightToken(entry.getValue()).putOntoBattlefield(
|
||||
new CustomIllusionToken(entry.getValue()).putOntoBattlefield(
|
||||
1, game, source.getSourceId(), entry.getKey()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -5,14 +5,10 @@ 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;
|
||||
|
||||
public final class AngelToken extends TokenImpl {
|
||||
|
||||
static final private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
public AngelToken() {
|
||||
super("Angel", "4/4 white Angel creature token with flying");
|
||||
cardType.add(CardType.CREATURE);
|
||||
|
|
|
@ -5,6 +5,8 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public final class AngelWarriorToken extends TokenImpl {
|
||||
|
||||
public AngelWarriorToken() {
|
||||
|
@ -15,7 +17,10 @@ public final class AngelWarriorToken extends TokenImpl {
|
|||
subtype.add(SubType.WARRIOR);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
|
||||
addAbility(FlyingAbility.getInstance());
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
public AngelWarriorToken(final AngelWarriorToken token) {
|
||||
|
|
|
@ -4,6 +4,8 @@ import mage.MageInt;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
@ -17,6 +19,8 @@ public final class CatBeastToken extends TokenImpl {
|
|||
subtype.add(SubType.BEAST);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
public CatBeastToken(final CatBeastToken token) {
|
||||
|
|
|
@ -4,6 +4,8 @@ import mage.MageInt;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
@ -16,6 +18,8 @@ public final class CatToken3 extends TokenImpl {
|
|||
subtype.add(SubType.CAT);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
private CatToken3(final CatToken3 token) {
|
||||
|
|
|
@ -4,6 +4,8 @@ import mage.MageInt;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author spjspj
|
||||
*/
|
||||
|
@ -16,6 +18,8 @@ public final class ConstructToken extends TokenImpl {
|
|||
subtype.add(SubType.CONSTRUCT);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
public ConstructToken(final ConstructToken token) {
|
||||
|
|
|
@ -4,25 +4,29 @@ import mage.MageInt;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class InscriptionOfInsightToken extends TokenImpl {
|
||||
public final class CustomIllusionToken extends TokenImpl {
|
||||
|
||||
public InscriptionOfInsightToken(int xValue) {
|
||||
public CustomIllusionToken(int xValue) {
|
||||
super("Illusion", "X/X blue Illusion creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlue(true);
|
||||
subtype.add(SubType.ILLUSION);
|
||||
power = new MageInt(xValue);
|
||||
toughness = new MageInt(xValue);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
public InscriptionOfInsightToken(final InscriptionOfInsightToken token) {
|
||||
public CustomIllusionToken(final CustomIllusionToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public InscriptionOfInsightToken copy() {
|
||||
return new InscriptionOfInsightToken(this);
|
||||
public CustomIllusionToken copy() {
|
||||
return new CustomIllusionToken(this);
|
||||
}
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public final class DrakeToken extends TokenImpl {
|
||||
|
@ -23,6 +23,8 @@ public final class DrakeToken extends TokenImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
availableImageSetCodes = Arrays.asList("AKH", "C15", "C19", "M13", "C20", "ZNR");
|
||||
}
|
||||
|
||||
public DrakeToken(final DrakeToken token) {
|
||||
|
|
|
@ -4,12 +4,14 @@ import mage.MageInt;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GrakmawSkyclaveRavagerToken extends TokenImpl {
|
||||
public final class GrakmawSkyclaveRavagerHydraToken extends TokenImpl {
|
||||
|
||||
public GrakmawSkyclaveRavagerToken(int xValue) {
|
||||
public GrakmawSkyclaveRavagerHydraToken(int xValue) {
|
||||
super("Hydra", "X/X black and green Hydra creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
|
@ -17,13 +19,15 @@ public final class GrakmawSkyclaveRavagerToken extends TokenImpl {
|
|||
subtype.add(SubType.HYDRA);
|
||||
power = new MageInt(xValue);
|
||||
toughness = new MageInt(xValue);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
private GrakmawSkyclaveRavagerToken(final GrakmawSkyclaveRavagerToken token) {
|
||||
private GrakmawSkyclaveRavagerHydraToken(final GrakmawSkyclaveRavagerHydraToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public GrakmawSkyclaveRavagerToken copy() {
|
||||
return new GrakmawSkyclaveRavagerToken(this);
|
||||
public GrakmawSkyclaveRavagerHydraToken copy() {
|
||||
return new GrakmawSkyclaveRavagerHydraToken(this);
|
||||
}
|
||||
}
|
|
@ -1,28 +1,18 @@
|
|||
|
||||
|
||||
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 java.util.Arrays;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public final class InsectToken extends TokenImpl {
|
||||
|
||||
static final private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
static {
|
||||
tokenImageSets.addAll(Arrays.asList("M10", "MM2", "SOI"));
|
||||
}
|
||||
|
||||
public InsectToken() {
|
||||
this((String)null);
|
||||
this((String) null);
|
||||
}
|
||||
|
||||
public InsectToken(String setCode) {
|
||||
|
@ -34,7 +24,7 @@ public final class InsectToken extends TokenImpl {
|
|||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
availableImageSetCodes = tokenImageSets;
|
||||
availableImageSetCodes = Arrays.asList("M10", "MM2", "SOI", "ZNR");
|
||||
}
|
||||
|
||||
public InsectToken(final InsectToken token) {
|
||||
|
|
|
@ -4,8 +4,9 @@ import mage.MageInt;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class KorWarriorToken extends TokenImpl {
|
||||
|
@ -18,6 +19,8 @@ public final class KorWarriorToken extends TokenImpl {
|
|||
color.setWhite(true);
|
||||
power = new MageInt(1);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
public KorWarriorToken(final KorWarriorToken token) {
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
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 java.util.Arrays;
|
||||
|
||||
public final class PlantToken extends TokenImpl {
|
||||
|
||||
static final private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
static {
|
||||
tokenImageSets.addAll(Arrays.asList("WWK", "DDP", "OGW"));
|
||||
}
|
||||
|
||||
public PlantToken() {
|
||||
super("Plant", "0/1 green Plant creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
|
@ -23,7 +16,7 @@ public final class PlantToken extends TokenImpl {
|
|||
power = new MageInt(0);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
availableImageSetCodes = tokenImageSets;
|
||||
availableImageSetCodes = Arrays.asList("WWK", "DDP", "OGW", "ZNR");
|
||||
}
|
||||
|
||||
public PlantToken(final PlantToken token) {
|
||||
|
|
|
@ -10,13 +10,10 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
public final class RelicRobberToken extends TokenImpl {
|
||||
|
||||
static final private List<String> tokenImageSets = new ArrayList<>();
|
||||
|
||||
public RelicRobberToken() {
|
||||
super("Goblin Construct", "0/1 colorless Goblin Construct artifact creature token with \"This creature can't block\" and \"At the beginning of your upkeep, this creature deals 1 damage to you.\"");
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
|
@ -25,12 +22,15 @@ public final class RelicRobberToken extends TokenImpl {
|
|||
subtype.add(SubType.CONSTRUCT);
|
||||
power = new MageInt(0);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
new CantBlockSourceEffect(Duration.WhileOnBattlefield).setText("this creature can't block")
|
||||
));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new DamageControllerEffect(
|
||||
1, "this creature"
|
||||
), TargetController.YOU, false));
|
||||
|
||||
availableImageSetCodes = Arrays.asList("ZNR");
|
||||
}
|
||||
|
||||
public RelicRobberToken(final RelicRobberToken token) {
|
||||
|
|
Loading…
Reference in a new issue