diff options
author | DracoOmega <draco_omega@live.com> | 2013-02-13 12:58:09 -0330 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2013-03-03 18:36:47 -0330 |
commit | 1bd74f58a62e72d0ffebc7184334b0d6b5a7fdac (patch) | |
tree | 69ef1e05b7317e393306061659d81b411095ad43 /crawl-ref/source/godcompanions.h | |
parent | 82ac2224c72061ef69f27ba69f7f69326b850989 (diff) | |
download | crawl-ref-1bd74f58a62e72d0ffebc7184334b0d6b5a7fdac.tar.gz crawl-ref-1bd74f58a62e72d0ffebc7184334b0d6b5a7fdac.zip |
Interlevel recall for Yred and Beogh
Allow the god-given recall abilities for Yred and Beogh to recall
all god-associated permenant allies, regardless of where in the dungeon
they reside. (Note that this only includes Yred gifts and not zombies;
ie: things that could already follow you between levels)
This is done by actively tracking all of these allies in a seperate list
which is updated whenever a tracked ally is gained, dies, changes level,
or the player changes level.
The fact that permanent allies from these gods make interlevel travel
unusable is one of the largest sources of tedium associated with those gods,
and a major reason for their lack of popularity. Being able to recall from
previous levels means you no longer have to manually herd and count allies
at the top and bottom of every stair, sometimes having to make multiple
trips if the terrain surrounding the stair is too confined. This should
make these gods much more playable (and if their power level is now more
obvious and considered too high, it can be adjusted in other ways than via
tedium)
Diffstat (limited to 'crawl-ref/source/godcompanions.h')
-rw-r--r-- | crawl-ref/source/godcompanions.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/crawl-ref/source/godcompanions.h b/crawl-ref/source/godcompanions.h new file mode 100644 index 0000000000..d51980b0ea --- /dev/null +++ b/crawl-ref/source/godcompanions.h @@ -0,0 +1,38 @@ +/** + * @file + * @brief Tracking peramallies granted by Yred and Beogh. +**/ + +#ifndef GOD_COMPANION_H +#define GOD_COMPANION_H + +#include "monster.h" +#include "mon-transit.h" +#include <map> +#include <list> + +struct companion +{ + follower mons; + level_id level; + int timestamp; + + companion() : mons(), level() { } + companion(const monster& m); +}; + +extern map<mid_t, companion> companion_list; + +void add_companion(monster* mons); +void remove_companion(monster* mons); +void remove_all_companions(god_type god); +void move_companion_to(const monster* mons, const level_id lid); + +void update_companions(); + +bool recall_offlevel_companions(); + +void list_companions(); +bool companion_is_elsewhere(const monster* mons); + +#endif
\ No newline at end of file |