diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2010-06-03 15:58:15 -0500 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2010-06-03 16:06:53 -0500 |
commit | bb9e897927bc05bdfa700866d3e52b4faef1db36 (patch) | |
tree | 0985176dd05974f0d3402b51f54eddd398ecbbbc /crawl-ref/source/mapmark.h | |
parent | 121e1004f78927110fa6d435dbdd3250569cc891 (diff) | |
download | crawl-ref-bb9e897927bc05bdfa700866d3e52b4faef1db36.tar.gz crawl-ref-bb9e897927bc05bdfa700866d3e52b4faef1db36.zip |
Convert the tomb routine to use a map marker (rob, me).
This fixes Mantis 1675: the map marker will expire as soon as it detects
that there is no monster within the tomb. Also, the map marker uses
both a source and a target. The former is needed to detect if it is a
monster-cast Tomb of Doroklohe or a tomb created by Zin's Imprison
ability; and the latter is used to detect the imprisoned monster if it
breaks out of the tomb early, so that any effects of entombment can
still be applied to it. Entombment can also expire while the player is
off-level.
Accordingly, the "entombed" enchantment is removed.
Diffstat (limited to 'crawl-ref/source/mapmark.h')
-rw-r--r-- | crawl-ref/source/mapmark.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/mapmark.h b/crawl-ref/source/mapmark.h index 65cacb885e..00ff43333c 100644 --- a/crawl-ref/source/mapmark.h +++ b/crawl-ref/source/mapmark.h @@ -102,6 +102,23 @@ public: int duration; }; +class map_tomb_marker : public map_marker +{ +public: + map_tomb_marker(const coord_def& pos = coord_def(0, 0), + int dur = 0, int src = 0, int targ = 0); + + void write(writer &) const; + void read(reader &); + map_marker *clone() const; + std::string debug_describe() const; + + static map_marker *read(reader &, map_marker_type); + +public: + int duration, source, target; +}; + // A marker powered by Lua. class map_lua_marker : public map_marker, public dgn_event_listener { |