summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-util.h
diff options
context:
space:
mode:
authorcjo <cjo@ulyco.com>2013-07-18 19:56:49 -0700
committerNeil Moore <neil@s-z.org>2013-08-24 13:47:01 -0400
commit2774ec9060c4295fa4dd60553dbd72c375f7f0bd (patch)
treefaf33a08e67a02581d98b1fed520cfd344cdc0c8 /crawl-ref/source/mon-util.h
parent27b40443b5753db20c10c793f161485d1fe422ef (diff)
downloadcrawl-ref-2774ec9060c4295fa4dd60553dbd72c375f7f0bd.tar.gz
crawl-ref-2774ec9060c4295fa4dd60553dbd72c375f7f0bd.zip
Display monster spells and magical abilities with x-v
Decrease the need for spoilers by showing monster spells and magical abilities when examining a monster with the command x-v. If monsters have multiple possible spellbooks, all of them are listed.
Diffstat (limited to 'crawl-ref/source/mon-util.h')
-rw-r--r--crawl-ref/source/mon-util.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index 020b7cfa2f..d9733833a9 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -11,6 +11,7 @@
#include "enum.h"
#include "mon-enum.h"
#include "player.h"
+#include "mon-mst.h"
struct bolt;
@@ -96,6 +97,20 @@ private:
}
};
+vector<mon_spellbook_type> _get_spellbook_list(monster* mon);
+
+struct mon_spellbook
+{
+ mon_spellbook_type type;
+ spell_type spells[NUM_MONSTER_SPELL_SLOTS];
+};
+
+static const mon_spellbook mspell_list[] =
+{
+#include "mon-spll.h"
+};
+
+
struct monsterentry
{
short mc; // monster number
@@ -134,7 +149,7 @@ struct monsterentry
int8_t AC; // armour class
int8_t ev; // evasion
- int sec; // spellbook
+ mon_spellbook_type sec;
corpse_effect_type corpse_thingy;
zombie_size_type zombie_size;
shout_type shouts;