It is currently 26 Apr 2024, 15:42
   
Text Size

Tolsimir Wolfblood

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Tolsimir Wolfblood

Postby DennisBergkamp » 22 Oct 2008, 03:01

In cards.txt:

Code: Select all
Tolsimir Wolfblood
4 G W
Legendary Creature Elf Warrior
Other green creatures you control get +1/+1. Other white creatures you control get +1/+1.
3/4
In CardFactory.java:

Code: Select all
//*************** START *********** START **************************
    if(cardName.equals("Tolsimir Wolfblood"))
    {
      final SpellAbility a1 = new Ability_Tap(card)
      {
        public void resolve()
        {
          makeToken();
        }
        void makeToken()
        {
          Card c = new Card();

          c.setName("Voja");

          c.setOwner(card.getController());
          c.setController(card.getController());

          c.setManaCost("W G");
          c.setToken(true);
         
          c.addType("Legendary");
          c.addType("Creature");
          c.addType("Wolf");
          c.setAttack(2);
          c.setDefense(2);

          PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
          play.add(c);
        }//makeToken()
      };//SpellAbility
      card.addSpellAbility(a1);
      a1.setDescription("T: Put a legendary 2/2 green and white Wolf creature token named Voja into play.");
      a1.setStackDescription("Put a 2/2 white green Legendary Wolf creature token named Voja into play.");

      a1.setBeforePayMana(new Input_PayManaCost(a1));
    }//*************** END ************ END **************************
In GameActionUtil.java:

Code: Select all
private static Command Tolsimir = new Command()
  {
    CardList gloriousAnthemList = new CardList();
    public void execute()
    {
      CardList list = gloriousAnthemList;
      Card c;
      //reset all cards in list - aka "old" cards
      for(int i = 0; i < list.size(); i++)
      {
        c = list.get(i);
        if (CardUtil.getColors(c).contains(Constant.Color.Green) && !c.getName().equals("Tolsimir Wolfblood")) {
           c.setAttack(c.getAttack() - 1);
           c.setDefense(c.getDefense() - 1);
        }
        if (CardUtil.getColors(c).contains(Constant.Color.White) && !c.getName().equals("Tolsimir Wolfblood")) {
           c.setAttack(c.getAttack() - 1);
           c.setDefense(c.getDefense() - 1);
        }
      }

      //add +1/+1 to cards
      list.clear();
      PlayerZone[] zone = getZone("Tolsimir Wolfblood");

      //for each zone found add +1/+1 to each card
      for(int outer = 0; outer < zone.length; outer++)
      {
        CardList creature = new CardList(zone[outer].getCards());
        creature = creature.getType("Creature");

        for(int i = 0; i < creature.size(); i++)
        {
          c = creature.get(i);
          if (CardUtil.getColors(c).contains(Constant.Color.Green) && !c.getName().equals("Tolsimir Wolfblood")) {
             c.setAttack(c.getAttack() + 1);
             c.setDefense(c.getDefense() + 1);
          }
          if (CardUtil.getColors(c).contains(Constant.Color.White) && !c.getName().equals("Tolsimir Wolfblood")) {
               c.setAttack(c.getAttack() + 1);
               c.setDefense(c.getDefense() + 1);
            }

          gloriousAnthemList.add(c);
        }//for inner
      }//for outer
    }//execute()
  };//Tolsimir
Then also put a
Code: Select all
Tolsimir.execute();
in executeCardStateEffects().
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Return to Forge

Who is online

Users browsing this forum: Google [Bot] and 145 guests


Who is online

In total there are 146 users online :: 1 registered, 0 hidden and 145 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: Google [Bot] and 145 guests

Login Form