Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
SpaceAdventureRPG/Weapon.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (34 sloc)
1 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SEED_RPG_WEAPON_H | |
#define SEED_RPG_WEAPON_H | |
#include <string> | |
#include "Item.h" | |
using namespace std; | |
class Weapon : public Item { | |
private: | |
/* attributes of Weapon class */ | |
int weaponDamage; | |
int weaponLevel; | |
int weaponExperience; | |
float weaponCritChance; | |
int weaponAttackMoves; | |
float weaponHitChance; | |
public: | |
/* Weapon class constructor */ | |
Weapon(int id); | |
Weapon(Item item); | |
/* setter functions of Weapon class */ | |
void setWeaponDamage(int damage); | |
void setWeaponLevel(int level); | |
void setWeaponExperience(int experience); | |
void setWeaponCritChance(float critChance); | |
void setWeaponAttackMoves(int attackMoves); | |
void setWeaponHitChance(float hitChance); | |
/* getter functions of Weapon class */ | |
int getWeaponDamage(); | |
int getWeaponLevel(); | |
int getWeaponExperience(); | |
float getWeaponCritChance(); | |
int getWeaponAttackMoves(); | |
int getWeaponHitChance(); | |
}; | |
#endif //SEED_RPG_WEAPON_H |