summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ghost.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-09 14:24:11 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-09 14:24:11 +0000
commitf2a95ba0d453ba6685ed29201beda8a2f703ab79 (patch)
treee7201beb995472236921334a363644e5782d648b /crawl-ref/source/ghost.h
parent447bc8ac9d8557be01da02c40349e4301f42c089 (diff)
downloadcrawl-ref-f2a95ba0d453ba6685ed29201beda8a2f703ab79.tar.gz
crawl-ref-f2a95ba0d453ba6685ed29201beda8a2f703ab79.zip
Monsters get multilevel resists (incomplete). Monster data needs to be
adjusted per monster to hand out the right resists. The current MR_RES_FIRE gives one level of resistance only. Added a real ghost structure, discarded the old ghost values array. Adjusted bones file format so bones will work out-of-the-box with Hearse. Breaks bones format, older bones will be rejected. Fixed some maps with bad DEPTHs. Added more safe answers in Y/N prompts, added a check to make it less likely that Crawl will spin in a tight loop reading input from a closed tty. (Experimental) !a will override existing foe of friendlies in LOS. Blademasters no longer pick up stuff to throw (Erik). Zombies of swimming things are also swimming things. Currently applies only to zombies explicitly placed in .des files, since fish zombies cannot be generated otherwise (can of worms). Morgue is now saved before showing the inventory and other boring end-of-game stuff. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3231 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/ghost.h')
-rw-r--r--crawl-ref/source/ghost.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/crawl-ref/source/ghost.h b/crawl-ref/source/ghost.h
new file mode 100644
index 0000000000..b4f861ca3d
--- /dev/null
+++ b/crawl-ref/source/ghost.h
@@ -0,0 +1,52 @@
+#ifndef GHOST_H
+#define GHOST_H
+
+#include "externs.h"
+#include "enum.h"
+#include "itemprop.h"
+#include "mon-util.h"
+
+struct ghost_demon
+{
+public:
+ std::string name;
+
+ species_type species;
+ job_type job;
+ skill_type best_skill;
+ short best_skill_level;
+ short xl;
+
+ short max_hp, ev, ac, damage, speed;
+ bool see_invis;
+ brand_type brand;
+ mon_resist_def resists;
+
+ bool spellcaster, cycle_colours;
+ flight_type fly;
+
+ monster_spells spells;
+
+public:
+ ghost_demon();
+ void reset();
+ void init_random_demon();
+ void init_player_ghost();
+
+public:
+ static std::vector<ghost_demon> find_ghosts();
+
+private:
+ static int n_extra_ghosts();
+ static void find_extra_ghosts(std::vector<ghost_demon> &ghosts, int n);
+ static void find_transiting_ghosts(std::vector<ghost_demon> &gs, int n);
+ static void announce_ghost(const ghost_demon &g);
+
+private:
+ void add_spells();
+ spell_type translate_spell(spell_type playerspell) const;
+};
+
+extern std::vector<ghost_demon> ghosts;
+
+#endif