RpgGame
Console Based RPG game in C#
Loading...
Searching...
No Matches
RpgGame.Items.DoubleSword Class Reference

Represents a powerful two-handed sword weapon. More...

Inheritance diagram for RpgGame.Items.DoubleSword:
Collaboration diagram for RpgGame.Items.DoubleSword:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DoubleSword()

RpgGame.Items.DoubleSword.DoubleSword ( )
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.

Property Documentation

◆ color

override ConsoleColor RpgGame.Items.DoubleSword.color
get

Gets the console color used to render the Double Sword on the map.

Implements RpgGame.Items.IItem.

◆ Name

override string RpgGame.Items.DoubleSword.Name
get

Gets the display name of the weapon.

Implements RpgGame.Items.IItem.

◆ Symbol

override char RpgGame.Items.DoubleSword.Symbol
get

Gets the character symbol used to render the weapon on the map.

Implements RpgGame.Items.IItem.


The documentation for this class was generated from the following file: