summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dat/clua
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-12 23:55:34 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-13 01:44:02 -0800
commit3afcd8d5b4123299491280d878ef0ba8d01a8164 (patch)
treed4ec83182bc3e6b54137ce4085ea72806cfedf51 /crawl-ref/source/dat/clua
parent02c9b0ce8774509288fac41e89407598a510ef84 (diff)
downloadcrawl-ref-3afcd8d5b4123299491280d878ef0ba8d01a8164.tar.gz
crawl-ref-3afcd8d5b4123299491280d878ef0ba8d01a8164.zip
lm_trig.lua: monster_dies can look for "any"
Diffstat (limited to 'crawl-ref/source/dat/clua')
-rw-r--r--crawl-ref/source/dat/clua/lm_trig.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/dat/clua/lm_trig.lua b/crawl-ref/source/dat/clua/lm_trig.lua
index d17ea9e0da..8cef1babe7 100644
--- a/crawl-ref/source/dat/clua/lm_trig.lua
+++ b/crawl-ref/source/dat/clua/lm_trig.lua
@@ -536,8 +536,8 @@ end
--
-- * monster_dies: Waits for a monster to die. Needs the parameter
-- "target", who's value is the name of the monster who's death
--- we're wating for. Doesn't matter where the triggerable/marker
--- is placed.
+-- we're wating for, or "any" for any monster. Doesn't matter where
+-- the triggerable/marker is placed.
--
-- * feat_change: Waits for a cell's feature to change. Accepts the
-- optional parameter "target", which if set delays the trigger
@@ -693,7 +693,7 @@ function DgnTriggerer:monster_dies(triggerable, marker, ev)
error("DgnTriggerer:monster_dies() didn't get a valid monster index")
end
- if mons.full_name == self.target then
+ if self.target == "any" or mons.full_name == self.target then
triggerable:do_trigger(self, marker, ev)
end
end