mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Little improvements for the drafting AI (the AI will no longer put cards with RemRandomDeck SVar into draft decks).
This commit is contained in:
@@ -959,6 +959,22 @@ public class CardList implements Iterable<Card> {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* getMonoColored.
|
||||
* </p>
|
||||
*
|
||||
* @return a {@link forge.CardList} object.
|
||||
*/
|
||||
public final CardList getMonoColored() {
|
||||
return this.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
return (CardUtil.getColors(c).size() == 1 && !c.isColorless());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* getAbove.
|
||||
*
|
||||
|
||||
@@ -138,7 +138,7 @@ public class BoosterDraftAI {
|
||||
}
|
||||
} else if (!this.playerColors.get(player).getColor1().equals("none")
|
||||
&& this.playerColors.get(player).getColor2().equals("none")) {
|
||||
final CardList creatures = aiPlayables.getType("Creature").getColored();
|
||||
final CardList creatures = aiPlayables.getType("Creature").getMonoColored();
|
||||
creatures.sort(this.bestCreature);
|
||||
// for (int i=0; i<creatures.size(); i++)
|
||||
// System.out.println("creature[" + i + "]: " +
|
||||
@@ -368,7 +368,7 @@ public class BoosterDraftAI {
|
||||
final CardList aiPlayables = dList.filter(new CardListFilter() {
|
||||
@Override
|
||||
public boolean addCard(final Card c) {
|
||||
return !(c.getSVar("RemAIDeck").equals("True"));
|
||||
return !(c.getSVar("RemAIDeck").equals("True") || c.getSVar("RemRandomDeck").equals("True"));
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < aiPlayables.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user