diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2009-11-04 20:09:46 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2009-11-04 20:15:34 +0530 |
commit | 9ad85435681ad82c7ef07d2083e40e525e2b0f55 (patch) | |
tree | 3b16cb1129c004ad90cce5c81486373557d5f272 /crawl-ref/source/mapdef.h | |
parent | f7c29d55ca91d539d64de5e120a5b2c301ccb938 (diff) | |
download | crawl-ref-9ad85435681ad82c7ef07d2083e40e525e2b0f55.tar.gz crawl-ref-9ad85435681ad82c7ef07d2083e40e525e2b0f55.zip |
Allow vaults to override monster spells with spells:<xyz>
Vaults can now override monster spell sets, or give non-casting monsters
spells, and mark monsters as wizard or priest types.
The M_ACTUAL_SPELLS, M_SPELLCASTER and M_PRIEST monster class flags are
converted into MF_* flags at monster creation/polymorph time, and only the
per-monster flags are checked when determining wizard/priestliness. See caveats
in level_design.txt.
Diffstat (limited to 'crawl-ref/source/mapdef.h')
-rw-r--r-- | crawl-ref/source/mapdef.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h index 84fd1cce09..a94eaeab65 100644 --- a/crawl-ref/source/mapdef.h +++ b/crawl-ref/source/mapdef.h @@ -426,6 +426,7 @@ public: item_spec get_item(int index); size_t size() const { return items.size(); } + bool empty() const { return items.empty(); } std::string add_item(const std::string &spec, bool fix = false); std::string set_item(int index, const std::string &spec); @@ -474,6 +475,10 @@ class mons_spec item_list items; std::string monname; + bool explicit_spells; + monster_spells spells; + unsigned long extra_monster_flags; + mons_spec(int id = RANDOM_MONSTER, monster_type base = MONS_NO_MONSTER, int num = 0, @@ -482,7 +487,8 @@ class mons_spec : mid(id), place(), monbase(base), attitude(ATT_HOSTILE), number(num), quantity(1), genweight(gw), mlevel(ml), fix_mons(_fixmons), generate_awake(awaken), patrolling(false), band(false), - colour(BLACK), items(), monname("") + colour(BLACK), items(), monname(""), explicit_spells(false), + spells(), extra_monster_flags(0L) { } }; @@ -532,6 +538,7 @@ private: mons_spec get_zombified_monster(const std::string &name, monster_type zomb) const; mons_spec_slot parse_mons_spec(std::string spec); + void parse_mons_spells(mons_spec &slot, const std::string &spells); mons_spec pick_monster(mons_spec_slot &slot); int fix_demon(int id) const; bool check_mimic(const std::string &s, int *mid, bool *fix) const; |