Ensuring that non-AI cards are excluded from the list of card-based decks that can be selected for an AI player

This commit is contained in:
austinio7116
2018-03-05 12:43:05 +00:00
committed by maustin
parent 30048e7a82
commit ca099e077b

View File

@@ -17,6 +17,10 @@ public class CardThemedDeckGenerator extends DeckProxy implements Comparable<Car
public static List<DeckProxy> getMatrixDecks(GameFormat format, boolean isForAi){ public static List<DeckProxy> getMatrixDecks(GameFormat format, boolean isForAi){
final List<DeckProxy> decks = new ArrayList<DeckProxy>(); final List<DeckProxy> decks = new ArrayList<DeckProxy>();
for(String card: CardRelationMatrixGenerator.cardPools.get(format.getName()).keySet()) { for(String card: CardRelationMatrixGenerator.cardPools.get(format.getName()).keySet()) {
//exclude non AI playables as keycards for AI decks
if(isForAi&&FModel.getMagicDb().getCommonCards().getUniqueByName(card).getRules().getAiHints().getRemAIDecks()){
continue;
}
decks.add(new CardThemedDeckGenerator(card, format, isForAi)); decks.add(new CardThemedDeckGenerator(card, format, isForAi));
} }
return decks; return decks;