3 #include "monster/monster-timed-effect-types.h"
4 #include "monster-race/monster-race.h"
7 * Monster information, for a specific monster.
8 * Note: fy, fx constrain dungeon size to 256x256
9 * The "hold_o_idx" field points to the first object of a stack
10 * of objects (if any) being carried by the monster (see above).
12 typedef struct floor_type floor_type;
13 typedef struct monster_type {
14 MONRACE_IDX r_idx; /* Monster race index 0 = dead. */
15 MONRACE_IDX ap_r_idx; /* Monster race appearance index */
16 floor_type *current_floor_ptr;
18 /* Sub-alignment flags for neutral monsters */
19 #define SUB_ALIGN_NEUTRAL 0x0000
20 #define SUB_ALIGN_EVIL 0x0001
21 #define SUB_ALIGN_GOOD 0x0002
22 BIT_FLAGS8 sub_align; /* Sub-alignment for a neutral monster */
24 POSITION fy; /* Y location on map */
25 POSITION fx; /* X location on map */
26 HIT_POINT hp; /* Current Hit points */
27 HIT_POINT maxhp; /* Max Hit points */
28 HIT_POINT max_maxhp; /* Max Max Hit points */
29 HIT_POINT dealt_damage; /* Sum of damages dealt by player */
30 TIME_EFFECT mtimed[MAX_MTIMED]; /* Timed status counter */
31 SPEED mspeed; /* Monster "speed" */
32 ACTION_ENERGY energy_need; /* Monster "energy" */
33 POSITION cdis; /* Current dis from player */
34 BIT_FLAGS8 mflag; /* Extra monster flags */
35 BIT_FLAGS8 mflag2; /* Extra monster flags */
36 bool ml; /* Monster is "visible" */
37 OBJECT_IDX hold_o_idx; /* Object being held (if any) */
38 POSITION target_y; /* Can attack !los player */
39 POSITION target_x; /* Can attack !los player */
40 STR_OFFSET nickname; /* Monster's Nickname */
43 /* TODO: クローン、ペット、有効化は意義が異なるので別変数に切り離すこと。save/loadのバージョン更新が面倒そうだけど */
44 BIT_FLAGS smart; /*!< Field for "smart_learn" - Some bit-flags for the "smart" field */
45 MONSTER_IDX parent_m_idx;