summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapmark.h
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2011-03-06 20:10:14 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2011-03-06 20:10:14 +1000
commit7fb953b0ac69efd79bc04088cf69430a767a1b03 (patch)
tree7e766daa0fe3f07d3de3aa5db26eeb410fef0d8b /crawl-ref/source/mapmark.h
parent8333f4560c760a8bbe7eb5d06b0b854466010365 (diff)
downloadcrawl-ref-7fb953b0ac69efd79bc04088cf69430a767a1b03.tar.gz
crawl-ref-7fb953b0ac69efd79bc04088cf69430a767a1b03.zip
Begin work on phoenix resurrection: phoenix map marker.
Currently, resurrection will be per-level, but support can later be added for moving or recreating markers on the next level you go to if you happen to be carrying a phoenix corpse with you. It will also resurrect if the phoenix marker times out while you were off level and the corpse was not otherwise destroyed. The mechanism will track the location of the corpse, storing coord(-1, -1) when the corpse is in your inventory, or the location otherwise. Finally, none of this is actually coded, but the capacity now exists to start using the new marker. That's really the hardest bit and the longest to recompile, as it touches enum.h and mapmark.h. More to come!
Diffstat (limited to 'crawl-ref/source/mapmark.h')
-rw-r--r--crawl-ref/source/mapmark.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/crawl-ref/source/mapmark.h b/crawl-ref/source/mapmark.h
index 45490607c3..a26956aae1 100644
--- a/crawl-ref/source/mapmark.h
+++ b/crawl-ref/source/mapmark.h
@@ -146,6 +146,30 @@ public:
int power;
};
+// A marker powered by phoenixes!
+class map_phoenix_marker : public map_marker
+{
+public:
+ map_phoenix_marker (const coord_def& pos = coord_def(0, 0),
+ int tst = 0, int tso = 0, beh_type bh = BEH_HOSTILE,
+ god_type gd = GOD_NO_GOD, coord_def cp = coord_def(-1, -1)
+ );
+
+ 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 turn_start;
+ int turn_stop;
+ beh_type behaviour;
+ god_type god;
+ coord_def& corpse_pos;
+};
+
// A marker powered by Lua.
class map_lua_marker : public map_marker, public dgn_event_listener
{