|
RpgGame
Console Based RPG game in C#
|
Represents a powerful two-handed sword weapon. More...
Public Member Functions | |
| DoubleSword () | |
| Initializes a new instance of the DoubleSword 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 Double Sword on the map. | |
| override char | Symbol [get] |
| Gets the character symbol used to render the weapon on the map. | |
| override int | Damage [get] |
| Gets the damage value dealt by this weapon. | |
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 powerful two-handed sword weapon.
The DoubleSword occupies both hands when equipped, as defined by the TwoHandOccupation strategy passed to the base Weapon class.
This class demonstrates the use of composition to determine equipment behavior without relying on type checks.
|
inline |
Initializes a new instance of the DoubleSword class.
The weapon uses a TwoHandOccupation strategy, meaning it requires both hands to be free before equipping.
|
get |
Gets the console color used to render the Double 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 weapon on the map.
Implements RpgGame.Items.IItem.