Spider Stomper
Posts: 186
Joined: Friday, 8th March 2013, 13:27
Vault feedback please
I wanted to get feedback on it before sending uploading it in mantis. I've tested the map a lot but I'm still very new at making vaults and I'm sure that there are a lot of mistakes or things that can be improved
The map was inspired by the following discussion:
viewtopic.php?f=5&t=5770
The map originally has no rock wall but the forum messes up white spaces, rock wall added instead.
- Code:
########
# In the hall lie the broken corpses of Xom's previous toys.
# Beyond your reach, you can see several treasures from these fallen adventurers.
# An altar and a single gold coin await for you.
# Implicitly Xom is trying to bribe you.
# If you decide to follow him you randomly get one of the displayed items.
# The offer is tempting but the price is quite high.
{{
-- Some header declarations in a function to save space
function xom_bribery(e)
e.tags("no_rtele_into")
e.tags("no_item_gen")
e.tags("no_monster_gen")
e.tags("no_pool_fixup")
e.tags("uniq_altar_xom")
e.tags("temple_overflow_xom")
e.orient("float")
e.kprop("!|wW# = no_tele_into")
e.kfeat("C = altar_xom")
e.kfeat("J = n")
e.kfeat("? = w")
e.kfeat("!| = W")
e.ftile("# = FLOOR_PEBBLE_GREEN")
e.ftile("&C = FLOOR_PEBBLE_DARKGRAY")
e.kitem("! = w:20 | mimic / w:30 any randart weapon mimic / w:30 any randart armour mimic / w:15 any randart mimic / w:5 any mimic")
e.kitem("| = w:20 | / w:30 any randart weapon / w:30 any randart armour / w:15 any randart / w:5 any")
e.kitem("# = gold q:1")
end
}}
{{
function callback.grunt_xom_gamble_announce(data,triggerable,triggerer,marker,ev)
if not dgn.persist.grunt_xom_gamble_announced then
dgn.persist.grunt_xom_gamble_announced = true
--A soon as the player sees the altar, dead toy corpses are generated.
--No message needed for this, the corpses "always" were there.
for slave in iter.slave_iterator("target_floor", 1) do
dgn.create_item(slave.x, slave.y, "centaur skeleton/ dwarf skeleton/ elf skeleton/ demonspawn skeleton/ draconian skeleton/ felid skeleton/ ghoul skeleton/ halfling skeleton/ human skeleton/ kobold skeleton/ merfolk skeleton/ minotaur skeleton/ naga skeleton/ ogre skeleton/ spriggan skeleton/ tengu skeleton/ troll skeleton")
end
end
end
function callback.xom_check_stepped(data, triggerable, triggerer, marker, ev)
local x, y = marker:pos()
-- Steping over the coin seals the pact. If you worship Xom a bridge is
-- opened and you get access to one treasure.
if monster_step == true then
return
elseif you.god() == "Xom" then
crawl.god_speaks("Xom", "You check the gold piece that lies in the floor and notice how the engraved effigy winks an eye at you.")
crawl.god_speaks("Xom", "Xom opens a path towards one of the surrounding treasures!")
for slave in iter.slave_iterator("bridge", 1) do
dgn.terrain_changed(slave.x, slave.y, "shallow_water", false, false, false)
end
for slave in iter.slave_iterator("cwall", 1) do
dgn.terrain_changed(slave.x, slave.y, "shallow_water", false, false, false)
end
else
crawl.god_speaks("Xom", "You check the gold piece that lies in the floor, it depicts a strange creature making an obscene sign at you.")
end
end
}}
NAME: xom_bribery_A
DEPTH: D:2-10
: xom_bribery(_G)
{{
dgn.persist.grunt_xom_gamble_announced = false
local announce_marker = TriggerableFunction:new {
func = "callback.grunt_xom_gamble_announce",
repeated = true}
announce_marker:add_triggerer(DgnTriggerer:new {
type="player_los"})
lua_marker('C', announce_marker)
lua_marker('&', props_marker { target_floor=1 })
local tm2 = TriggerableFunction:new{func="callback.xom_check_stepped",
repeated=false}
tm2:add_triggerer(DgnTriggerer:new{type="player_move"})
lua_marker('#', tm2)
lua_marker('?', props_marker { bridge=1 })
lua_marker('J', props_marker { cwall=1 })
}}
MAP
xxxxcccccxxxx
xxcccwwwcccxx
xccwwwwwwwccx
ccwwww|wwwwcc
cww!ww?ww!wwc
cwwwwbJbwwwwc
cwwwnn&nnwwwc
cw!wn&#&nw!wc
cwwwnnCnnwwwc
cwwwwn}nwwwwc
cww!wnnnw!wwc
ccwwwwwwwwwcc
xccwbw!wbwccx
xxccwwwwwccxx
xx.ncccccn.xx
...........
ENDMAP
NAME: xom_bribery_B
DEPTH: D:2-10
: xom_bribery(_G)
{{
dgn.persist.grunt_xom_gamble_announced = false
local announce_marker = TriggerableFunction:new {
func = "callback.grunt_xom_gamble_announce",
repeated = true}
announce_marker:add_triggerer(DgnTriggerer:new {
type="player_los"})
lua_marker('C', announce_marker)
lua_marker('&', props_marker { target_floor=1 })
local tm2 = TriggerableFunction:new{func="callback.xom_check_stepped",
repeated=false}
tm2:add_triggerer(DgnTriggerer:new{type="player_move"})
lua_marker('#', tm2)
lua_marker('?', props_marker { bridge=1 })
lua_marker('J', props_marker { cwall=1 })
}}
MAP
xxxxcccccxxxx
xxcccwwwcccxx
xccwwwwwwwccx
ccwwww!wwwwcc
cww!wwwww|wwc
cwwwwbnb?wwwc
cwwwnn&Jnwwwc
cw!wn&#&nw!wc
cwwwnnCnnwwwc
cwwwwn}nwwwwc
cww!wnnnw!wwc
ccwwwwwwwwwcc
xccwbw!wbwccx
xxccwwwwwccxx
xx.ncccccn.xx
xx.........xx
ENDMAP
NAME: xom_bribery_C
DEPTH: D:2-10
: xom_bribery(_G)
{{
dgn.persist.grunt_xom_gamble_announced = false
local announce_marker = TriggerableFunction:new {
func = "callback.grunt_xom_gamble_announce",
repeated = true}
announce_marker:add_triggerer(DgnTriggerer:new {
type="player_los"})
lua_marker('C', announce_marker)
lua_marker('&', props_marker { target_floor=1 })
local tm2 = TriggerableFunction:new{func="callback.xom_check_stepped",
repeated=false}
tm2:add_triggerer(DgnTriggerer:new{type="player_move"})
lua_marker('#', tm2)
lua_marker('?', props_marker { bridge=1 })
lua_marker('J', props_marker { cwall=1 })
}}
MAP
xxxxcccccxxxx
xxcccwwwcccxx
xccwwwwwwwccx
ccwwww!wwwwcc
cww!wwwww!wwc
cwwwwbnbwwwwc
cwwwnn&nnwwwc
cw!wn&#&J?|wc
cwwwnnCnnwwwc
cwwwwn}nwwwwc
cww!wnnnw!wwc
ccwwwwwwwwwcc
xccwbw!wbwccx
xxccwwwwwccxx
xx.ncccccn.xx
xx.........xx
ENDMAP
NAME: xom_bribery_D
DEPTH: D:2-10
: xom_bribery(_G)
{{
dgn.persist.grunt_xom_gamble_announced = false
local announce_marker = TriggerableFunction:new {
func = "callback.grunt_xom_gamble_announce",
repeated = true}
announce_marker:add_triggerer(DgnTriggerer:new {
type="player_los"})
lua_marker('C', announce_marker)
lua_marker('&', props_marker { target_floor=1 })
local tm2 = TriggerableFunction:new{func="callback.xom_check_stepped",
repeated=false}
tm2:add_triggerer(DgnTriggerer:new{type="player_move"})
lua_marker('#', tm2)
lua_marker('?', props_marker { bridge=1 })
lua_marker('J', props_marker { cwall=1 })
}}
MAP
xxxxcccccxxxx
xxcccwwwcccxx
xccwwwwwwwccx
ccwwww!wwwwcc
cww!wwwww!wwc
cwwwwbnbwwwwc
cwwwnn&nnwwwc
cw!wn&#&nw!wc
cwwwnnCJnwwwc
cwwwwn}n?wwwc
cww!wnnnw|wwc
ccwwwwwwwwwcc
xccwbw!wbwccx
xxccwwwwwccxx
xx.ncccccn.xx
xx.........xx
ENDMAP
NAME: xom_bribery_E
DEPTH: D:2-10
: xom_bribery(_G)
{{
dgn.persist.grunt_xom_gamble_announced = false
local announce_marker = TriggerableFunction:new {
func = "callback.grunt_xom_gamble_announce",
repeated = true}
announce_marker:add_triggerer(DgnTriggerer:new {
type="player_los"})
lua_marker('C', announce_marker)
lua_marker('&', props_marker { target_floor=1 })
local tm2 = TriggerableFunction:new{func="callback.xom_check_stepped",
repeated=false}
tm2:add_triggerer(DgnTriggerer:new{type="player_move"})
lua_marker('#', tm2)
lua_marker('?', props_marker { bridge=1 })
lua_marker('J', props_marker { cwall=1 })
}}
MAP
xxxxcccccxxxx
xxcccwwwcccxx
xccwwwwwwwccx
ccwwww!wwwwcc
cww!wwwww!wwc
cwwwwbnbwwwwc
cwwwnn&nnwwwc
cw!wn&#&nw!wc
cwwwnnCnnwwwc
cwwwwn}nwwwwc
cww!wnJnw!wwc
ccwwww?wwwwcc
xccwbw|wbwccx
xxccwwwwwccxx
xx.ncccccn.xx
xx.........xx
ENDMAP