Page 1 of 1

Completed the keyword: Poisonous

PostPosted: 16 Sep 2010, 17:35
by Sloth
The keyword Poisonous only existed as Poisonous 1. I generalized it to take any integer.

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);
         }
      }
Example (and only possible new card):
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

Re: Completed the keyword: Poisonous

PostPosted: 16 Sep 2010, 21:04
by Rob Cashwalker
Of course, this only appears on two cards... though one of them is a Sliver.

Maro said that they shot down "Poisonous", hence "Infect".

Re: Completed the keyword: Poisonous

PostPosted: 17 Sep 2010, 05:36
by Sloth
Rob Cashwalker wrote:Maro said that they shot down "Poisonous", hence "Infect".
Really? Well, one new card, is one new card.

PS: I guess I will make a set of AI poison decks to show that we need each of the cards that deal poison counters.

Re: Completed the keyword: Poisonous

PostPosted: 17 Sep 2010, 11:16
by Rob Cashwalker
True, I guess it works just as well for the older poison creatures... which were all "Poisonous 1" essentially.