From 9cff9ebf989603a1bab3f76063c53431e70b0c28 Mon Sep 17 00:00:00 2001 From: Meerkov Date: Mon, 19 Jul 2021 23:55:51 -0700 Subject: [PATCH] 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. --- .../gamemodes/limited/LimitedDeckBuilder.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/forge-gui/src/main/java/forge/gamemodes/limited/LimitedDeckBuilder.java b/forge-gui/src/main/java/forge/gamemodes/limited/LimitedDeckBuilder.java index c89c0e7e4ab..65b51fbf674 100644 --- a/forge-gui/src/main/java/forge/gamemodes/limited/LimitedDeckBuilder.java +++ b/forge-gui/src/main/java/forge/gamemodes/limited/LimitedDeckBuilder.java @@ -189,17 +189,13 @@ public class LimitedDeckBuilder extends DeckGeneratorBase { // to try and avoid adding purely random cards. addThirdColorCards(numSpellsNeeded - deckList.size()); - // 8. Check for DeckNeeds cards. - 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. + // 8. Add non-basic lands that were drafted. addNonBasicLands(); - // 11. Fill up with basic lands. + // 9. Check for DeckNeeds cards. + checkRemRandomDeckCards(); + + // 10. Fill up with basic lands. final int[] clrCnts = calculateLandNeeds(); if (landsNeeded > 0) { addLands(clrCnts, landSetCode); @@ -610,6 +606,8 @@ public class LimitedDeckBuilder extends DeckGeneratorBase { availableList.add(card); if (card.getRules().getType().isCreature()) { numCreatures++; + } else if (card.getRules().getType().isLand()) { + // Do nothing, it will be replaced with basics later. } else { numOthers++; }