fix #H2736 - missing Samurai quest throne

Reported 11 years ago, the level definition for the Samurai quest
home level specifies a throne room and entering it gives the "opulent
throne room" message, but there isn't any throne.

Initially I was going to add a throne but decided that its lack is
probably intentional.  The throne room designation is used to give
periodic atomspheric messages.  That's my guess anyway.

Alter the room entry message there to omit "throne" from "you enter
an opulent throne room".  Add a no-throne comment to Sam-strt level
definition.

While in there, make Lord Sato's katana and splint mail explicitly
rustproof and either blessed or uncursed.  (The mail was already
implicitly rustproof because splint mail created on the Sam quest
home level always is, like for a Samurai's initial inventory.)
This commit is contained in:
PatR
2023-09-28 13:25:20 -07:00
parent 0ecb0547e6
commit 7c0ece5bd6
3 changed files with 33 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
-- NetHack Samurai Sam-strt.lua $NHDT-Date: 1652196014 2022/05/10 15:20:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $ -- NetHack Samurai Sam-strt.lua $NHDT-Date: 1695932714 2023/09/28 20:25:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $
-- Copyright (c) 1989 by Jean-Christophe Collet -- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1991-92 by M. Stephenson, P. Winner -- Copyright (c) 1991-92 by M. Stephenson, P. Winner
-- NetHack may be freely redistributed. See license for details. -- NetHack may be freely redistributed. See license for details.
@@ -9,6 +9,10 @@
-- Here you meet your (besieged) class leader, Lord Sato -- Here you meet your (besieged) class leader, Lord Sato
-- and receive your quest assignment. -- and receive your quest assignment.
-- --
-- The throne room designation produces random atmospheric
-- messages (until the room is entered) but this one doesn't
-- actually contain any throne.
--
des.level_init({ style = "solidfill", fg = " " }); des.level_init({ style = "solidfill", fg = " " });
des.level_flags("mazelevel", "noteleport", "hardfloor") des.level_flags("mazelevel", "noteleport", "hardfloor")
@@ -55,8 +59,8 @@ des.door("closed",50,04)
des.door("closed",50,06) des.door("closed",50,06)
-- Lord Sato -- Lord Sato
des.monster({ id = "Lord Sato", coord = {20, 04}, inventory = function() des.monster({ id = "Lord Sato", coord = {20, 04}, inventory = function()
des.object({ id = "splint mail", spe = 5 }); des.object({ id = "splint mail", spe = 5, eroded=-1, buc="not-cursed" });
des.object({ id = "katana", spe = 4 }); des.object({ id = "katana", spe = 4, eroded=-1, buc="not-cursed" });
end }) end })
-- The treasure of Lord Sato -- The treasure of Lord Sato
des.object("chest", 20, 04) des.object("chest", 20, 04)

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1235 $ $NHDT-Date: 1693427872 2023/08/30 20:37:52 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1247 $ $NHDT-Date: 1695932713 2023/09/28 20:25:13 $
General Fixes and Modified Features General Fixes and Modified Features
----------------------------------- -----------------------------------
@@ -1242,6 +1242,9 @@ applying a wielded, lit potion of oil to unlight it while other unlit
"addinv: null obj after quiver merge otyp=N" where N is POT_OIL "addinv: null obj after quiver merge otyp=N" where N is POT_OIL
casting stone-to-flesh at self turned wielded or quivered rocks into unwielded, casting stone-to-flesh at self turned wielded or quivered rocks into unwielded,
unquivered meatballs, merging stacks if there were some in each slot unquivered meatballs, merging stacks if there were some in each slot
the throne room on the Samurai quest home level lacked a throne but gave
"You enter an opulent throne room!" message the first time it was
entered; vary the message rather than add a throne
Fixes to 3.7.0-x General Problems Exposed Via git Repository Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 hack.c $NHDT-Date: 1655116515 2022/06/13 10:35:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.360 $ */ /* NetHack 3.7 hack.c $NHDT-Date: 1695932717 2023/09/28 20:25:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.410 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */ /*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -34,6 +34,7 @@ static boolean escape_from_sticky_mon(coordxy, coordxy);
static void domove_core(void); static void domove_core(void);
static void maybe_smudge_engr(coordxy, coordxy, coordxy, coordxy); static void maybe_smudge_engr(coordxy, coordxy, coordxy, coordxy);
static struct monst *monstinroom(struct permonst *, int); static struct monst *monstinroom(struct permonst *, int);
static boolean furniture_present(int, int);
static void move_update(boolean); static void move_update(boolean);
static int pickup_checks(void); static int pickup_checks(void);
static boolean doorless_door(coordxy, coordxy); static boolean doorless_door(coordxy, coordxy);
@@ -3039,6 +3040,23 @@ monstinroom(struct permonst *mdat, int roomno)
return (struct monst *) 0; return (struct monst *) 0;
} }
/* check whether room contains a particular type of furniture */
static boolean
furniture_present(int furniture, int roomno)
{
int x, y, lx, ly, hx, hy;
struct mkroom *sroom = &gr.rooms[roomno];
ly = sroom->ly, hy = sroom->hy;
lx = sroom->lx; hx = sroom->hx;
/* the inside_room() check handles irregularly shaped rooms */
for (y = ly; y <= hy; ++y)
for (x = lx; x <= hx; ++x)
if (levl[x][y].typ == furniture && inside_room(sroom, x, y))
return TRUE;
return FALSE;
}
char * char *
in_rooms(register coordxy x, register coordxy y, register int typewanted) in_rooms(register coordxy x, register coordxy y, register int typewanted)
{ {
@@ -3220,7 +3238,9 @@ check_special_room(boolean newlev)
Blind ? "humid" : "muddy"); Blind ? "humid" : "muddy");
break; break;
case COURT: case COURT:
You("enter an opulent throne room!"); You("enter an opulent%s room!",
/* the throne room in Sam quest home level lacks a throne */
!furniture_present(THRONE, roomno) ? "" : " throne");
break; break;
case LEPREHALL: case LEPREHALL:
You("enter a leprechaun hall!"); You("enter a leprechaun hall!");