Move enhance_tip into context and don't show tip if #enhance has been used before

Breaks save and bones compatibility.
This commit is contained in:
Patric Mueller
2020-01-05 16:10:50 +01:00
parent 8853d0e566
commit 5267a50c7e
3 changed files with 7 additions and 4 deletions

View File

@@ -132,6 +132,7 @@ struct context_info {
boolean botl; /* partially redo status line */
boolean botlx; /* print an entirely new bottom line */
boolean door_opened; /* set to true if door was opened during test_move */
boolean enhance_tip; /* player is informed about #enhance */
struct dig_info digging;
struct victual_info victual;
struct tin_info tin;

View File

@@ -14,7 +14,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 8
#define EDITLEVEL 9
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2020"
#define COPYRIGHT_BANNER_B \

View File

@@ -69,17 +69,16 @@ static void
give_may_advance_msg(skill)
int skill;
{
static boolean got_enhance_tip = FALSE;
You_feel("more confident in your %sskills.",
(skill == P_NONE) ? ""
: (skill <= P_LAST_WEAPON) ? "weapon "
: (skill <= P_LAST_SPELL) ? "spell casting "
: "fighting ");
if (!got_enhance_tip) {
if (!g.context.enhance_tip) {
g.context.enhance_tip = TRUE;
pline("(Use the #enhance command to advance them.)");
}
got_enhance_tip = TRUE;
}
/* weapon's skill category name for use as generalized description of weapon;
@@ -1168,6 +1167,9 @@ enhance_weapon_skill()
winid win;
boolean speedy = FALSE;
/* player knows about #enhance, don't show tip anymore */
g.context.enhance_tip = TRUE;
if (wizard && yn("Advance skills without practice?") == 'y')
speedy = TRUE;