From beb3a0646129b97c8cee6e270c055ee303707cca Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 28 Nov 2019 00:39:27 +0100 Subject: [PATCH] Hyperstone-optional lands are now clearly marked in the Overview, and the Hunting Grounds and Galapagos are now optional in Euclidean --- help.cpp | 9 +++++++-- landlock.cpp | 17 +++++++++++++---- menus.cpp | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/help.cpp b/help.cpp index 5392457b..9f659d3f 100644 --- a/help.cpp +++ b/help.cpp @@ -289,6 +289,8 @@ string forbidden_unmarked() { return XLAT("When the 'mark heptagons' option (hotkey '7') is on, moves between unmarked cells are forbidden."); } +string hyperstone_optional = "Completing the quest in this land is not necessary for the Hyperstone Quest."; + EX string generateHelpForItem(eItem it) { string help = helptitle(XLATN(iinf[it].name), iinf[it].color); @@ -465,6 +467,9 @@ EX string generateHelpForItem(eItem it) { help += "\n\n" + XLAT(inv::helptext); #endif + if(in_full_game() && !required_for_hyperstones(it) && it != itHyperstone) + help += "\n\n" + XLAT(hyperstone_optional); + #if CAP_DAILY if(daily::on && it == itOrbLove) help += "\n\n" + XLAT("The Orb of Love gives no bonus score in the Strange Challenge."); @@ -642,8 +647,8 @@ string generateHelpForLand(eLand l) { if(isPureSealand(l)) s += XLAT("Aquatic region -- accessible only from coastal regions and other aquatic regions.\n"); - if(l == laCamelot || l == laPrincessQuest) - s += XLAT("Completing the quest in this land is not necessary for the Hyperstone Quest."); + if(in_full_game() && !required_for_hyperstones(treasureType(l)) && !isCrossroads(l)) + s += XLAT(hyperstone_optional); int rl = isRandland(l); if(rl == 2) diff --git a/landlock.cpp b/landlock.cpp index e870ca6d..14d0334b 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -120,14 +120,23 @@ EX bool landUnlocked(eLand l) { return false; } +EX bool required_for_hyperstones(eItem ttype) { + if(ttype == itHyperstone) + return false; + if(among(ttype, itHolyGrail, itSavedPrincess)) + return false; + if(euclid && among(ttype, itBabyTortoise, itHunting)) + return false; + return true; + } + EX void countHyperstoneQuest(int& i1, int& i2) { i1 = 0; i2 = 0; generateLandList(isLandIngame); - for(eLand l: landlist) if(l != laCamelot && l != laPrincessQuest) { + for(eLand l: landlist) { eItem ttype = treasureType(l); - if(ttype != itHyperstone) { - i2++; if(items[ttype] >= R10) i1++; - } + if(!required_for_hyperstones(ttype)) continue; + i2++; if(items[ttype] >= R10) i1++; } } diff --git a/menus.cpp b/menus.cpp index a0b3a05f..38fb3d42 100644 --- a/menus.cpp +++ b/menus.cpp @@ -109,7 +109,7 @@ EX void showOverview() { else if(items[it]) col = 0xC0C0C0; else col = BLACKISH; int c8 = (vf+2)/3; - if(displayfrZH(xr*24-c8*6, i0, 1, vf-4, its(items[it]), col, 16)) + if(displayfrZH(xr*24-c8*6, i0, 1, vf-4, (required_for_hyperstones(it) ? "" : "*") + its(items[it]), col, 16)) getcstat = 2000+it; if(!cheater) if(displayfrZH(xr*24, i0, 1, vf-4, its(hiitems[modecode()][it]), col, 16))