-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresources.h
238 lines (218 loc) · 13.7 KB
/
resources.h
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
char screen[SCREEN_HEIGHT][SCREEN_WIDTH];
char info_panel[2][22] = {
{'#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#'},
{'#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#'},
};
char side_panel[12][32] = {
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '}
};
char lvls[4][14][22] = {
{
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
},
{
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','#','#','.','.','.','.','.','.','.','.','.','#','#','.','.','.','.','.','#'},
{'#','.','.','#','#','.','.','.','.','.','.','.','.','.','#','#','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','#','#','.','.','.','.','.','.','.','.','.','#','#','.','.','.','.','.','#'},
{'#','.','.','#','#','.','.','.','.','.','.','.','.','.','#','#','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
},
{
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','#','#','.','.','.','.','.','.','#','#','.','.','.','.','.','#'},
{'#','~','~','~','~','~','~','#','.','.','.','.','.','.','#','~','~','~','~','~','~','#'},
{'#','~','~','~','~','~','~','#','.','.','.','.','.','.','#','~','~','~','~','~','~','#'},
{'#','~','~','~','~','~','~','#','.','.','.','.','.','.','#','~','~','~','~','~','~','#'},
{'#','.','.','.','.','.','#','#','.','.','.','.','.','.','#','#','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
},
{
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','#','#','#','#','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','#','~','~','~','~','#','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','#','~','~','~','~','#','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','#','~','~','~','~','#','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','#','#','#','#','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
}
};
/*PARTY - PLAYABLE CHARACTERS*/
struct character_pc {
char letter;
int id; // id is must be unique, since we could have multiple figures with the same letter.
int initiative;
char name[10];
char pc_class[10];
char pc_description[24];
int lvl;
int xp;
int max_xp;
int mov; /*how many squares player can move*/
int hp;
int max_hp;
int ac; /*Armor Class*/
int bonus; /*Attack Bonus*/
int chain_mail;
char weapon[2];
char spells[4][2];
int start_x_position;
int start_y_position;
int x_position;
int y_position;
};
struct character_pc pcs[4] = {
{'A',1,2,"Avery", "Fighter","This one is protagonist.",1,0,2000,40,8,8,15,1,1,{'b','s'},{{'n','n'},{'n','n'},{'n','n'},{'n','n'}},12,3,12,3},
{'K',2,4,"Koko", "Bl__Mage","I will eradicate them.", 1,0,2500,40,6,6,13,1,0,{'m','r'},{{'l','b'},{'f','b'},{'n','n'},{'n','n'}},12,4,12,4},
{'M',3,6,"Marsh", "Archer","You can\'t escape!",1,0,2500,30,6,6,13,1,0,{'b','w'},{{'n','n'},{'n','n'},{'n','n'},{'n','n'}},12,5,12,5},
{'Z',4,8,"Zok", "Wh__Mage","Need help?",1,0,1500,30,8,8,13,1,0,{'m','r'},{{'l','b'},{'r','e'},{'n','n'},{'n','n'}},12,6,12,6}
};
int amount_of_fighters = sizeof(pcs) / sizeof(pcs[0]);
// struct character_pc character1 = {"A",1,"Avery", "Fighter","This one is protagonist.",1,0,2000,40,8,15,1,1,{"Big Sword",8},{"","",0,0,0},{"","",0,0,0},{"","",0,0,0},{"","",0,0,0},12,3};
// struct character_pc character2 = {"K",2,"Koko", "Black Mage", "I will eradicate them.", 1,0,2500,40,6,13,1,0,{"Magic Rod",3},{"Light.Bolt","Range 50 + 10 per lvl. DMG 1d6 in 10x40.",50,5,0},{"Fireball","Rnge 100 + 10 per lvl. DMG 1d6 rad 20.",100,6,0},{"","",0,0,0},{"","",0,0,0},12,4};
struct enemy {
char letter;
int id; // id is must be unique, since we could have multiple figures with the same letter.
int initiative;
char name[10];
char race[14];
char attack_description[40];
int hp;
int ac; /*Armor Class*/
int mov; /*how many squares player can move*/
int dmg;
int morale;
int saves; /*"SAVES AS target, BFT, p. 89"*/
int target_index;
int x_position;
int y_position;
int location;
};
/*
Saving throw - d20 against number. 1 is always failure, 20 alway success.
If number + modifier equals or exceeds target number, the roll is success,
otherwise faild.
*/
struct enemy beasts[40] = {
{'b',1,1,"Bill","Bat","Bat attacks!",4,14,30,4,7,18,0,1,4,2},
{'s',2,3,"Steve","Bat","Bat attacks!",4,14,30,4,7,18,0,1,3,2},
{'g',3,1,"Benny","Red_Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,4},
{'g',4,3,"Mitch","Blue_Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,4},
{'g',5,5,"Jim","Red_Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,4},
{'g',6,7,"Phil","Blue_Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,4},
{'f',7,1,"Kool","Floating_Eye","Eye attacks!",8,14,30,4,7,18,0,1,3,5},
{'p',8,3,"Spotty","Vampire_Cat","Cat attacks!",6,14,40,4,7,18,0,3,5,5},
{'z',9,1,"Corpse", "Zombie","Zombie attacks!",4,14,40,6,9,20,0,1,6,7},
{'z',10,3,"Rotter", "Zombie","Zombie attacks!",4,14,40,6,9,20,0,1,6,7},
{'p',11,1,"Purr","Vampire_Cat","Cat attacks!",6,14,40,4,7,18,0,3,5,8},
{'b',12,3,"Bob","Squidrakin","Squidrakin attacks",5,13,40,4,7,18,0,1,4,8},
{'t',13,5,"Skinny", "Skeleton","Whooa!",4,13,30,8,7,18,0,2,5,8},
{'g',14,7,"George", "Ghoul","Fire breed attack!",5,14,40,6,9,20,0,1,6,8},
{'m',15,1,"Max","Minotaur","Minotaur attacks!",8,14,30,4,7,18,0,3,8,9},
{'b',16,3,"Badok","Malboro","Malboro attacks",8,13,30,4,7,18,0,1,4,9},
{'t',17,5,"Ted", "Tentacle_Worm","Squeezed you hard!",14,13,30,8,7,18,0,1,5,9},
{'h',18,7,"BadBoy", "Hell_Hound","Fire breed attack!",18,14,40,6,9,20,0,1,6,9},
{'g',19,1,"Peek","Blue_Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,11},
{'m',20,3,"Noom","Big Rat","Rat attacks!",4,14,30,4,7,18,0,1,3,11},
{'g',21,5,"Poke","Red_Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,11},
{'d',22,7,"Leel","Dryad","Dryad attacks",4,13,40,4,7,18,0,1,4,11},
{'g',23,1,"Fred","Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,12},
{'r',24,3,"Rogue","Human","Rogue attacks",5,13,40,4,7,18,0,1,4,12},
{'t',25,5,"Ted", "Tentacle_Worm","Squeezed you hard!",14,13,30,8,7,18,0,1,5,12},
{'h',26,7,"BadBoy", "Hell_Hound","Fire breed attack!",18,14,40,6,9,20,0,1,6,12},
{'m',27,1,"Max","Minotaur","Minotaur attacks!",8,14,30,4,7,18,0,3,8,13},
{'b',28,3,"Badok","Malboro","Malboro attacks",8,13,30,4,7,18,0,1,4,13},
{'c',29,5,"Baghun", "Cúchulainn","Cúchulainn attacks!",14,13,30,8,7,18,0,2,10,13},
{'z',30,7,"Ziggy", "Zombie_Vampire","Vampire attacks!",4,14,40,6,9,20,0,1,6,13},
{'m',31,1,"Mini","Big Rat","Rat attacks!",4,14,30,4,7,18,0,1,4,16},
{'m',32,3,"Moe","Big Rat","Rat attacks!",4,14,30,4,7,18,0,1,3,16},
{'f',33,1,"Pixie","Floating_Eye","Eye attacks!",8,14,30,4,7,18,0,1,3,17},
{'n',34,3,"Nina","Dryad","Dryad attacks",4,13,40,4,7,18,0,1,4,17},
{'d',35,5,"Danny", "Red_Dragon","eat you alive!",10,13,30,8,7,18,0,1,5,17},
{'z',36,7,"ZooZoo", "Zalera","Zalera attacks!",6,14,40,6,9,20,0,1,6,17},
{'g',37,1,"Red","Red_Goblin","Goblin attacks!",4,14,30,4,7,18,0,1,3,21},
{'b',38,3,"Boby","Bomb","Bomb attacks!",5,13,40,4,7,18,0,2,4,21},
{'t',39,5,"Tipy", "Treant","Treant attacks!",14,13,30,8,7,18,0,1,5,21},
{'h',40,7,"Bixy", "Behemoth","Fire breed attack!",18,14,40,6,9,20,0,1,6,21},
};
struct enemy monsters[4];
int amount_of_monsters = sizeof(monsters) / sizeof(monsters[0]);
struct spell {
char id[2];
char name[12];
char desc[40];
int range;
int dmg;
int recov;
int inc_mov;
int dec_mov;
int always;
};
struct spell spells[3] = {
{"lb","Light_Bolt","Light bolt the strikes target",50,5,0,0,0},
{"fb","Fire_Ball ","Ball of fire hits the target",60,6,0,0,0},
{"re","Recovery ","Targets HP points has been recovered",10,0,4,0,0}
};
int amount_of_spells = sizeof(spells) / sizeof(spells[0]);
struct weapon {
char id[2];
char name[12];
int ranged; /*0 if sword or dagger, 1 if i.e. bow*/
int range;
int inc_dmg;
int inc_ac;
int inc_mov;
int dec_mov;
};
struct weapon weapons[3] = {
{"bs","Big_Sword",0,0,2,0,0,0},
{"mr","Magic_Rod",0,0,1,0,0,0},
{"bw","Bow",1,60,2,0,0,0}
};
int amount_of_weapon = sizeof(weapons) / sizeof(weapons[0]);