mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- 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:
@@ -13014,6 +13014,10 @@ public class CardFactory_Creatures {
|
||||
}
|
||||
} else //computer
|
||||
{
|
||||
if (powerTwoCreatures.getNotName("Imperial Recruiter").size() != 0)
|
||||
{
|
||||
powerTwoCreatures = powerTwoCreatures.getNotName("Imperial Recruiter");
|
||||
}
|
||||
powerTwoCreatures.shuffle();
|
||||
ability.setTargetCard(powerTwoCreatures.get(0));
|
||||
AllZone.Stack.add(ability);
|
||||
|
||||
@@ -130,6 +130,16 @@ public class CardList implements Iterable<Card> {
|
||||
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) {
|
||||
CardList c = new CardList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user