It is currently 07 Sep 2025, 15:58
   
Text Size

ComuterUtil_Block2.removeValuableBlockers()

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, 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 90 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 90 users online :: 0 registered, 0 hidden and 90 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 90 guests

Login Form