OSDN Git Service

Merge pull request #3569 from sikabane-works/release/3.0.0.88-alpha
[hengbandforosx/hengbandosx.git] / src / timed-effect / player-stun.h
1 #pragma once
2
3 #include "term/term-color-types.h"
4 #include <string>
5 #include <tuple>
6
7 enum class PlayerStunRank;
8 class PlayerStun {
9 public:
10     PlayerStun() = default;
11     virtual ~PlayerStun() = default;
12
13     static PlayerStunRank get_rank(short value);
14     static std::string_view get_stun_mes(PlayerStunRank stun_rank);
15     static short get_accumulation(int rank);
16     static int get_accumulation_rank(int total, int damage);
17
18     short current() const;
19     PlayerStunRank get_rank() const;
20     int get_magic_chance_penalty() const;
21     int get_item_chance_penalty() const;
22     short get_damage_penalty() const;
23     bool is_stunned() const;
24     bool is_knocked_out() const;
25     std::tuple<term_color_type, std::string_view> get_expr() const;
26     void set(short value);
27     void reset();
28
29 private:
30     short stun = 0;
31 };