-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArmor.hpp
93 lines (78 loc) · 2.07 KB
/
Armor.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef __ARMOR_HPP__
#define __ARMOR_HPP__
#include <iostream>
#include "Item.hpp"
using namespace std;
class Armor : public Item
{
protected:
int defense;
public:
Armor(){}
int get_sell_price(){return sell_price;}
string get_armor_name(){return name;}
string get_armor_description(){return description;}
int get_defense(){return defense;}
virtual void check_stats() { cout << "Armor: " << name << " Defense: " << defense << " Sell price: " << sell_price << endl << description << endl; return; };
};
class ByteArmor : public Armor
{
public:
ByteArmor()
{
sell_price = 15;
name = "ByteArmor";
description = "Armor made of a byte of code. Probably too thin to be proper armor but its better than nothing!";
defense = 5;
itemType = "Armor";
}
};
class KiloArmor : public Armor
{
public:
KiloArmor()
{
sell_price = 30;
name = "KiloArmor";
description = "Armor made of a kilobyte of code. This weighs a kilo! You'll definitely gain strength carrying this!";
defense = 10;
itemType = "Armor";
}
};
class MegaArmor : public Armor
{
public:
MegaArmor()
{
sell_price = 60;
name = "MegaArmor";
description = "Armor made of a megabyte of code. Being able to shoot and change weapons like MegaMan not included";
defense = 15;
itemType = "Armor";
}
};
class GigaArmor : public Armor
{
public:
GigaArmor()
{
sell_price = 120;
name = "GigaArmor";
description = "Armor made of a gigabyte of code. Might give giga defense physically, but it'll be a giga dent on your money";
defense = 20;
itemType = "Armor";
}
};
class TeraArmor : public Armor
{
public:
TeraArmor()
{
sell_price = 240;
name = "TeraArmor";
description = "Legendary armor made of a terabyte of code. The best of the best armor around the interface, but as it is the best, only a few exist due to the immense work for its creation.";
defense = 25;
itemType = "Armor";
}
};
#endif