-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenemies.cpp
216 lines (204 loc) · 8.81 KB
/
enemies.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#include <ctime>
#include <unistd.h>
#include <cstdlib>
#include <iostream>
#include "menus.h"
#include "enemies.h"
int enemy = 0;
int enemyInfo[3] = {0,0,0};
//Wizard Stats
int enemyWizardInfo[3] = {200,20,1};
//int wizard_inv[3][2] = {
// {0,3},
// {2,3},
// {2,3},
// {2,9}
//};
string enemyWizardImage0 = " . \n";
string enemyWizardImage1 = " x. \n";
string enemyWizardImage2 = " '', \n";
string enemyWizardImage3 = " .. : .:. \n";
string enemyWizardImage4 = " .' 'Ox;,cO0. \n";
string enemyWizardImage5 = " .kOKo:kxxkoXOc \n";
string enemyWizardImage6 = " ,k0.xxkO0.Kk \n";
string enemyWizardImage7 = " ...,0xxOK ., \n";
string enemyWizardImage8 = " . x0kxkX. \n";
string enemyWizardImage9 = " . 0OkxkX \n";
string enemyWizardImage10 = " . KkxkOK \n";
string enemyWizardImage11 = " ',. .,c. '\n\n\n";
string enemyWizardImageHit0 = " . \n";
string enemyWizardImageHit1 = " x. \n";
string enemyWizardImageHit2 = " '', \n";
string enemyWizardImageHit3 = " .. : .:. \n";
string enemyWizardImageHit4 = " .' 'Ox;,cO0. \n";
string enemyWizardImageHit5 = " .kOKo:kxxkoXOc \n";
string enemyWizardImageHit6 = " ,k0.xxkO0.Kk \n";
string enemyWizardImageHit7 = " ...,0xxOK ., \n";
string enemyWizardImageHit8 = " . x0kxkX. \n";
string enemyWizardImageHit9 = " . 0OkxkX \n";
string enemyWizardImageHit10 = " . KkxkOK \n";
string enemyWizardImageHit11 = " ',. .,c. '\n\n\n";
string enemyOrcImage0 = " \n";
string enemyOrcImage1 = " coxxdoc:, \n";
string enemyOrcImage2 = " ;xdxxxxxdllcc; \n";
string enemyOrcImage3 = " oxdxkkxdolcllol, \n";
string enemyOrcImage4 = " ,cdkddddxxdxxddooc:,\n";
string enemyOrcImage5 = " lkooodxcdoxdxxkxxocc: \n";
string enemyOrcImage6 = " ;l,,;lod;clcc:llooc:c:: \n";
string enemyOrcImage7 = " ,c;. ...............ccclc:, \n";
string enemyOrcImage8 = " ;';. .,lll;,,;:l:'.,:; \n";
string enemyOrcImage9 = " cc,;;..:cc;,::co,''oc. \n";
string enemyOrcImage10 = " ,dcdll:;:cclc:;l:;;cc,\n";
string enemyOrcImage11 = " locdodxkkOOOxo:cllddccc; \n";
string enemyOrcImage12 = " ,xllllodoodxkkkkkkkxdlcoxkl' \n";
string enemyOrcImage13 = " ,l;:::cloldxxddddollcccoOOOk; \n";
string enemyOrcImage14 = " '',,..';clcldolc;'...'';000OOxc \n";
string enemyOrcImage15 = " ,:colco. .'.,,,,'. ..:dk00K0koo::coc \n";
string enemyOrcImage16 = " :odddol:.. ..';cdoloxkkkxxoc::lodx; \n";
string enemyOrcImage17 = " :dooddoc:;;'. ..,;:ldxxo:oxdddol:::loxkkxc \n";
string enemyOrcImage18 = " :lollc:::c:::;,;llllooccoxkxoclcccc::::clodOOkd; \n";
string enemyOrcImage19 = " .',,;codddddollolcll:cddddddxdddollcldddxxdl: \n";
string enemyOrcImage20 = " ..,cooddddxxo;:;oxOOO000000Okxo:,,' \n";
string enemyOrcImage21 = " ''.. .';:::::::;, \n";
string enemyOrcImageHit0 = " \n";
string enemyOrcImageHit1 = " coxxdoc:, \n";
string enemyOrcImageHit2 = " ;xdxxxxxdllcc; \n";
string enemyOrcImageHit3 = " oxdxkkxdolcllol, \n";
string enemyOrcImageHit4 = " ,cdkddddxxdxxddooc:,\n";
string enemyOrcImageHit5 = " lkooodxcdoxdxxkxxocc: \n";
string enemyOrcImageHit6 = " ;l,,;lod;clcc:llooc:c:: \n";
string enemyOrcImageHit7 = " ,c;. ...............ccclc:, \n";
string enemyOrcImageHit8 = " ;';. .,lll;,,;:l:'.,:; \n";
string enemyOrcImageHit9 = " cc,;;..:cc;,::co,''oc. \n";
string enemyOrcImageHit10 = " ,dcdll:;:cclc:;l:;;cc,\n";
string enemyOrcImageHit11 = " locdodxkkOOOxo:cllddccc; \n";
string enemyOrcImageHit12 = " ,xllllodoodxkkkkkkkxdlcoxkl' \n";
string enemyOrcImageHit13 = " ,l;:::cloldxxddddollcccoOOOk; \n";
string enemyOrcImageHit14 = " '',,..';clcldolc;'...'';000OOxc \n";
string enemyOrcImageHit15 = " ,:colco. .'.,,,,'. ..:dk00K0koo::coc \n";
string enemyOrcImageHit16 = " :odddol:.. ..';cdoloxkkkxxoc::lodx; \n";
string enemyOrcImageHit17 = " :dooddoc:;;'. ..,;:ldxxo:oxdddol:::loxkkxc \n";
string enemyOrcImageHit18 = " :lollc:::c:::;,;llllooccoxkxoclcccc::::clodOOkd; \n";
string enemyOrcImageHit19 = " .',,;codddddollolcll:cddddddxdddollcldddxxdl: \n";
string enemyOrcImageHit20 = " ..,cooddddxxo;:;oxOOO000000Okxo:,,' \n";
string enemyOrcImageHit21 = " ''.. .';:::::::;, \n";
//displays picture of enemy
void displayEnemy(string enemyType)
{
if (enemyType == "wizard")
{
cout << enemyWizardImage0;
cout << enemyWizardImage1;
cout << enemyWizardImage2;
cout << enemyWizardImage3;
cout << enemyWizardImage4;
cout << enemyWizardImage5;
cout << enemyWizardImage6;
cout << enemyWizardImage7;
cout << enemyWizardImage8;
cout << enemyWizardImage9;
cout << enemyWizardImage10;
cout << enemyWizardImage11;
}
else if (enemyType == "orc")
{
cout << enemyOrcImage0;
cout << enemyOrcImage1;
cout << enemyOrcImage2;
cout << enemyOrcImage3;
cout << enemyOrcImage4;
cout << enemyOrcImage5;
cout << enemyOrcImage6;
cout << enemyOrcImage7;
cout << enemyOrcImage8;
cout << enemyOrcImage9;
cout << enemyOrcImage10;
cout << enemyOrcImage11;
cout << enemyOrcImage12;
cout << enemyOrcImage13;
cout << enemyOrcImage14;
cout << enemyOrcImage15;
cout << enemyOrcImage16;
cout << enemyOrcImage17;
cout << enemyOrcImage18;
cout << enemyOrcImage19;
cout << enemyOrcImage20;
cout << enemyOrcImage21;
}
}
//displays shifted picture of enemy
void displayEnemyShift(string enemyType)
{
if (enemyType == "wizard")
{
cout << enemyWizardImageHit0;
cout << enemyWizardImageHit1;
cout << enemyWizardImageHit2;
cout << enemyWizardImageHit3;
cout << enemyWizardImageHit4;
cout << enemyWizardImageHit5;
cout << enemyWizardImageHit6;
cout << enemyWizardImageHit7;
cout << enemyWizardImageHit8;
cout << enemyWizardImageHit9;
cout << enemyWizardImageHit10;
cout << enemyWizardImageHit11;
}
else if (enemyType == "orc")
{
cout << enemyOrcImageHit0;
cout << enemyOrcImageHit1;
cout << enemyOrcImageHit2;
cout << enemyOrcImageHit3;
cout << enemyOrcImageHit4;
cout << enemyOrcImageHit5;
cout << enemyOrcImageHit6;
cout << enemyOrcImageHit7;
cout << enemyOrcImageHit8;
cout << enemyOrcImageHit9;
cout << enemyOrcImageHit10;
cout << enemyOrcImageHit11;
cout << enemyOrcImageHit12;
cout << enemyOrcImageHit13;
cout << enemyOrcImageHit14;
cout << enemyOrcImageHit15;
cout << enemyOrcImageHit16;
cout << enemyOrcImageHit17;
cout << enemyOrcImageHit18;
cout << enemyOrcImageHit19;
cout << enemyOrcImageHit20;
cout << enemyOrcImageHit21;
}
}
//animates images of enemy
void displayEnemyHit(string enemyType)
{
clearScreen();
cout << menuBar << "\n\n";
displayEnemyShift(enemyType);
cout << menuBar << "\n\n";
usleep(300000);
clearScreen();
cout << menuBar << "\n\n";
displayEnemy(enemyType);
cout << menuBar << "\n\n";
usleep(300000);
clearScreen();
cout << menuBar << "\n\n";
displayEnemyShift(enemyType);
cout << menuBar << "\n\n";
usleep(300000);
clearScreen();
cout << menuBar << "\n\n";
displayEnemy(enemyType);
cout << menuBar << "\n\n";
usleep(300000);
clearScreen();
cout << menuBar << "\n\n";
displayEnemyShift(enemyType);
cout << menuBar << "\n\n";
usleep(300000);
clearScreen();
cout << menuBar << "\n\n";
displayEnemy(enemyType);
}