OSDN Git Service

[Refactor] 耐性・弱点を再定義
[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-flags-resistance.h"
12 #include "monster-race/race-kind-flags.h"
13 #include "system/angband.h"
14 #include "util/flag-group.h"
15
16 struct turn_flags {
17     bool see_m;
18     bool aware;
19     bool is_riding_mon;
20     bool do_turn;
21     bool do_move;
22     bool do_view;
23     bool do_take;
24     bool must_alter_to_move;
25
26     bool did_open_door;
27     bool did_bash_door;
28     bool did_take_item;
29     bool did_kill_item;
30     bool did_move_body;
31     bool did_pass_wall;
32     bool did_kill_wall;
33 };
34
35 struct old_race_flags {
36     BIT_FLAGS old_r_flags1;
37     BIT_FLAGS old_r_flags2;
38     BIT_FLAGS old_r_flags3;
39     EnumClassFlagGroup<MonsterAbilityType> old_r_ability_flags;
40     EnumClassFlagGroup<MonsterBehaviorType> old_r_behavior_flags;
41     EnumClassFlagGroup<MonsterKindType> old_r_kind_flags;
42     EnumClassFlagGroup<MonsterResistanceType> old_r_resistance_flags;
43
44     byte old_r_blows0;
45     byte old_r_blows1;
46     byte old_r_blows2;
47     byte old_r_blows3;
48
49     byte old_r_cast_spell;
50 };
51
52 struct coordinate_candidate {
53     POSITION gy;
54     POSITION gx;
55     POSITION gdis;
56 };
57
58 struct monster_type;
59 turn_flags *init_turn_flags(MONSTER_IDX riding_idx, MONSTER_IDX m_idx, turn_flags *turn_flags_ptr);
60 old_race_flags *init_old_race_flags(old_race_flags *old_race_flags_ptr);
61 coordinate_candidate init_coordinate_candidate(void);
62
63 void store_enemy_approch_direction(int *mm, POSITION y, POSITION x);
64 void store_moves_val(int *mm, int y, int x);
65 void save_old_race_flags(MONRACE_IDX monster_race_idx, old_race_flags *old_race_flags_ptr);
66 byte decide_monster_speed(monster_type *m_ptr);