|
| | Player () |
| |
| | Player (const std::vector< DeckEntry > &startingCardList, int hp=10) |
| | Constructs a player with an initial deck and starting HP.
|
| |
| void | setName (std::string_view name) |
| | Sets the display name of the player.
|
| |
| std::string_view | getName () const |
| | Returns the display name of the player.
|
| |
| const DeckPlayer & | getDeckPlayer () |
| | Returns the player's persistent deck.
|
| |
| | Entity () |
| |
| | Entity (int hp, int attack=0, int armor=0) |
| |
| std::string_view | getName () const |
| | Returns the display name of the entity.
|
| |
| int | getArmor () const |
| | Returns the current armor value.
|
| |
| int | getAttack () const |
| | Returns the current attack value.
|
| |
| void | resetArmor () |
| | Resets armor to zero.
|
| |
| void | resetAttack () |
| | Resets attack to zero.
|
| |
| void | increaseArmor (int amount) |
| | Increases armor by the given amount.
|
| |
| void | increaseAttack (int amount) |
| | Increases attack by the given amount.
|
| |
| void | lowerArmor (int amount) |
| | Decreases armor by the given amount.
|
| |
| int | getHp () const |
| | Returns the current HP value.
|
| |
| void | lowerHp (int amount) |
| | Decreases HP by the given amount.
|
| |
| void | increaseHp (int amount) |
| | Increases HP by the given amount.
|
| |
Player-controlled entity with a persistent deck.
Player represents the user-controlled character. In addition to the base Entity combat state (HP, armor), it owns a persistent DeckPlayer used to initialize combat decks for encounters.
The Player object itself is long-lived across combats