From 5eb084f9b06ac00fc361d1cc7d08f4647cdf9173 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 27 May 2018 01:09:34 +0200 Subject: [PATCH] additional help texts when the rules are different in the current geometry --- game.cpp | 2 +- help.cpp | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/game.cpp b/game.cpp index 9ae0ee32..f2472961 100644 --- a/game.cpp +++ b/game.cpp @@ -7675,7 +7675,7 @@ bool movepcto(int d, int subdir, bool checkonly) { if(checkonly) return false; if(nonAdjacent(cwt.c,c2)) addMessage(XLAT( - nonbitrunc ? + geosupport_graveyard() < 2 ? "You cannot move between the cells without dots here!" : "You cannot move between the triangular cells here!" )); diff --git a/help.cpp b/help.cpp index 41e8fff0..b542865f 100644 --- a/help.cpp +++ b/help.cpp @@ -212,6 +212,27 @@ void describeOrb(string& help, const orbinfo& oi) { } } +string other_geometry() { + return XLAT("Note: the rules above correspond to the standard geometry; actual rules in other geometries may be different. "); + } + +string other_land() { + return XLAT("Note: the rules refer to colors which are not visible in other lands. "); + } + +string other_geometry_land() { + if(gp::on || S7 != 7 || nonbitrunc) return other_geometry(); + else return other_land(); + } + +string forbidden_marked() { + return XLAT("When the 'mark heptagons' option (hotkey '7') is on, forbidden moves are marked."); + } + +string forbidden_unmarked() { + return XLAT("When the 'mark heptagons' option (hotkey '7') is on, moves between unmarked cells are forbidden."); + } + string generateHelpForItem(eItem it) { string help = helptitle(XLATN(iinf[it].name), iinf[it].color); @@ -367,6 +388,15 @@ string generateHelpForItem(eItem it) { } } } + + if(it == itOrb37 && (gp::on || S7 != 7 || nonbitrunc)) + help += "\n\n" + other_geometry() + forbidden_unmarked(); + + if(it == itOrbLava && (gp::on || S7 != 7 || nonbitrunc)) + help += "\n\n" + other_geometry() + forbidden_unmarked(); + + if(among(it, itOrbSide2, itOrbSide3) && !among(S7, 6, 7)) + help += "\n\n" + other_geometry() + XLAT("This orb lets you attack adjacent cells %1 steps from the primary target.", its(it - itOrbSide1 + 1)); #if CAP_INV if(inv::on && it == itInventory) @@ -475,6 +505,15 @@ string generateHelpForMonster(eMonster m) { if(m == moBat || m == moEagle) s += XLAT("\n\nFast flying creatures may attack or go against gravity only in their first move.", m); + + if(m == moAltDemon) + s += "\n\n" + other_geometry_land() + forbidden_unmarked(); + + if(among(m, moHexDemon, moHexSnake, moHexSnakeTail)) + s += "\n\n" + other_geometry_land() + forbidden_marked(); + + if(among(m, moKrakenT, moKrakenH) && (gp::on || S7 != 7 || nonbitrunc)) + s += "\n\n" + other_geometry() + XLAT("Forbidden cells are marked with a different color."); return s; } @@ -842,8 +881,12 @@ void describeMouseover() { if(isWarped(c) && !isWarped(c->land)) out += ", warped"; - if(isWarped(c)) - appendHelp(string("\n\n") + warpdesc); + if(isWarped(c)) { + appendHelp(string("\n\n") + XLAT(warpdesc)); + + if(gp::on || S7 != 7 || nonbitrunc) if(c->item != itOrb37) + help += "\n\n" + other_geometry() + forbidden_unmarked(); + } } #if CAP_ROGUEVIZ