Perseus's statue location on medusa-3 and medusa-4

Coming up to medusa-3 from the level below revealed that Perseus's
statue was not there.  It was placed randomly in one of the three
chambers where Medusa might be rather than in the one where she
actually was.  Medusa-4 behaved similarly.

Initially I was forcing the statue to be adjacent to Medusa rather
than on her spot, but medusa-1 and medusa-2 don't do that so I've
gone with a simplified revision.
This commit is contained in:
PatR
2024-05-19 14:44:10 -07:00
parent 1f86001e27
commit d0bc457279
3 changed files with 53 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
-- NetHack medusa medusa-3.lua $NHDT-Date: 1652196028 2022/05/10 15:20:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.7 $
-- NetHack medusa medusa-3.lua $NHDT-Date: 1716152250 2024/05/19 20:57:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1990, 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
@@ -32,11 +32,21 @@ des.map([[
]]);
local place = selection.new();
-- each of these spots are inside a distinct room
place:set(08,06);
place:set(66,05);
place:set(46,15);
local medloc = place:rndcoord(1);
-- location of Medusa and downstairs and Perseus's statue
local medloc = place:rndcoord(1,1);
-- specific location for some other statue in a different downstairs-eligible
-- room, to prevent object detection from becoming a trivial way to pinpoint
-- Medusa's location
-- [usefulness depends on future STATUE->dknown changes in nethack's core]
local altloc = place:rndcoord(1,1);
-- location of a fountain, in the remaining of three downstairs-eligible rooms
local othloc = place:rndcoord(1,1);
-- once here, all three points set in 'place' have been used up
des.region(selection.area(00,00,74,19),"lit")
-- fixup_special hack: the first room defined on a Medusa level gets some
@@ -56,15 +66,20 @@ des.non_diggable(selection.area(44,13,48,17))
des.teleport_region({ region = {33,02,38,07}, dir="down" })
des.levregion({ region = {32,01,39,07}, type="stair-up" });
-- place the downstairs at the same spot where Medusa will be placed
des.stair("down", medloc);
--
des.door("locked",08,08)
des.door("locked",64,05)
des.door("random",50,13)
des.door("locked",48,15)
--
des.feature("fountain", place:rndcoord(1));
-- in one of the three designated rooms, but not the one with Medusa plus
-- downstairs and also not 'altloc' where a random statue will be placed
des.feature("fountain", othloc);
--
des.object({ id="statue", coord=place:rndcoord(1), buc = "uncursed",
-- same spot as Medusa plus downstairs
des.object({ id="statue", coord=medloc, buc="uncursed",
montype="knight", historic=1, male=1,name="Perseus",
contents = function()
if percent(75) then
@@ -82,7 +97,9 @@ des.object({ id="statue", coord=place:rndcoord(1), buc = "uncursed",
end
});
--
des.object({ id = "statue", contents=0 })
-- first random statue is in one of the three designated rooms but not the
-- one with Medusa plus downstairs or the one with the fountain
des.object({ id = "statue", coord=altloc, contents=0 })
des.object({ id = "statue", contents=0 })
des.object({ id = "statue", contents=0 })
des.object({ id = "statue", contents=0 })
@@ -102,6 +119,8 @@ des.trap("board")
des.trap("board")
des.trap()
--
-- place Medusa before placing other monsters so that they won't be able to
-- unintentionally steal her spot on the downstairs
des.monster({ id = "Medusa", coord=medloc, asleep=1 })
des.monster("giant eel")
des.monster("giant eel")
@@ -116,3 +135,4 @@ for i=1,30 do
des.monster({ id = "raven", hostile = 1 })
end
--#medusa-3.lua

View File

@@ -1,4 +1,4 @@
-- NetHack medusa medusa-4.lua $NHDT-Date: 1715180180 2024/05/08 14:56:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.7 $
-- NetHack medusa medusa-4.lua $NHDT-Date: 1716152274 2024/05/19 20:57:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $
-- Copyright (c) 1989 by Jean-Christophe Collet
-- Copyright (c) 1990, 1991 by M. Stephenson
-- NetHack may be freely redistributed. See license for details.
@@ -32,13 +32,25 @@ des.map([[
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.}}}}}}....}}}}}}}}}}}}}}}}}}}...}}}}}}
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
]]);
--
-- place handling is similar to medusa-3.lua except that there are 4
-- downstairs-eligible rooms rather than 3, and only 2 of them are used
local place = selection.new();
-- each of these spots are inside a distinct room
place:set(04,08);
place:set(10,04);
place:set(10,08);
place:set(10,12);
local medloc = place:rndcoord(1); -- Medusa location; also used for down stairs
-- location of Medusa and downstairs and Perseus's statue
local medloc = place:rndcoord(1,1);
-- specific location for some other statue in a different downstairs-eligible
-- room, to prevent object detection from becoming a trivial way to pinpoint
-- Medusa's location
-- [usefulness depends on future STATUE->dknown changes in nethack's core]
local altloc = place:rndcoord(1,1);
--
des.region(selection.area(00,00,74,19),"lit")
-- fixup_special hack: The first "room" region in Medusa levels gets filled
@@ -51,6 +63,7 @@ des.teleport_region({ region = {02,02,18,13}, dir="up" });
--
des.levregion({ region = {67,01,74,20}, type="stair-up" });
-- place the downstairs at the same spot where Medusa will be placed
des.stair("down", medloc)
--
des.door("locked",04,06)
@@ -67,7 +80,8 @@ des.non_diggable(selection.area(01,01,22,14));
--
des.object("crystal ball", 07,08)
--
des.object({ id="statue",coord=place:rndcoord(1), buc="uncursed",
-- same spot as Medusa plus downstairs
des.object({ id="statue", coord=medloc, buc="uncursed",
montype="knight", historic=1, male=1,name="Perseus",
contents = function()
if percent(75) then
@@ -85,7 +99,9 @@ des.object({ id="statue",coord=place:rndcoord(1), buc="uncursed",
end
});
--
des.object({ id = "statue", contents=0 })
-- first random statue is in one of the designated stair rooms but not the
-- one with Medusa plus downstairs
des.object({ id = "statue", coord=altloc, contents=0 })
des.object({ id = "statue", contents=0 })
des.object({ id = "statue", contents=0 })
des.object({ id = "statue", contents=0 })
@@ -100,7 +116,9 @@ for i=1,7 do
des.trap()
end
--
des.monster("Medusa", medloc)
-- place Medusa before placing other monsters so that they won't be able to
-- unintentionally steal her spot on the downstairs
des.monster({ id = "Medusa", coord=medloc, asleep=1 })
des.monster("kraken", 07,07)
--
-- the nesting dragon
@@ -130,3 +148,5 @@ for i=1,4 do
des.monster("black naga hatchling")
des.monster("black naga")
end
--#medusa-4.lua

View File

@@ -1944,6 +1944,9 @@ if a tame or peaceful monster was trapped and blind hero hadn't seen the trap
camera flash hitting a hidden mimic mentioned it as being a mimic but didn't
bring it out of hiding
when chain lightning hit a sleeping monster, the victim didn't wake up
on medusa-4, Medusa and the downstairs were located in different chambers
on medusa-3 and medusa-4, Perseus's statue was located in a different chamber
from Medusa
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository