Adjust rooms in Medusa levels to account for player monster statues
There is code in fixup_special for stocking Medusa's lair with statues of players from the leaderboard. It makes two assumptions: that there will always be at least one room defined on Medusa's level, and that the statues should be placed in the first room defined. In the process of removing prefilled, some of these rooms suddenly became non-rooms, and this caused problems. This commit ensures that the regions for turning into rooms to hold the statues are present and come first. In the process of writing this commit, I discovered a bug: the statue stocking code for medusa in fixup_special naively chooses the spot at which to place its final statue by selecting independent x and y coordinates with somex and somey. This is responsible for a statue occasionally being embedded in a wall or in iron bars on medusa-2 and medusa-4: the rooms defined to receive statues are irregular, and some of the possible coordinates happen to be walls, bars, and water. The proper fix here is to add lua functionality so that the level designer can specify that they want a leaderboard corpse or statue, and remove the medusa special case from fixup_special, but that's rather out of scope for what I'm doing here.
This commit is contained in:
committed by
Pasi Kallinen
parent
f8ff58ed7e
commit
5d73b2be08
@@ -36,7 +36,9 @@ des.map([[
|
||||
-- Dungeon Description
|
||||
des.region(selection.area(00,00,74,19),"lit")
|
||||
des.region(selection.area(31,07,45,07),"unlit")
|
||||
-- make the downstairs room a real room to control arriving monsters
|
||||
-- make the downstairs room a real room to control arriving monsters,
|
||||
-- and also as a fixup_special hack; the first room defined on Medusa's level
|
||||
-- receives some statues
|
||||
des.region({ region={35,09, 41,10}, lit = 0, type="ordinary", arrival_room=true })
|
||||
des.region(selection.area(31,12,45,12),"unlit")
|
||||
-- Teleport: down to up stairs island, up to Medusa's island
|
||||
|
||||
Reference in New Issue
Block a user