OSDN Git Service

[Fix] old_race_flags_ptrに動作及び種族フラグが反映されていないバグを修正
[hengbandforosx/hengbandosx.git] / src / monster / monster-processor-util.h
1 /*!
2  * @brief monster-processのための構造体群
3  * @date 2020/03/07
4  * @author Hourier
5  */
6
7 #pragma once
8
9 #include "monster-race/race-ability-flags.h"
10 #include "monster-race/race-behavior-flags.h"
11 #include "monster-race/race-kind-flags.h"
12 #include "system/angband.h"
13 #include "util/flag-group.h"
14
15 struct turn_flags {
16     bool see_m;
17     bool aware;
18     bool is_riding_mon;
19     bool do_turn;
20     bool do_move;
21     bool do_view;
22     bool do_take;
23     bool must_alter_to_move;
24
25     bool did_open_door;
26     bool did_bash_door;
27     bool did_take_item;
28     bool did_kill_item;
29     bool did_move_body;
30     bool did_pass_wall;
31     bool did_kill_wall;
32 };
33
34 struct old_race_flags {
35     BIT_FLAGS old_r_flags1;
36     BIT_FLAGS old_r_flags2;
37     BIT_FLAGS old_r_flags3;
38     BIT_FLAGS old_r_flagsr;
39     EnumClassFlagGroup<MonsterAbilityType> old_r_ability_flags;
40     EnumClassFlagGroup<MonsterBehaviorType> old_r_behavior_flags;
41     EnumClassFlagGroup<MonsterKindType> old_r_kind_flags;
42
43     byte old_r_blows0;
44     byte old_r_blows1;
45     byte old_r_blows2;
46     byte old_r_blows3;
47
48     byte old_r_cast_spell;
49 };
50
51 struct coordinate_candidate {
52     POSITION gy;
53     POSITION gx;
54     POSITION gdis;
55 };
56
57 struct monster_type;
58 turn_flags *init_turn_flags(MONSTER_IDX riding_idx, MONSTER_IDX m_idx, turn_flags *turn_flags_ptr);
59 old_race_flags *init_old_race_flags(old_race_flags *old_race_flags_ptr);
60 coordinate_candidate init_coordinate_candidate(void);
61
62 void store_enemy_approch_direction(int *mm, POSITION y, POSITION x);
63 void store_moves_val(int *mm, int y, int x);
64 void save_old_race_flags(MONRACE_IDX monster_race_idx, old_race_flags *old_race_flags_ptr);
65 byte decide_monster_speed(monster_type *m_ptr);