OSDN Git Service

[Refactor] #3736 activation_type のフィールド変数をconcptr からstring に差し替えた
[hengbandforosx/hengbandosx.git] / src / object-enchant / item-magic-applier.h
1 #pragma once
2
3 #include "system/angband.h"
4 #include <tuple>
5
6 class ItemEntity;
7 class PlayerType;
8 class ItemMagicApplier {
9 public:
10     ItemMagicApplier(PlayerType *player_ptr, ItemEntity *o_ptr, DEPTH lev, BIT_FLAGS mode);
11     void execute();
12
13 private:
14     PlayerType *player_ptr;
15     ItemEntity *o_ptr;
16     DEPTH lev;
17     BIT_FLAGS mode;
18
19     std::tuple<int, int> calculate_chances();
20     int calculate_power(const int chance_good, const int chance_great);
21     int calculate_rolls(const int power);
22     void try_make_artifact(const int rolls);
23     bool set_fixed_artifact_generation_info();
24     void apply_cursed();
25 };