-
Notifications
You must be signed in to change notification settings - Fork 0
/
Item.cpp
106 lines (90 loc) · 1.73 KB
/
Item.cpp
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
94
95
96
97
98
99
100
101
102
103
104
105
106
#include "Item.h"
#include <iostream>
#include <string>
using namespace std;
// CONSTRUCTORS
Item::Item() {
/*
name = "";
description = "";
type = "";
stat_value = 0; */
}
// For misc
Item::Item(char n[], string d, string t, double sv) {
for(int i = 0; i < 50; i++)
name[i] = n[i];
description = d;
type = t;
stat_value = sv;
}
// For all other items that will have scaling
Item::Item(int i, char n[], string d, string t, double sv, double str, double dex, double intel, double res) {
item_num = i;
for(int i = 0; i < 50; i++)
name[i] = n[i];
description = d;
type = t;
stat_value = sv;
str_scaling = str;
dex_scaling = dex;
int_scaling = intel;
res_scaling = res;
}
// SETS
void Item::set_item_num(int i) {
item_num = i;
}
void Item::set_name(char input[]) {
for(int i = 0; i < 50; i++)
name[i] = input[i];
}
void Item::set_description(string input) {
description = input;
}
void Item::set_type(string input) {
type = input;
}
void Item::set_stat_value(int input) {
stat_value = input;
}
void Item::set_str_scaling(double input) {
str_scaling = input;
}
void Item::set_dex_scaling(double input) {
dex_scaling = input;
}
void Item::set_int_scaling(double input) {
int_scaling = input;
}
void Item::set_res_scaling(double input) {
res_scaling = input;
}
// GETS
int Item::get_item_num() {
return item_num;
}
string Item::get_name() {
return name;
}
string Item::get_description() {
return description;
}
string Item::get_type() {
return type;
}
int Item::get_stat_value() {
return stat_value;
}
double Item::get_str_scaling() {
return str_scaling;
}
double Item::get_dex_scaling() {
return dex_scaling;
}
double Item::get_int_scaling() {
return int_scaling;
}
double Item::get_res_scaling() {
return res_scaling;
}