Fix: prevent traps in shops in the Tourist quest
The Tourist locate and goal levels have 2 shops each, and also have various traps randomly placed on the level. Unfortunately, this does not account for placing them in the shops, so it was possible to wind up with a magic trap or falling rock trap or whatever inside the shop, which the shopkeeper would not clean up. This commit makes selections that exclude the shop areas, and picks the traps from those selections, keeping the shop floors trap-free as their customers expect.
This commit is contained in:
@@ -107,13 +107,12 @@ des.object()
|
|||||||
des.object()
|
des.object()
|
||||||
des.object()
|
des.object()
|
||||||
des.object()
|
des.object()
|
||||||
-- Random traps
|
-- Random traps - must avoid the 2 shops
|
||||||
des.trap()
|
local validtraps = selection.area(00,00,75,19):filter_mapchar('.')
|
||||||
des.trap()
|
validtraps = validtraps - selection.area(60,14,71,18)
|
||||||
des.trap()
|
for i=1,6 do
|
||||||
des.trap()
|
des.trap(validtraps:rndcoord(1))
|
||||||
des.trap()
|
end
|
||||||
des.trap()
|
|
||||||
-- Random monsters.
|
-- Random monsters.
|
||||||
des.monster({ id = "Master of Thieves", x=04, y=01, peaceful = 0 })
|
des.monster({ id = "Master of Thieves", x=04, y=01, peaceful = 0 })
|
||||||
des.monster("giant spider")
|
des.monster("giant spider")
|
||||||
|
|||||||
@@ -126,16 +126,12 @@ des.object()
|
|||||||
-- Toilet paper
|
-- Toilet paper
|
||||||
des.object("blank paper", 71, 12)
|
des.object("blank paper", 71, 12)
|
||||||
des.object("blank paper", 71, 12)
|
des.object("blank paper", 71, 12)
|
||||||
-- Random traps
|
-- Random traps - must avoid the 2 shops
|
||||||
des.trap()
|
local validtraps = selection.area(00,00,75,19):filter_mapchar('.')
|
||||||
des.trap()
|
validtraps = validtraps - (selection.area(15,03,20,05) + selection.area(62,03,71,04))
|
||||||
des.trap()
|
for i = 1,9 do
|
||||||
des.trap()
|
des.trap(validtraps:rndcoord(1))
|
||||||
des.trap()
|
end
|
||||||
des.trap()
|
|
||||||
des.trap()
|
|
||||||
des.trap()
|
|
||||||
des.trap()
|
|
||||||
-- Random monsters.
|
-- Random monsters.
|
||||||
des.monster("giant spider")
|
des.monster("giant spider")
|
||||||
des.monster("giant spider")
|
des.monster("giant spider")
|
||||||
|
|||||||
Reference in New Issue
Block a user