summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-04 06:30:41 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-04 06:30:41 +0000
commitd5c69c9f285d371b0625de75b9a71055ec220061 (patch)
tree0ec078bad93eadb5c3cc680b617e6b5a6f82e42a /crawl-ref/source/externs.h
parent9031dab3a7fd207c9d6ac99fc16874b959c51f8c (diff)
downloadcrawl-ref-d5c69c9f285d371b0625de75b9a71055ec220061.tar.gz
crawl-ref-d5c69c9f285d371b0625de75b9a71055ec220061.zip
[1956565] Fix issues with monster names.
Monster names are now stored in the monster struct and saved. Changed some monster-finding functions to return monsters* instead of monster index for type-safety. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4859 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 852c35d2e5..71af54fc6c 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -1010,8 +1010,11 @@ public:
~monsters();
monsters &operator = (const monsters &other);
+ void reset();
public:
+ std::string mname;
+
int type;
int hit_points;
int max_hit_points;
@@ -1050,10 +1053,14 @@ public:
// AI_SEE_MONSTER
public:
+ // Returns true if the monster is named with a proper name, or is
+ // a player ghost.
+ bool is_named() const;
+ const monsterentry *find_monsterentry() const;
+
void init_experience();
void mark_summoned(int longevity, bool mark_items_summoned );
-
bool has_action_energy() const;
void check_redraw(const coord_def &oldpos) const;
void apply_location_effects();
@@ -1098,7 +1105,6 @@ public:
void ghost_init();
void pandemon_init();
void destroy_inventory();
- void reset();
void load_spells(mon_spellbook_type spellbook);
actor *get_foe() const;
@@ -1262,7 +1268,6 @@ private:
coord_def &chosen,
int &nvalid) const;
bool has_spell_of_type(unsigned) const;
- const monsterentry *find_monsterentry() const;
};
struct cloud_struct