summaryrefslogtreecommitdiff
path: root/src/monster_type.hpp
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-12-11 08:09:30 +0100
committerBardur Arantsson <bardur@scientician.net>2015-12-11 08:09:30 +0100
commit00be445e9127922933dae91a3d68660a57f53c5b (patch)
treea9ce274cb7cdba65e81994e719a8a40a8057d38e /src/monster_type.hpp
parentf88c896138589fd2328002a7a4f097c582f79f9b (diff)
Refactor race_info_idx() to avoid "invisible" static pointers
Diffstat (limited to 'src/monster_type.hpp')
-rw-r--r--src/monster_type.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/monster_type.hpp b/src/monster_type.hpp
index 912c97d0..8353f228 100644
--- a/src/monster_type.hpp
+++ b/src/monster_type.hpp
@@ -2,9 +2,11 @@
#include "h-basic.h"
#include "monster_blow.hpp"
+#include "monster_race_fwd.hpp"
#include <cassert>
#include <vector>
+#include <memory>
/**
* Monster information for a specific monster.
@@ -67,6 +69,12 @@ struct monster_type
s16b possessor = 0; /* Is it under the control of a possessor ? */
/**
+ * @brief get the "effective race" of the monster. This incorporates
+ * the effects of the "ego" of the monster, if any.
+ */
+ std::shared_ptr<monster_race> race() const;
+
+ /**
* @brief wipe the object's state
*/
void wipe()