OSDN Git Service

Merge pull request #3322 from habu1010/feature/refactor-switch-randint1-by-rand_choice
[hengbandforosx/hengbandosx.git] / src / mind / mind-power-getter.h
1 #pragma once
2
3 #include "mind/mind-types.h"
4 #include "system/angband.h"
5
6 struct mind_power;
7 struct mind_type;
8 class PlayerType;
9 class MindPowerGetter {
10 public:
11     MindPowerGetter(PlayerType *player_ptr);
12     virtual ~MindPowerGetter() = default;
13     bool get_mind_power(SPELL_IDX *sn, bool only_browse);
14
15 private:
16     PlayerType *player_ptr;
17     SPELL_IDX index = 0;
18     int num = 0;
19     TERM_LEN y = 1;
20     TERM_LEN x = 10;
21     bool should_redraw_cursor = true;
22     char choice = 0;
23     concptr mind_description = "";
24     const mind_type *spell = nullptr;
25     bool flag = false;
26     bool redraw = false;
27     MindKindType use_mind;
28     int menu_line;
29     const mind_power *mind_ptr = nullptr;
30     PERCENTAGE chance = 0;
31     int mana_cost = 0;
32
33     void select_mind_description();
34     bool select_spell_index(SPELL_IDX *sn);
35     bool decide_mind_choice(char *out_val, const bool only_browse);
36     bool interpret_mind_key_input(const bool only_browse);
37     bool display_minds_chance(const bool only_browse);
38     void display_each_mind_chance();
39     void calculate_mind_chance(bool *has_weapon); // 配列.
40     void calculate_ki_chance(bool *has_weapon); // 配列.
41     void add_ki_chance();
42     void make_choice_lower();
43 };