-
Notifications
You must be signed in to change notification settings - Fork 0
/
Weapon.hpp
executable file
·50 lines (48 loc) · 1.46 KB
/
Weapon.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef WEAPON_HPP_
#define WEAPON_HPP_
#include "MyLibrary.hpp"
#ifndef tipi_armi_armature
#define tipi_armi_armature
enum weapon_type{fasce_da_combattimento,mazza,manganello,scure_antincendio,laser_chirurgico,coltello,spara_chiodi,pistola,uzi,arpione,fucile_a_pompa,lanciagranate,balestra_esplosiva,sniper,
lanciafiamme,lanciarazzi,pistola_particellare,fucile_sperimentale};
enum armor_type{vesti_da_laboratorio,completo_di_pelle,tuta_hazmat,scafandro,giubotto_antiproiettile,corazza};
enum type_of_weapon{no_res,light_fire_weapon,heavy_fire_weapon,explosive_weapon,huddle_weapon,white_weapon,special_weapon};
enum type_of_immunity{no_immunity,chemical_agent,poison,firearm,cutlass};
#endif
class Weapon{
protected:
char name[25];
weapon_type w;
int ammos;
type_of_weapon type;
double damage_min;
double damage_max;
int weight;
void set_weight();
void set_name();
void set_damage();
int set_max_ammos();
void set_type();
void set_ammos(int);
public:
Weapon(weapon_type);
Weapon(weapon_type,int);
void shoot();
bool has_ammos();
bool fire_gun();
bool explosive_gun();
bool white_gun();
bool huddle_gun();
void get_damage(double*,double*);
void print_scheda_arma();
void print_name_and_ammos();
void print_ammos();
int get_ammos();
weapon_type get_enum_weapon();
type_of_weapon which_type_of_weapon();
char* get_name();
int get_weight();
void merge(Weapon*);
bool confronta(Weapon*);
};
#endif