It is currently 07 Jul 2021, 14:40
   
Text Size

ComuterUtil_Block2.removeValuableBlockers()

Post MTG Forge Related Programming Questions Here

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

ComuterUtil_Block2.removeValuableBlockers()

Postby Chris H. » 28 Oct 2010, 00:04

In the file ComuterUtil_Block2.java I found a method named removeValuableBlockers(). It appears to contain a short list list of creatures that the computer will not use to block an attacker.

If this code is used then we may at some point want to create a new SVar and check for it here.

Code: Select all
   private CardList removeValuableBlockers(CardList in)
   {
      final String[] noBlock = {"Elvish Piper", "Urborg Syphon-Mage", "Sparksmith", "Royal Assassin", "Marble Titan", "Kamahl, Pit Fighter"};

      CardList out = in.filter(new CardListFilter()
      {
         public boolean addCard(Card c)
         {
            for(int i = 0; i < noBlock.length; i++)
            if(c.getName().equals(noBlock[i]))
            return false;

            return true;
         }
      });//CardListFilter

      return out;
   }
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 12 guests


Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests (based on users active over the past 10 minutes)
Most users ever online was 1922 on 07 Jun 2021, 06:01

Users browsing this forum: No registered users and 12 guests

Login Form