|
RpgGame
Console Based RPG game in C#
|
Represents a standard one-handed sword weapon. More...
Public Member Functions | |
| Sword () | |
| Initializes a new instance of the Sword class. | |
Public Member Functions inherited from RpgGame.Items.Weapon | |
| bool | TryEquipToLeft (Player player) |
| Attempts to equip the weapon in the player's left hand. | |
| bool | TryEquipToRight (Player player) |
| Attempts to equip the weapon in the player's right hand. | |
| virtual string | GetDescription () |
| Returns a short textual description of the weapon. | |
| bool | OnPickup (Player player, Inventory inventory) |
| Handles pickup interaction for the weapon. | |
| void | OnDrop (Level level, Player player) |
| Drops the weapon onto the current level at the player's position. | |
Properties | |
| override string | Name [get] |
| Gets the display name of the weapon. | |
| override ConsoleColor | color [get] |
| Gets the console color used to render the sword on the map. | |
| override char | Symbol [get] |
| Gets the character symbol used to render the sword on the map. | |
| override int | Damage [get] |
| Gets the damage value dealt by the sword. | |
Properties inherited from RpgGame.Items.Weapon | |
| string | Name [get] |
| Gets the display name of the weapon. | |
| ConsoleColor | color [get] |
| Gets the console color used to render the weapon on the map. | |
| char | Symbol [get] |
| Gets the character symbol used to render the weapon on the map. | |
| int | Damage [get] |
| Gets the damage value dealt by the weapon. | |
Properties inherited from RpgGame.Items.IItem | |
Additional Inherited Members | |
Protected Member Functions inherited from RpgGame.Items.Weapon | |
| Weapon (HandOccupation occupation) | |
| Initializes a new instance of the Weapon class with the specified hand occupation strategy. | |
Represents a standard one-handed sword weapon.
The Sword is a concrete implementation of Weapon that uses the OneHandOccupation strategy, allowing it to be equipped independently in either the left or right hand.
This class demonstrates how weapon behavior is configured through composition rather than conditional logic.
|
inline |
Initializes a new instance of the Sword class.
The sword occupies only one hand when equipped.
|
get |
Gets the console color used to render the sword on the map.
Implements RpgGame.Items.IItem.
|
get |
Gets the display name of the weapon.
Implements RpgGame.Items.IItem.
|
get |
Gets the character symbol used to render the sword on the map.
Implements RpgGame.Items.IItem.