summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/des/altar/yredelemnul_ordeal.des
blob: b77550e6318926fcd2fc43a98f7e91365bd7e9fb (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
##############################################################################
# Yredelemnul's ordeal

# Before allowed to worship Yredelemnul, he demands a sacrifice!
{{
function callback.dk_yredelemnul_ordeal_los(data, triggerable, triggerer, marker, ev)
  if data.triggered == true then
    return
  end
  crawl.god_speaks("Yredelemnul", "You sense Yredelemnul urging you " ..
                                  "to kill the trapped human.")
  data.triggered = true
end

function callback.dk_yredelemnul_ordeal(data, triggerable, triggerer, marker, ev)
  crawl.god_speaks("Yredelemnul", "Yredelemnul welcomes your deed!")

  for slave in iter.slave_iterator("floor", 1) do
      if not dgn.is_passable(slave.x,slave.y) then
        dgn.terrain_changed(slave.x, slave.y, "floor", false, false, false)
        dgn.place_cloud(slave.x, slave.y, "foul pestilence", crawl.random2(15) + 5)
      else
        crawl.mpr("You feel a numb sensation.")
        return
      end
  end
  crawl.mpr("You hear a strange fizzling.")
end
}}

NAME:   dk_yredelemnul_ordeal
TAGS:   uniq_altar_yredelemnul temple_overflow_yredelemnul
DEPTH:  D:2-10
MONS:   goblin zombie / kobold zombie / human zombie / jackal zombie, \
        goblin skeleton / kobold skeleton / human skeleton / jackal skeleton
# Uses a neutral human to make the player feel extra evil. Neutral also means
# good gods will get mad if you choose to obey Yred.
KMONS:  h = generate_awake human att:neutral
MARKER: h = lua:portal_desc {slave_name="victim"}
MARKER: h = lua:MonPropsMarker:new{yslave="yslave"}
KFEAT:  h = .
KFEAT:  _ = altar_yredelemnul
KFEAT:  d = .
KITEM:  d = human skeleton / goblin skeleton / gnoll skeleton / troll skeleton
SUBST:  1 = ....12
FTILE:  _-M = floor_tomb
SUBST:  G : G.
{{
local tlos = TriggerableFunction:new{
  func="callback.dk_yredelemnul_ordeal_los",
  repeated=true}
tlos:add_triggerer(DgnTriggerer:new{type="player_los"})

local tm = TriggerableFunction:new{
  func="callback.dk_yredelemnul_ordeal", repeated=false}
tm:add_triggerer(DgnTriggerer:new{type="monster_dies", target="yslave"})

lua_marker('h', tlos)
lua_marker('_', tm)
lua_marker('M', props_marker { floor=1 })
}}
SUBST:  M = n
TILE:   n = dngn_transparent_stone_darkgray
TILE:   c = wall_undead
KPROP:  _- = no_tele_into
SUBST:  - = .
MAP
 xxxxxxx
 xcccccx
 xc---cx
 xc-_-cx
xxc---cxx
G.cMMMc.G
.1.....1.
...n=n...
...nhn...
.1.nnn.1.
.........
ENDMAP