Initialize files from GitLab repository
This commit is contained in:
34
include/people/Opponent.h
Normal file
34
include/people/Opponent.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef OPPONENT_H
|
||||
#define OPPONENT_H
|
||||
|
||||
#include<iostream>
|
||||
using namespace std;
|
||||
|
||||
class Opponent
|
||||
{
|
||||
private:
|
||||
string name;
|
||||
int current_health;
|
||||
int max_health;
|
||||
int level;
|
||||
int base_damage;
|
||||
int max_damage;
|
||||
|
||||
public:
|
||||
Opponent();
|
||||
Opponent(string opponent_name, int opponent_level, int base, int max);
|
||||
|
||||
// SETTER FUNCTIONS
|
||||
void setOpponentHealth(int damage_taken); // Set current Health minus dmaage_taken
|
||||
|
||||
// GETTER FUNCTIONS
|
||||
string getOpponentName();
|
||||
int getOpponentHealth();
|
||||
int getOpponentMaxHealth();
|
||||
int getOpponentLevel();
|
||||
int getOpponentBaseDamage();
|
||||
int getOpponentMaxDamage();
|
||||
int getPotionAmount();
|
||||
};
|
||||
|
||||
#endif
|
||||
53
include/people/User.h
Normal file
53
include/people/User.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#ifndef USER_H
|
||||
#define USER_H
|
||||
|
||||
#include "../items/Weapon.h" // include the Weapon header file
|
||||
#include "../items/Armor.h"
|
||||
#include "../items/Potion.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class User
|
||||
{
|
||||
private:
|
||||
string name;
|
||||
int current_health;
|
||||
int max_health;
|
||||
int level;
|
||||
int xp_points;
|
||||
int xp_needed;
|
||||
int credits;
|
||||
Weapon equipped_weapon[2]; // declare the user_weapons array to hold 2 Weapon objects
|
||||
Armor equipped_armor[3];
|
||||
Potion equipped_potions[5];
|
||||
|
||||
public:
|
||||
User(string username, Weapon current_weapons[], Armor current_armor[], Potion current_potions[]);
|
||||
|
||||
// SETTER FUNCTIONS
|
||||
void setUserName(string username);
|
||||
void setUserHealth(int damage_taken);
|
||||
void setHealthAfterPurchase(int armor_amount_added);
|
||||
void setUserHealthFull(int full_health);
|
||||
void addArmorToHealth(Armor current_armor);
|
||||
void setMaxHealth(Armor current_armor[]);
|
||||
void setUserCredits(int current_credits);
|
||||
void giveUserCredits(int credits_added);
|
||||
void setUserXP(int xp_earned);
|
||||
void resetUserXP(int xp_remaining);
|
||||
void setUserXPNeeded(int level); //Returns amount of XP needed to level up (random each time)
|
||||
void usePotion(int potion_amount);
|
||||
void levelUpUser(int current_level);
|
||||
|
||||
// GETTER FUNCTIONS
|
||||
string getUserName();
|
||||
int getUserHealth();
|
||||
int getUserMaxHealth();
|
||||
int getUserLevel();
|
||||
int getUserXP();
|
||||
int getUserCredits();
|
||||
int getUserXPNeeded();
|
||||
Weapon getUserWeapon(int input); // add a semicolon at the end of the function definition
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user