- The AI now tries not to search for another imperial recruiter when the first enters the battlefield.

- Added getNotName to CardList.java.
This commit is contained in:
jendave
2011-08-06 06:05:01 +00:00
parent 791d937e67
commit 39c5936bf3
2 changed files with 14 additions and 0 deletions

View File

@@ -13014,6 +13014,10 @@ public class CardFactory_Creatures {
} }
} else //computer } else //computer
{ {
if (powerTwoCreatures.getNotName("Imperial Recruiter").size() != 0)
{
powerTwoCreatures = powerTwoCreatures.getNotName("Imperial Recruiter");
}
powerTwoCreatures.shuffle(); powerTwoCreatures.shuffle();
ability.setTargetCard(powerTwoCreatures.get(0)); ability.setTargetCard(powerTwoCreatures.get(0));
AllZone.Stack.add(ability); AllZone.Stack.add(ability);

View File

@@ -130,6 +130,16 @@ public class CardList implements Iterable<Card> {
return c; return c;
} }
//returns new subset of all the cards that have a different name
public CardList getNotName(String name) {
CardList c = new CardList();
for(int i = 0; i < size(); i++)
if(!getCard(i).getName().equals(name)) c.add(getCard(i));
return c;
}
public CardList getImageName(String name) { public CardList getImageName(String name) {
CardList c = new CardList(); CardList c = new CardList();