summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/wizlab.des
blob: 81ff1e1be352ecfbcc3d876c888760f66677d163 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
###
#
# "Wizard"-themed portals.
#
# PLANNING AREA:
#
# Alistair's Brewery: mutated wizards, mephitic cloud generators,
#    cupboards full of potions, confused monsters. 
# Borgnjor's Mortuary: liches, miasma clouds, potions of decay, slaves that are
#    having their life forces drained, vampire (knights, mages).
# Cigotuvi's Chambers: "laboratory-esque", mutagenic fog machines, pulsating
#    lumps and shining eyes in cages, ugly things in cages, degeneration.
# Erinya's Formal Garden: trees, centaurs, fountains, flowers, oklobs, and
#    crumbling stone walls.
# Iskenderun's Mystic Tower: purple draconians, purple wizards with mystic
#    blast, naga mages with mystic blast, purple fog and smoke outside windows,
#    robes and cloaks of magic resistance as the loot.
# Lee's Rapid Deconstructor: golems and "monk" or otherwise unarmed creatures,
#    exploding features and exploding corpses. It's a timed vault, so you have
#    to get to the loot quickly and avoid the hordes of monsters.
# Lehudib's Crystal Cave:  crystal walls and crystal golems, crystal monsters,
#    spear throwers (statues with crystal spear), possibly the unrand as the
#    loot.
# Maxwell's Forge: Maxwell employs a bunch of angels to churn out weapons;
#    stashes of hammers, flame clouds, other "smithy" styled themes, with black
#    smoke.
# Olgreb's Toxic Laboratory: poisonous clouds, a toxic radiance effect,
#    poisonous monsters, possibly even a "poison" effect that bypasses rPois,
#    potions of poison and potions dropped converting into potions of poison.
# Ozocubu's Refrigerator: simulacra, refrigeration effect, a solid stone room
#    inside of an "ice cave", freezing clouds.
# Doroklohe's Tomb: lots of small tombs with loot and monsters inside.
# Tukima's Studio: dancing weapons, dancing weapon machine, tukima's book and a
#    scroll of acquirement, statue guards, mirrors.
# Cekugob's Oubliette: a randomised maze (though not a labyrinth) with skeletal
#    guards, and with occasionally hidden. Cekugob's amulet as the loot,
#    possibly.
# Zonguldrok's Mausoleum: regenerating zombie monsters, sword as the loot.
# Random named Wizard portals.
#
# TO-DO:
#
# We've currently got working vaults for Tukima and Erinya, and dpeg has a
# working vault for Doroklohe (needs to be added to this file and
# portal-vaultified). The flavour messages for the portal vault require flavour,
# while the actual portals themselves could do with an overhaul and some new
# ones.
#
##

{{
function wizlab_portal (e)
    -- Flavour could use some improvement.
    local desc_long = "This portal has been left open by a careless wizard."  ..
                      "It might lead to their secret laboratory, but beware!" ..
                      " Surely it will be guarded by magical traps and "      ..
                      "terrible monsters."
    local timeout_turns = crawl.random_range(1200, 1700)
    local messager =
        timed_msg {
            visible = true,
            -- $F{xxx} will be substituted with the 'entity' property of the timed
            -- marker, or with the desc property (if entity is not set).
            messages = time_messages(timeout_turns,
                            "$F{The} shimmers.",
                            "$F{The} vibrates and hums gently.",
                            "$F{The} is slightly opaque.",
                            "$F{The} is almost invisible now.")
    }

    e.lua_marker('O',
      timed_marker {
        disappear = "The portal disappears completely.",
        desc = "magical portal",
        desc_long = desc_long,
        entity = 'portal',
        dst = 'WizLab',
        dstname_abbrev = "WizLab",
        dstorigin = "in a Wizard's Laboratory",
        overmap = "magical portal",
        turns = timeout_turns,
        floor = "stone_arch",
        msg = messager })
    e.kfeat("O = enter_portal_vault")
end

function wizlab_feat_descs()
end

dgn.set_lt_callback("wizlab", "wizlab_feat_descs")

-- Destinations:
function wizlab_setup (e, wizlab_desc)
    e.kfeat("< = exit_portal_vault")
    -- This is so that the note shows up properly.
    dgn.set_level_type_origin("in " .. wizlab_desc)
    crawl.mark_milestone("br.enter", "entered " .. wizlab_desc .. ".")
    dgn.set_feature_desc_short("gate leading back to the Dungeon",
                               "portal leading out of here")
    if wizlab_desc ~= "Erinya's Formal Garden" then
      dgn.set_feature_desc_short("empty arch of ancient stone",
                               "empty arch of stone")
    end
end
}}

###############################################################################
# Portal entrances.
#
# Todo: more, and better.
NAME:       enter_wizlab_1
TAGS:       uniq_wizlab
ORIENT:     float
:           wizlab_portal(_G)
MAP
    wwwww
   wwwwwww
  wwxmxmxww
 wwxx...xxww
wwxm..O..mxww
 wwxx...xxww
  wwxx+xxww
   www.www
    w.@.w
ENDMAP
#
#
###############################################################################

default-depth:

###############################################################################
# And arrivals!
###############################################################################
# Firstly, we have Tukima's Studio.
#
# Todo: clean up the code
NAME:       wizlab_tukima
ORIENT:     encompass
TAGS:       wizlab no_item_gen no_monster_gen no_rotate allow_dup
MONS:       dancing weapon
KFEAT:      M = granite_statue
MARKER:     M = lua:props_marker {veto_fragmentation="veto", veto_disintegrate="veto", \
                                  slaved_to="tukima"}
{{
function tukima_machine (data, triggerable, triggerer, marker, ev)
  if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then
    return
  end

  local x, y = marker:pos()
  local you_x, you_y = you.pos()

  if data.weapon_count >= 5 then
    if you.see_cell(x, y) then
      crawl.mpr("The machine makes a dull noise.")
    else
      crawl.mpr("You hear a distant, dull noise.")
    end
    return
  end

  if (you_x == x and you_y == y) then return end
  if dgn.mons_at(x, y) then return end

  dgn.apply_area_cloud(x, y, 1, 6, 1, 10, "black smoke", "other", -1)

  if (not dgn.create_monster(x, y, "generate_awake dancing weapon")) then
    return
  end

  data.weapon_count = data.weapon_count + 1

  if you.see_cell(x, y) then
    crawl.mpr("The machine hisses, and spits out a dancing weapon!")
  else
    crawl.mpr("You hear a distant hissing noise.")
  end
end

local tukima_marker = TriggerableFunction:new { 
    func = tukima_machine,
    repeated = true,
    data = {weapon_count=0},
}

tukima_marker:add_triggerer(DgnTriggerer:new {
    type="turn",
    delay_min=500,
    delay_max=800
})

lua_marker('?', tukima_marker)

if crawl.coinflip() then
  subst("Y = =")
  subst("y = .")
  subst("Rr = c")
else
  subst("Y = c")
  subst("y = m")
  subst("R = .")
  subst("r = =")
end

if crawl.coinflip() then
  subst("X = =")
  subst("x = .")
  subst("Ll = c")
else
  subst("X = c")
  subst("x = m")
  subst("L = .")
  subst("l = =")
end
}}
SUBST:      ? = .
COLOUR:     c = darkgrey
COLOUR:     = = darkgrey
COLOUR:     mMV = silver
KMONS:      8 = ice statue col:silver spells:blink_other;blink_other;blink_other;\
                    blink_other;blink_other;major_healing name:strange_machine \
                    name_replace name_descriptor
KITEM:      8 = book of tukima
KMONS:      9 = ice statue col:silver spells:blink_other;blink_other;blink_other;\
                    blink_other;blink_other;major_healing name:strange_machine \
                    name_replace name_descriptor
KITEM:      9 = scroll of acquirement
:           local mquote = '"The machine had stood there a long time. It was several '
:                  .. "hundred feet long and could run on a thimbleful of earth or"
:                  .. " water. It had been working seven and a half million years."
:                  .. '"\n  -Sweet Their Blood and Sticky, Albert Teichner'
MARKER:     8 = lua:MonPropsMarker:new {description="A glistening silver machine.\n",\
                   quote=mquote}
MARKER:     9 = lua:MonPropsMarker:new {description="A glistening silver machine.\n",\
                   quote=mquote}
:           dgn.set_feature_desc_short("translucent rock wall",
:                                      "crystal clear mirror")
:           dgn.set_feature_desc_long("translucent rock wall",
:                                     "A glistening mirror, reflecting everything around it.\n")
:           dgn.set_feature_desc_short("granite statue", "strange machine")
:           dgn.set_feature_desc_long("granite statue", "A mechanical contraption," ..
:                                     " all hisses and pops.\n")
:           dgn.set_feature_desc_short("dry fountain", "glistening fountain")
:           dgn.set_feature_desc_long("dry fountain", "A pristine fountain. " ..
:                                     "The only thing it lacks is water.\n")
:           dgn.set_feature_quote("A granite statue", mquote)
:           wizlab_setup(_G, "Tukima's Studio")
MAP
                ccccccc
                ccmmmcc
            cccccm...mccccc
           cc...+.A.<.+...cc
          cc..cccm...mccc..cc
          cc+cccccm.mccccc+cc
          cc.cccccc+cccccc.cc
         cc...cccc...cccc...cc
         cm...mcm..1..mcm...mc
         cm...mcm.....mcm...mc
         cm.V.mcm.....mcm.V.mc
         cm...mcm.....mcm...mc
         cm...mcm..1..mcm...mc
         cc...cccc...cccc...cc
         ccc.cccccc+cccccc.ccc
          cc+ccccm...mcccc+cc
         ccm.mccm.....mccm.mcc
         cm.1..+...V...+..1.mc
        ccXm.mccm.....mccm.mYcc
      cccxccmlcccm...mcccrmccycc
      ccm.mcccLcccm.mcccRcccm.mcc
     ccm...mLLcccm...mcccRRm...mcc
    ccm..$..mcccm..?..mcccm..$..mcc
    cm..$8$..mcm...M...mcm..$9$..mc
    ccm..$..mcccm.....mcccm..$..mcc
     ccm...mcc ccm...mcc ccm...mcc
      ccmmmcc   ccmmmcc   ccmmmcc
       ccccc     ccccc     ccccc
ENDMAP

###############################################################################
# Erinya's Garden
#
# Map was based on this image: http://upload.wikimedia.org/wikipedia/commons/5
#          /58/Plan_du_ch%C3%A2teau_et_des_jardins_de_Clagny_dessin%C3%A9_par_
#          Maraine_XVIIe_si%C3%A8cle.jpg (concat it back together to get the
#          full link).
NAME:       wizlab_erinya
ORIENT:     encompass
TAGS:       wizlab no_item_gen no_monster_gen no_rotate allow_dup
MONS:       centaur col:green, centaur warrior col:lightgreen
MONS:       oklob plant
MONS:       stone golem name:vine_covered name_adjective
MONS:       toadstool col:any name:flowers n_rpl n_des n_the
SUBST:      y = ct
COLOUR:     G = yellow
KFEAT:      / = stone_arch
KFEAT:      _ = altar_fedhas
MARKER:     A = feat:stone_arch
ITEM:       any fixed theme book, any fixed level book, any staff
{{

function grow (data, triggerable, triggerer, marker, ev)
  if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then
    return
  end

  local count = 0
  local flowdesc = "A rather pretty cluster of flowers."
  if you.can_smell then
    flowdesc = flowdesc .. " They smell sweet."
  end

  if crawl.one_chance_in(10) then
    -- Fruit!
    for spot in iter.adjacent_iterator() do
      if not feat.is_solid(spot:xy()) and not feat.destroys_items(spot:xy()) 
         and crawl.one_chance_in(3) then
        -- Do nothing.
        dgn.create_item(spot.x, spot.y, "pear / apple / choko / apricot / orange"
                          .. "/ banana / strawberry q:10 / lemon / rambutan "
                          .. "/ grape q:10 / sultana q:10 / lychee")
        count = count + 1
      end
    end
    if count > 0 then
      crawl.mpr("Fruit sprouts up around you!")
    end
  else
    -- Flowers!
    for spot in iter.adjacent_iterator() do
      if not feat.is_solid(spot:xy()) and not feat.destroys_items(spot:xy())
         and not crawl.one_chance_in(3) then
        dgn.create_monster(spot.x, spot.y, "toadstool col:any name:flowers " ..
                                 "name_replace name_descriptor name_definite")
        dgn.mons_at(spot.x, spot.y).set_prop("description", flowdesc .. "\n")
        count = count + 1
      end
    end
    if count > 0 then
      crawl.mpr("Flowers sprout up around you!")
    end
  end
end

local grow_marker = TriggerableFunction:new { func = grow, repeated = true }

grow_marker:add_triggerer(DgnTriggerer:new { type="turn", 
        delay_min=500, delay_max=800, })

lua_marker("_", grow_marker)
}}
:           set_border_fill_type("stone_wall")
:           wizlab_setup(_G, "Erinya's Formal Garden")
:           dgn.set_feature_desc_short("empty arch of ancient stone", 
:                                      "rose-covered archway")
:           dgn.set_feature_desc_short("granite statue", "vine-covered statue")
:           dgn.set_feature_desc_long("granite statue", "It looks almost like a " ..
:                                     "monster made entirely from vines.\n")
:           dgn.set_feature_desc_short("stone wall", "crumbing stone wall")
:           dgn.set_feature_desc_long("stone wall", "It looks ancient.")
MAP
ccccccccccccccccccccccccccccccccccccccccccccc
ctttttttttttttttttttttttttttttttttttttttttttc
ctttttttt...........................ttttttttc
ctttt.....tttttttttttt.tttttttttttt.....ttttc
cttt..tt.tttttttttt.......tttttttttt.tt..tttc
ct.1.tGt............<.T.A............tGt.1.tc
cttt..tt.tttttttttt.......tttttttttt.tt..tttc
ctttt.....tttttttttttt.tttttttttttt.....ttttc
ctttttttt...........................ttttttttc
cttttttttttttttttttttt.tttttttttttttttttttttc
ctttttttttyyyttttttty...ytttttttyyytttttttttc
ctttttttty...yttttty.....yttttty...yttttttttc
cttttttt..111.........T.........111..tttttttc
ctttttt...121.tttttc.....cttttt.121...ttttttc
cttttt.tty...yttttttcc=cctttttty...ytt.tttttc
ctttt.tttty.yttttttt.....ttttttty.ytttt.ttttc
cttt.tttttt.ttttttty.232.yttttttt.tttttt.tttc
cttt.tttttt..tttttttydefyttttttt..tttttt.tttc
ctttt.tttttt..tttttttytyttttttt..tttttt.ttttc
cttttt.tttttt..ttttttttttttttt..tttttt.tttttc
ctttttt.tttttt..tttttcccttttt..tttttt.ttttttc
cttttyyy/yyyttt..ttty...yttt..tttyyy/yyyttttc
cttty...1...yttt..ty..1..yt..ttty...1...ytttc
ctty...1T1...yttt....1T1....ttty...1T1...yttc
cttty...1...yttt..ty..2..yt..ttty...1...ytttc
cttttyyy/yyyttt..ttty...yttt..tttyyy/yyyttttc
ctttttt.tttttt..tttttcccttttt..tttttt.ttttttc
cttttt.tttttt..ttttttttttttttt..tttttt.tttttc
ctttt.tttttt..ttttt.wwWww.ttttt..tttttt.ttttc
cttt.tttttt..ttttt.wwG_Gww.ttttt..tttttt.tttc
cttt.ttttt..ttttt....4.4....ttttt..ttttt.tttc
ctttt.ttty/ytttt....cc=cc....tttty/yttt.ttttc
cttttt.ty...yttttttcc...cctttttty...yt.tttttc
ctttttt./.1./.ttttcc..2..cctttt./.1./.ttttttc
cttttttty...yt...../.1T1../....ty...ytttttttc
cttttttttyyyttttttty.....ytttttttyyyttttttttc
ctttttttttttttttttttyytyytttttttttttttttttttc
ccccccccccccccccccccccccccccccccccccccccccccc
ENDMAP