##############################################################################
# test.des: this is the place for vaults which are meant for use in the
#     wizmode only, for testing various things.
##############################################################################

{{
function pressure_test_stepped(data, triggerable, triggerer, marker, ev)
  crawl.mpr("trap triggered")
  if data.triggered == true then
    return
  end
  local victname
  local m = dgn.mons_at(marker:pos())
  if (m ~= nil) then
    victname = m.name
  else
    victname = "you"
  end
  data.triggered = true
  crawl.mpr("trap sprung by " .. victname)
end
}}

default-depth: Zot:27

NAME:   feat_test
WEIGHT: 0
KFEAT:  d = open_sea
KFEAT:  K = endless_lava
KFEAT:  L = iron_grate
KFEAT:  1 = altar_zin
KFEAT:  2 = altar_the_shining_one
KFEAT:  3 = altar_kikubaaqudgha
KFEAT:  4 = altar_yredelemnul
KFEAT:  5 = altar_xom
KFEAT:  6 = altar_vehumet
KFEAT:  7 = altar_okawaru
KFEAT:  8 = altar_makhleb
KFEAT:  9 = altar_sif_muna
KFEAT:  0 = altar_trog
KFEAT:  B = altar_nemelex_xobeh
KFEAT:  C = altar_elyvilon
KFEAT:  D = altar_lugonu
KFEAT:  E = altar_beogh
KFEAT:  F = altar_jiyva
KFEAT:  H = altar_fedhas
KFEAT:  J = altar_cheibriados
MAP
............
.xXcmnovbat.
............
.wWldKLA....
............
.<([{}])>...
............
.IGTUVY.....
............
.0123456789.
.BCDEFHJ....
............
ENDMAP

#############################################
# let's put some pressure onto traps
#
NAME:   pressure_test
WEIGHT: 0
KFEAT:  ^ = pressure plate trap
{{
-- need to make it repeated since there may be a monster under the grate
local tm = TriggerableFunction:new{func="pressure_test_stepped",
                                   repeated=true,
                                   data={triggered=false} }
tm:add_triggerer(DgnTriggerer:new{type="pressure_plate"})
lua_marker('^', tm)
}}
MAP
...
.^.
...
ENDMAP

#################################################
# big doors
NAME:   gate_test
WEIGHT: 0
MAP
...........
.+.+.+.+.+.
.+.+.+.+...
.+.+.+...=.
.+.+...=.=.
.+...=.=.=.
...=.=.=.=.
.=.=.=.=.=.
...........
ENDMAP
