|
| void | RestoreHealth (int amount) |
| | Restores the player's health by the specified amount, capped at 100.
|
| |
| void | TakeDamage (int amount) |
| | Reduces the player's health by the specified amount.
|
| |
| void | AddCoins (int amount) |
| | Adds the specified amount of coins to the player.
|
| |
|
void | AddGold (int amount) |
| |
| bool | EquipLeft (IEquippable item) |
| | Attempts to equip an item into the left hand.
|
| |
| bool | EquipRight (IEquippable item) |
| | Attempts to equip an item into the right hand.
|
| |
| void | DropLeft (Level level) |
| | Drops the currently equipped left-hand item onto the level.
|
| |
| void | DropRight (Level level) |
| | Drops the currently equipped right-hand item onto the level.
|
| |
| | Player (Position startPosition) |
| | Initializes a new instance of the Player class.
|
| |
| void | Move (Position newPos) |
| | Moves the character to a new position.
|
| |
|
|
override char | Symbol [get] |
| | Character used to represent the player on the map.
|
| |
|
int | Strength [get] |
| | Gets the player's Strength attribute.
|
| |
|
int | Dexterity [get] |
| | Gets the player's Dexterity attribute.
|
| |
|
int | Health [get] |
| | Gets the player's current Health value.
|
| |
|
int | Luck [get] |
| | Gets the player's Luck attribute.
|
| |
|
int | Aggression [get] |
| | Gets the player's Aggression attribute.
|
| |
|
int | Wisdom [get] |
| | Gets the player's Wisdom attribute.
|
| |
|
IEquippable? | LeftHand [get] |
| | Gets the item currently equipped in the left hand.
|
| |
|
IEquippable? | RightHand [get] |
| | Gets the item currently equipped in the right hand.
|
| |
|
int | Coins [get] |
| | Gets the total number of coins collected.
|
| |
|
int | Gold [get] |
| |
|
char | Symbol [get] |
| | Gets the character symbol used to render this character on the map.
|
| |
|
Position | Pos [get] |
| | Gets or sets the current position of the character in the level.
|
| |
Represents the player-controlled character in the game.
The Player class manages character attributes, inventory, equipment handling, and currency. Equipment rules are enforced through polymorphic behavior defined in IEquippable.