From a4267cdfccca037346b5695b59a88f5154252208 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Wed, 17 Sep 2025 22:47:11 -0400 Subject: [PATCH] Lower the land unlock requirements if they're mathematically impossibly high --- landlock.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/landlock.cpp b/landlock.cpp index fedf0bd7..f5854521 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -221,11 +221,15 @@ EX bool landUnlockedRPM(eLand n) { } EX int lands_for_hell() { - return casual ? 40 : 9; + int desired = casual ? 40 : 9; + int available = std::count_if(land_over.begin(), land_over.end(), [] (eLand l) { return !among(l, laHell, laCocytus, laPower) && !isCrossroads(l) && isLandIngame(l); }); + return min(desired, available); } EX int lands_for_cr3() { - return casual ? 20 : 9; + int desired = casual ? 20 : 9; + int available = std::count_if(land_over.begin(), land_over.end(), [] (eLand l) { return !isCrossroads(l) && isLandIngame(l); }); + return min(desired, available); } EX int variant_unlock_value() {