From 12954c8c108cff027411670806da0e22a8727ec7 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Fri, 17 Oct 2025 21:14:48 -0400 Subject: [PATCH] Fix edge cases in Hell/CR3 unlock If Mirror Land and Hall of Mirrors are both in-game, only one counts, and Camelot, Palace Quest, and Cellular Automaton don't count at all. --- landlock.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/landlock.cpp b/landlock.cpp index ebbc625f..0d4ace2e 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -222,13 +222,15 @@ EX bool landUnlockedRPM(eLand n) { EX int lands_for_hell() { 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); }); + int available = std::count_if(land_over.begin(), land_over.end(), [] (eLand l) { return !among(l, laHell, laCocytus, laPower) && !isCrossroads(l) && iinf[linf[l].treasure].itemclass == IC_TREASURE && isLandIngame(l); }); + if(isLandIngame(laMirror) && isLandIngame(laMirrorOld)) --available; return min(desired, available); } EX int lands_for_cr3() { int desired = casual ? 20 : 9; - int available = std::count_if(land_over.begin(), land_over.end(), [] (eLand l) { return !isCrossroads(l) && isLandIngame(l); }); + int available = std::count_if(land_over.begin(), land_over.end(), [] (eLand l) { return !isCrossroads(l) && iinf[linf[l].treasure].itemclass == IC_TREASURE && isLandIngame(l); }); + if(isLandIngame(laMirror) && isLandIngame(laMirrorOld)) --available; return min(desired, available); }