New keyword: spMakeToken
I would like to propose a new keyword: spMakeToken
The syntax would be as follows:
X is accepted for Num.
I chose "<>" and ";" for delimiters so keywords to be added to the token containing ":" and"," could be accepted.
CardFactory.java:
I will be updating the following cards with this keyword:
Dragon Fodder
Empty the Warrens
Feral Lightning
Howl of the Night Pack
Hunting Pack
Join the Ranks
Martial Coup - needs some looking into
Raise the Alarm
Reach of Branches
Skittering Invasion
Sound the Call
Spectral Procession
Storm Herd
-slapshot5
The syntax would be as follows:
- Code: Select all
spMakeToken<>Num<>Name<>imageName<>controller<>manaCost<>type1;type2<>attack<>defense<>keyword1;keyword2
X is accepted for Num.
I chose "<>" and ";" for delimiters so keywords to be added to the token containing ":" and"," could be accepted.
CardFactory.java:
- Code: Select all
if(hasKeyword(card, "spMakeToken") != -1) {
int n = hasKeyword(card, "spMakeToken");
String parse = card.getKeyword().get(n).toString();
card.removeIntrinsicKeyword(parse);
final String[] k = parse.split("<>");
SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = -5286946184688616830L;
@Override
public void resolve() {
final int num = "X".equals(k[1]) ? CardFactoryUtil.xCount(card, card.getSVar("X")) : Integer.valueOf(k[1]);
final String name = k[2];
final String imageName = k[3];
final String controller = (k[4].equals("Controller") ? card.getController() : AllZone.GameAction.getOpponent(card.getController()));
final String manaCost = k[5];
final String[] types = k[6].split(";");
final int attack = Integer.valueOf(k[7]);
final int defense = Integer.valueOf(k[8]);
final String[] keywords = k[9].split(";");
for(int i = 0; i < num; i ++ ){
if(k[9].equals("None")) keywords[0] = "";
CardFactoryUtil.makeToken(name, imageName, controller, manaCost, types, attack, defense, keywords);
}
}
};
card.clearSpellAbility();
card.addSpellAbility(spell);
}//end MakeToken
- Code: Select all
Name:Dragon Fodder
ManaCost:1 R
Types:Sorcery
Text:Put two 1/1 red Goblin creature tokens onto the battlefield.
K:spMakeToken<>2<>Goblin<>R 1 1 Goblin<>Controller<>R<>Creature;Goblin<>1<>1<>None
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/dragon_fodder.jpg
End
- Code: Select all
Name:Howl of the Night Pack
ManaCost:6 G
Types:Sorcery
Text:Put a 2/2 green Wolf creature token onto the battlefield for each Forest you control.
K:spMakeToken<>1<>Wolf<>G 2 2 Wolf<>Controller<>G<>Creature;Wolf<>2<>2<>None
SVar:X:Count$TypeYouCtrl.Forest
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/howl_of_the_night_pack.jpg
End
I will be updating the following cards with this keyword:
Dragon Fodder
Empty the Warrens
Feral Lightning
Howl of the Night Pack
Hunting Pack
Join the Ranks
Martial Coup - needs some looking into
Raise the Alarm
Reach of Branches
Skittering Invasion
Sound the Call
Spectral Procession
Storm Herd
-slapshot5