summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/dat/clua/lm_fog.lua10
-rw-r--r--crawl-ref/source/dat/clua/lm_mslav.lua5
-rw-r--r--crawl-ref/source/dat/clua/lm_trig.lua2
-rw-r--r--crawl-ref/source/dat/volcano.des47
4 files changed, 36 insertions, 28 deletions
diff --git a/crawl-ref/source/dat/clua/lm_fog.lua b/crawl-ref/source/dat/clua/lm_fog.lua
index 91dbbc64f3..1b87026c9a 100644
--- a/crawl-ref/source/dat/clua/lm_fog.lua
+++ b/crawl-ref/source/dat/clua/lm_fog.lua
@@ -1,5 +1,5 @@
------------------------------------------------------------------------------
--- lm_tmsg.lua:
+-- lm_fog.lua:
-- Fog machines.
--
-- There are three different "pure" ways to use a fog machine marker:
@@ -17,6 +17,10 @@
-- Combining these different methods, along with varying the different
-- parameters, can be used to achieve different effects.
--
+-- Fog machines can be "chained" together (activated at the same time) by using
+-- the convenience function "chained_fog_machine" with the normal paramaters
+-- which are accepted by "fog_machine".
+--
-- Marker parameters:
--
-- cloud_type: The name of the cloud type to use. Possible cloud types are:
@@ -265,6 +269,10 @@ function fog_machine(pars)
return FogMachine:new(pars)
end
+function chained_fog_machine(pars)
+ return lmark.synchronized_markers(FogMachine:new(pars), "do_fog")
+end
+
function fog_machine_geyser(cloud_type, size, power, buildup_amnt,
buildup_time)
return FogMachine:new {
diff --git a/crawl-ref/source/dat/clua/lm_mslav.lua b/crawl-ref/source/dat/clua/lm_mslav.lua
index 141dea7521..b601028d5c 100644
--- a/crawl-ref/source/dat/clua/lm_mslav.lua
+++ b/crawl-ref/source/dat/clua/lm_mslav.lua
@@ -6,6 +6,9 @@
-- positions.
--
-- API: lmark.synchronized_markers(<marker>, <trigger-function-names>)
+--
+-- (Some markers may already provide convenience functionality for the
+-- synchronized_markers call, so check the relevant marker file.)
--
-- Usage:
-- ------
@@ -154,4 +157,4 @@ function lmark.synchronized_markers(master, ...)
return lmark.make_slave(slave_id)
end
end
-end \ No newline at end of file
+end
diff --git a/crawl-ref/source/dat/clua/lm_trig.lua b/crawl-ref/source/dat/clua/lm_trig.lua
index b4b1ef52b8..8431fe58b3 100644
--- a/crawl-ref/source/dat/clua/lm_trig.lua
+++ b/crawl-ref/source/dat/clua/lm_trig.lua
@@ -1,5 +1,5 @@
------------------------------------------------------------------------------
--- dungeon.lua:
+-- lm_trig.lua:
-- DgnTriggerers and triggerables:
--
-- This is similar to the overvable/observer design pattern: a triggerable
diff --git a/crawl-ref/source/dat/volcano.des b/crawl-ref/source/dat/volcano.des
index fe3f875a09..408c0ec820 100644
--- a/crawl-ref/source/dat/volcano.des
+++ b/crawl-ref/source/dat/volcano.des
@@ -65,7 +65,11 @@
-- # General setup and design functions: (head to line 382 for the maps)
function volcano_portal (e)
- local desc_long = [[Leading directly into the rock is a dark and forbidding tunnel. Every so often air, hot enough to singe your face, blasts from within, and, as though trigger by the air, rocks fall from the roof and sides of the tunnel, slowly filling the entry.]]
+ local desc_long = "Leading directly into the rock is a dark and " ..
+ "forbidding tunnel. Every so often air, hot enough " ..
+ "to singe your face, blasts from within, and, as " ..
+ "though triggered by the air, rocks fall from the roof " ..
+ "and sides of the tunnel, slowly filling the entry."
local timeout_turns = crawl.random_range(1200, 1700)
local messager =
@@ -74,15 +78,16 @@ function volcano_portal (e)
-- $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,
- "Rocks fall inside $F{the}.",
- "Debris falls inside $F{the}, filling the entry.",
- "More rocks fall inside $F{the}, blocking the entry.",
- "Rocks have almost completely blocked $F{the}.")
+ "Rocks fall inside $F{the}.",
+ "Debris falls inside $F{the}, filling the entry.",
+ "More rocks fall inside $F{the}, blocking the entry.",
+ "Rocks have almost completely blocked $F{the}.")
}
e.lua_marker('O',
timed_marker {
- disappear = "There is a deep roar from within the tunnel. Moments later, a river of lava pours forth, sealing it permanently.",
+ disappear = "There is a deep roar from within the tunnel. Moments " ..
+ "later, a river of lava pours forth, sealing it permanently.",
desc = "A dark tunnel",
desc_long = desc_long,
entity = 'tunnel',
@@ -128,9 +133,10 @@ function volcano_setup (e, metal)
e.lfloorcol("red")
e.lfloortile("floor_rough_red")
end
- e.set_random_mon_list([[hog / fire elemental / fire vortex / giant ant / bumblebee /
- firedrake / lindwurm / imp / redback / manticore / hell hound /
- hell-hog / ghoul / flayed ghost / pulsating lump / toenail golem /
+ e.set_random_mon_list([[hog / fire elemental / fire vortex / giant ant /
+ bumblebee / firedrake / lindwurm / imp / redback /
+ manticore / hell hound / hell-hog / ghoul /
+ flayed ghost / pulsating lump / toenail golem /
efreet / vampire]])
crawl.mark_milestone("br.enter", "entered a Volcano.")
end
@@ -138,14 +144,6 @@ end
-- "Volcano" functions. While the sizes may appear extreme, they are carefully
-- weighted and balanced and have been tested extensively.
--- Currently unused
---function place_giant_volcano(e)
--- e.kfeat("V = l")
--- e.lua_marker('V', fog_machine { cloud_type = "flame", walk_dist=0, pow_min=10,
--- pow_max=10, delay=1100, size=90000,
--- spread_rate=100 })
---end
-
local function in_radius (x, y)
local p1 = dgn.point(x, y)
local p2 = dgn.point(you.pos())
@@ -176,10 +174,9 @@ end
function place_chained_volcano(e)
e.kfeat("V = l")
- local fm = fog_machine { cloud_type = "flame", walk_dist=15, pow_max=6,
- delay = 300, size = 3000, spread_rate = 30,
- listener = large_warning}
- e.lua_marker('V', lmark.synchronized_markers(fm, "do_fog"))
+ e.lua_marker('V', chained_fog_machine { cloud_type = "flame", walk_dist=15, pow_max=6,
+ delay = 300, size = 3000, spread_rate = 30,
+ listener = large_warning } )
end
@@ -415,12 +412,12 @@ TAGS: uniq_volcano
ORIENT: float
WEIGHT: 0
{{
- local fog = fog_machine { cloud_type = 'flame',
+ local fog = chained_fog_machine {
+ cloud_type = 'flame',
size = 3, pow_min=2,
- pow_max = 5, delay_min = 22, delay_max = 120,
- listener = trigger_machine(nil, "Test", nil, in_radius)
+ pow_max = 5, delay_min = 22, delay_max = 120
}
- lua_marker('m', lmark.synchronized_markers(fog, 'do_fog'))
+ lua_marker('m', fog)
}}
SUBST: m = .
: volcano_portal(_G)