12 #include <unordered_map> 47 std::string
getName(
int weaponId);
92 std::string description;
102 std::unordered_map<int, WeaponData> weapons;
107 std::vector<int> weaponIds;
119 void addWeapon(
int id,
const std::string &name,
const std::string &description,
int damage,
const std::string &rarity,
bool ranged,
bool stun);
std::string getName(int weaponId)
Get the name of a weapon.
Definition: weapon.cpp:93
int getDamage(int weaponId)
Get the damage value of a weapon.
Definition: weapon.cpp:111
bool getRanged(int weaponId)
Check if a weapon is ranged.
Definition: weapon.cpp:131
bool getStun(int weaponId)
Check if a weapon can stun.
Definition: weapon.cpp:140
std::string getDescription(int weaponId)
Get the description of a weapon.
Definition: weapon.cpp:102
std::string getRarity(int weaponId)
Get the rarity of a weapon.
Definition: weapon.cpp:120
Weapon()
Constructor for the Weapon class.
Definition: weapon.cpp:17
int giveRandWeapon()
Get a random weapon ID.
Definition: weapon.cpp:59
int giveRariWeapon(const std::string &rarity)
Get a weapon ID based on its rarity.
Definition: weapon.cpp:70
Manages different types of weapons in the game.
Definition: weapon.h:20