Skip to content

Commit

Permalink
[Refactor] hengband#1498 Defined is_stunned()
Browse files Browse the repository at this point in the history
  • Loading branch information
Hourier committed Sep 18, 2021
1 parent 67177d5 commit e0070e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/timed-effect/player-stun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ int PlayerStun::decrease_chance() const
}
}

bool PlayerStun::is_stunned() const
{
return this->get_rank() > StunRank::NONE;
}

void PlayerStun::set(short value)
{
this->stun = value;
Expand Down
1 change: 1 addition & 0 deletions src/timed-effect/player-stun.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class PlayerStun {
StunRank get_rank(short value) const;
std::string_view get_stun_mes(StunRank stun_rank) const;
int decrease_chance() const;
bool is_stunned() const;
void reset();
void set(short value);

Expand Down

0 comments on commit e0070e9

Please sign in to comment.