diff --git a/res/cardsfolder/battle_screech.txt b/res/cardsfolder/battle_screech.txt index 548571d9e67..54d8d7211b1 100644 --- a/res/cardsfolder/battle_screech.txt +++ b/res/cardsfolder/battle_screech.txt @@ -2,7 +2,7 @@ Name:Battle Screech ManaCost:2 W W Types:Sorcery Text:no text -A:SP$Token|Cost$2 W W|TokenOwner$Controller|TokenAmount$2|TokenName$Bird|TokenTypes$Creature,Bird|TokenColors$White|TokenPower$1|TokenToughness$1|TokenKeywords$Flying|SpellDescription$Put two 1/1 white Bird creature tokens with flying onto the battlefield. +A:SP$Token|Cost$2 W W|TokenImage$W 1 1 Bird Flying|TokenOwner$Controller|TokenAmount$2|TokenName$Bird|TokenTypes$Creature,Bird|TokenColors$White|TokenPower$1|TokenToughness$1|TokenKeywords$Flying|SpellDescription$Put two 1/1 white Bird creature tokens with flying onto the battlefield. K:Flashback:tapXType<3/Creature.White> SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/battle_screech.jpg diff --git a/res/cardsfolder/carrion_call.txt b/res/cardsfolder/carrion_call.txt index a179f1ee89d..04f3666f35c 100644 --- a/res/cardsfolder/carrion_call.txt +++ b/res/cardsfolder/carrion_call.txt @@ -3,7 +3,7 @@ ManaCost:3 G Types:Instant Text:Put two 1/1 green Insect creature tokens with infect onto the battlefield. #K:spMakeToken<>2<>Insect<>G 1 1 Insect<>Controller<>G<>Creature;Insect<>1<>1<>Infect -A:SP$Token|Cost$3 G|TokenAmount$2|TokenName$Insect|TokenTypes$Creature,Insect|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1|TokenKeywords$Infect +A:SP$Token|Cost$3 G|TokenImage$G 1 1 Insect Infect|TokenAmount$2|TokenName$Insect|TokenTypes$Creature,Insect|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1|TokenKeywords$Infect SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/carrion_call.jpg End diff --git a/res/cardsfolder/trigon_of_infestation.txt b/res/cardsfolder/trigon_of_infestation.txt index 581e46df682..4147b373092 100644 --- a/res/cardsfolder/trigon_of_infestation.txt +++ b/res/cardsfolder/trigon_of_infestation.txt @@ -5,7 +5,7 @@ Text:no text K:etbCounter:CHARGE:3 A:AB$PutCounter|Cost$G G T|CounterType$CHARGE|CounterNum$1|SpellDescription$Put a charge counter on CARDNAME. #K:abMakeToken 2 T SubCounter<1/CHARGE><>1<>Insect<>G 1 1 Insect Infect<>Controller<>G<>Creature;Insect<>1<>1<>Infect<>Put a 1/1 green Insect creature token with infect onto the battlefield. -A:AB$Token|Cost$2 T SubCounter<1/CHARGE>|TokenAmount$1|TokenName$Insect|TokenTypes$Creature,Insect|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1|TokenKeywords$Infect|SpellDescription$Put a 1/1 green Insect creature token with infect onto the battlefield. +A:AB$Token|Cost$2 T SubCounter<1/CHARGE>|TokenImage$G 1 1 Insect Infect|TokenAmount$1|TokenName$Insect|TokenTypes$Creature,Insect|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1|TokenKeywords$Infect|SpellDescription$Put a 1/1 green Insect creature token with infect onto the battlefield. SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/trigon_of_infestation.jpg End \ No newline at end of file diff --git a/src/forge/AbilityFactory.java b/src/forge/AbilityFactory.java index 8d6c31da66e..07a22d06e45 100644 --- a/src/forge/AbilityFactory.java +++ b/src/forge/AbilityFactory.java @@ -299,7 +299,7 @@ public class AbilityFactory { if(API.equals("Token")){ AbilityFactory_Token AFT = new AbilityFactory_Token(); - String numTokens,numPower,numToughness; + String numTokens,numPower,numToughness,image; String[] keywords; if(!mapParams.get("TokenAmount").matches("[0-9][0-9]?")) //It's an X-value. @@ -324,10 +324,17 @@ public class AbilityFactory { keywords = new String[0]; } + if(mapParams.containsKey("TokenImage")) { + image = mapParams.get("TokenImage"); + } + else { + image = ""; + } + if(isAb) - SA = AFT.getAbility(this, numTokens, mapParams.get("TokenName"), mapParams.get("TokenTypes").split(","), mapParams.get("TokenOwner"), mapParams.get("TokenColors").split(","), numPower, numToughness, keywords ); + SA = AFT.getAbility(this, numTokens, mapParams.get("TokenName"), mapParams.get("TokenTypes").split(","), mapParams.get("TokenOwner"), mapParams.get("TokenColors").split(","), numPower, numToughness, keywords, image); if(isSp) - SA = AFT.getSpell(this, numTokens, mapParams.get("TokenName"), mapParams.get("TokenTypes").split(","), mapParams.get("TokenOwner"), mapParams.get("TokenColors").split(","), numPower, numToughness, keywords); + SA = AFT.getSpell(this, numTokens, mapParams.get("TokenName"), mapParams.get("TokenTypes").split(","), mapParams.get("TokenOwner"), mapParams.get("TokenColors").split(","), numPower, numToughness, keywords, image); } if (API.equals("GainControl")) { diff --git a/src/forge/AbilityFactory_Token.java b/src/forge/AbilityFactory_Token.java index f18ab98a10a..228a41f4aca 100644 --- a/src/forge/AbilityFactory_Token.java +++ b/src/forge/AbilityFactory_Token.java @@ -11,8 +11,9 @@ public class AbilityFactory_Token extends AbilityFactory { private String[] tokenKeywords; private String tokenPower; private String tokenToughness; + private String tokenImage; - public SpellAbility getAbility(final AbilityFactory af,final String numTokens,final String name,final String[] types,final String owner,final String[] colors,final String power,final String toughness,final String[] keywords) + public SpellAbility getAbility(final AbilityFactory af,final String numTokens,final String name,final String[] types,final String owner,final String[] colors,final String power,final String toughness,final String[] keywords,final String image) { AF = af; tokenAmount = numTokens; @@ -23,6 +24,7 @@ public class AbilityFactory_Token extends AbilityFactory { tokenPower = power; tokenToughness = toughness; tokenKeywords = keywords; + tokenImage = image; final SpellAbility abToken = new Ability_Activated(AF.getHostCard(),AF.getAbCost(),AF.getAbTgt()) { @@ -53,7 +55,7 @@ public class AbilityFactory_Token extends AbilityFactory { return abToken; } - public SpellAbility getSpell(final AbilityFactory af,final String numTokens,final String name,final String[] types,final String owner,final String[] colors,final String power,final String toughness,final String[] keywords) + public SpellAbility getSpell(final AbilityFactory af,final String numTokens,final String name,final String[] types,final String owner,final String[] colors,final String power,final String toughness,final String[] keywords,final String image) { AF = af; tokenAmount = numTokens; @@ -64,6 +66,7 @@ public class AbilityFactory_Token extends AbilityFactory { tokenPower = power; tokenToughness = toughness; tokenKeywords = keywords; + tokenImage = image; final SpellAbility spToken = new Spell(AF.getHostCard(),AF.getAbCost(),AF.getAbTgt()) { @@ -158,8 +161,13 @@ public class AbilityFactory_Token extends AbilityFactory { colorDesc = "C"; } } - - imageName += colorDesc + " " + tokenPower + " " + tokenToughness + " " + tokenName; + if(tokenImage.equals("")) { + + imageName += colorDesc + " " + tokenPower + " " + tokenToughness + " " + tokenName; + } + else { + imageName = tokenImage; + } System.out.println("AF_Token imageName = " + imageName); for(char c : colorDesc.toCharArray()) {