forked from hengband/hengband
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Refactor] hengband#1498 Created timed-effect/ for separating timed-e…
…ffect variables from player_type
- Loading branch information
Showing
9 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "timed-effect/player-stun.h" | ||
|
||
short PlayerStun::current() | ||
{ | ||
return this->stun; | ||
} | ||
|
||
void PlayerStun::set(short value) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
class PlayerStun { | ||
public: | ||
PlayerStun() = default; | ||
virtual ~PlayerStun() = default; | ||
|
||
short current(); | ||
void set(short value); | ||
|
||
private: | ||
short stun = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "timed-effect/timed-effects.h" | ||
|
||
std::shared_ptr<PlayerStun> TimedEffects::stun() const | ||
{ | ||
return this->player_stun; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
#include "timed-effect/player-stun.h" | ||
#include <memory> | ||
|
||
class PlayerStun; | ||
class TimedEffects { | ||
public: | ||
TimedEffects() = default; | ||
virtual ~TimedEffects() = default; | ||
|
||
std::shared_ptr<PlayerStun> stun() const; | ||
|
||
private: | ||
std::shared_ptr<PlayerStun> player_stun = std::shared_ptr<PlayerStun>(new PlayerStun()); | ||
}; |