mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Check AI Deckbuilding Hints on non-basic lands
Before, the AI would ignore deckbuilding hints on lands. This fixes that by checking after non-basic lands are added.
This commit is contained in:
@@ -189,17 +189,13 @@ public class LimitedDeckBuilder extends DeckGeneratorBase {
|
|||||||
// to try and avoid adding purely random cards.
|
// to try and avoid adding purely random cards.
|
||||||
addThirdColorCards(numSpellsNeeded - deckList.size());
|
addThirdColorCards(numSpellsNeeded - deckList.size());
|
||||||
|
|
||||||
// 8. Check for DeckNeeds cards.
|
// 8. Add non-basic lands that were drafted.
|
||||||
checkRemRandomDeckCards();
|
|
||||||
|
|
||||||
// 9. If there are still less than 22 non-land cards add off-color
|
|
||||||
// cards. This is probably worse than adding basic lands.
|
|
||||||
// addRandomCards(numSpellsNeeded - deckList.size());
|
|
||||||
|
|
||||||
// 10. Add non-basic lands that were drafted.
|
|
||||||
addNonBasicLands();
|
addNonBasicLands();
|
||||||
|
|
||||||
// 11. Fill up with basic lands.
|
// 9. Check for DeckNeeds cards.
|
||||||
|
checkRemRandomDeckCards();
|
||||||
|
|
||||||
|
// 10. Fill up with basic lands.
|
||||||
final int[] clrCnts = calculateLandNeeds();
|
final int[] clrCnts = calculateLandNeeds();
|
||||||
if (landsNeeded > 0) {
|
if (landsNeeded > 0) {
|
||||||
addLands(clrCnts, landSetCode);
|
addLands(clrCnts, landSetCode);
|
||||||
@@ -610,6 +606,8 @@ public class LimitedDeckBuilder extends DeckGeneratorBase {
|
|||||||
availableList.add(card);
|
availableList.add(card);
|
||||||
if (card.getRules().getType().isCreature()) {
|
if (card.getRules().getType().isCreature()) {
|
||||||
numCreatures++;
|
numCreatures++;
|
||||||
|
} else if (card.getRules().getType().isLand()) {
|
||||||
|
// Do nothing, it will be replaced with basics later.
|
||||||
} else {
|
} else {
|
||||||
numOthers++;
|
numOthers++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user