Completed the keyword: Poisonous

The keyword Poisonous only existed as Poisonous 1. I generalized it to take any integer.
Changed code in executePlayerCombatDamageEffects:
Changed code in executePlayerCombatDamageEffects:
- Code: Select all
if (c.hasStartOfKeyword("Poisonous"))
{
int KeywordPosition = c.getKeywordPosition("Poisonous");
String parse = c.getKeyword().get(KeywordPosition).toString();
String k[] = parse.split(" ");
final int poison = Integer.parseInt(k[1]);
final Card crd = c;
Ability ability = new Ability(c, "0")
{
public void resolve()
{
final String player = crd.getController();
final String opponent = AllZone.GameAction.getOpponent(player);
if(opponent.equals(Constant.Player.Human))
AllZone.Human_PoisonCounter.addPoisonCounters(poison);
else
AllZone.Computer_PoisonCounter.addPoisonCounters(poison);
}
};
StringBuilder sb = new StringBuilder();
sb.append(c);
sb.append(" - Poisonous: ");
sb.append(AllZone.GameAction.getOpponent(c.getController()));
sb.append(" gets poison counters.");
ability.setStackDescription(sb.toString());
ArrayList<String> keywords = c.getKeyword();
for (int i=0;i<keywords.size();i++)
{
if (keywords.get(i).contains("Poisonous"))
AllZone.Stack.add(ability);
}
}
- Code: Select all
Name:Snake Cult Initiation
ManaCost:3 B
Types:Enchantment Aura
Text:Enchanted creature has poisonous 3.
K:Enchant creature
K:enPump:Poisonous 3