ComuterUtil_Block2.removeValuableBlockers()
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
1 post
• Page 1 of 1
ComuterUtil_Block2.removeValuableBlockers()
by 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.
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;
}
-
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
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 90 guests