Game For ECE 2035

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Committer:
nasiromar
Date:
Fri Dec 03 19:12:50 2021 +0000
Revision:
18:760dd68e939e
Parent:
16:06a88c0110ff
New Update;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nasiromar 6:c9695079521d 1 #include "actions.h"
nasiromar 6:c9695079521d 2 #include "speech.h"
nasiromar 6:c9695079521d 3 #include "hardware.h"
nasiromar 6:c9695079521d 4 #include "globals.h"
nasiromar 7:862062ffca62 5 #include "map.h"
nasiromar 6:c9695079521d 6
nasiromar 6:c9695079521d 7
nasiromar 9:cbb9cfb1f6c5 8 MapItem*spot = (MapItem*) malloc(sizeof(MapItem));
nasiromar 15:05592aaa468c 9 int currentMap = get_map(0);
nasiromar 10:e18685911e84 10
nasiromar 6:c9695079521d 11
nasiromar 11:6cd02a8539d1 12 int door_open()
nasiromar 9:cbb9cfb1f6c5 13 {
nasiromar 11:6cd02a8539d1 14 return 1;
nasiromar 7:862062ffca62 15 }
nasiromar 7:862062ffca62 16
nasiromar 11:6cd02a8539d1 17 void door_locked()
nasiromar 11:6cd02a8539d1 18 {
nasiromar 11:6cd02a8539d1 19 char line1[] = "The Door Is";
nasiromar 11:6cd02a8539d1 20 char line2[] = "Locked...";
nasiromar 11:6cd02a8539d1 21 horizontal_speech1(line1,line2);
nasiromar 7:862062ffca62 22
nasiromar 11:6cd02a8539d1 23 char line3[] = "Find The Key";
nasiromar 11:6cd02a8539d1 24 char line4[] = "**Slay Mob**";
nasiromar 11:6cd02a8539d1 25 horizontal_speech1(line3,line4);
nasiromar 11:6cd02a8539d1 26 }
nasiromar 9:cbb9cfb1f6c5 27
nasiromar 9:cbb9cfb1f6c5 28 void fruit()
nasiromar 9:cbb9cfb1f6c5 29 {
nasiromar 9:cbb9cfb1f6c5 30 char line1[] = "Picked Fruit";
nasiromar 9:cbb9cfb1f6c5 31 char line2[] = "From The Tree";
nasiromar 7:862062ffca62 32 horizontal_speech1(line1,line2);
nasiromar 9:cbb9cfb1f6c5 33
nasiromar 9:cbb9cfb1f6c5 34 char line3[] = "Fruit Eaten:";
nasiromar 9:cbb9cfb1f6c5 35 char line4[] = "5 HP gained";
nasiromar 7:862062ffca62 36 horizontal_speech1(line3,line4);
nasiromar 9:cbb9cfb1f6c5 37 }
nasiromar 9:cbb9cfb1f6c5 38
nasiromar 9:cbb9cfb1f6c5 39 void god_modeOn()
nasiromar 9:cbb9cfb1f6c5 40 {
nasiromar 9:cbb9cfb1f6c5 41 char line1[] = "God Mode:";
nasiromar 9:cbb9cfb1f6c5 42 char line2[] = "Activated";
nasiromar 9:cbb9cfb1f6c5 43 horizontal_speech1(line1,line2);
nasiromar 9:cbb9cfb1f6c5 44 }
nasiromar 9:cbb9cfb1f6c5 45
nasiromar 9:cbb9cfb1f6c5 46 void god_modeOff()
nasiromar 9:cbb9cfb1f6c5 47 {
nasiromar 9:cbb9cfb1f6c5 48 char line1[] = "God Mode:";
nasiromar 9:cbb9cfb1f6c5 49 char line2[] = "Deactivated";
nasiromar 9:cbb9cfb1f6c5 50 horizontal_speech1(line1,line2);
nasiromar 8:fcc333a8f9e1 51 }
nasiromar 7:862062ffca62 52
nasiromar 15:05592aaa468c 53
nasiromar 15:05592aaa468c 54 int walkXpos;
nasiromar 15:05592aaa468c 55
nasiromar 15:05592aaa468c 56 int npc_x = 10;
nasiromar 15:05592aaa468c 57 int npc_y = 5;
nasiromar 11:6cd02a8539d1 58
nasiromar 10:e18685911e84 59
nasiromar 15:05592aaa468c 60 void walk_npc()
nasiromar 10:e18685911e84 61 {
nasiromar 11:6cd02a8539d1 62
nasiromar 18:760dd68e939e 63 if(currentMap == 0 && npc_x != 6) {
nasiromar 15:05592aaa468c 64 map_erase(npc_x,npc_y);
nasiromar 11:6cd02a8539d1 65
nasiromar 11:6cd02a8539d1 66
nasiromar 18:760dd68e939e 67 if ( npc_y == 5) {
nasiromar 15:05592aaa468c 68 walkXpos = 1;
nasiromar 18:760dd68e939e 69 }
nasiromar 18:760dd68e939e 70 if ( walkXpos == 1) {
nasiromar 15:05592aaa468c 71 npc_x--;
nasiromar 15:05592aaa468c 72 add_npc(npc_x,npc_y);
nasiromar 18:760dd68e939e 73 }
nasiromar 18:760dd68e939e 74
nasiromar 18:760dd68e939e 75
nasiromar 18:760dd68e939e 76 }
nasiromar 11:6cd02a8539d1 77
nasiromar 15:05592aaa468c 78 }
nasiromar 11:6cd02a8539d1 79
nasiromar 11:6cd02a8539d1 80
nasiromar 11:6cd02a8539d1 81 void no_fruit()
nasiromar 11:6cd02a8539d1 82 {
nasiromar 11:6cd02a8539d1 83 char line1[] = "Player Health:";
nasiromar 11:6cd02a8539d1 84 char line2[] = "Full";
nasiromar 11:6cd02a8539d1 85 horizontal_speech1(line1,line2);
nasiromar 11:6cd02a8539d1 86
nasiromar 11:6cd02a8539d1 87 char line3[] = "Fruit Dropped:";
nasiromar 11:6cd02a8539d1 88 char line4[] = "0 HP gained";
nasiromar 11:6cd02a8539d1 89 horizontal_speech1(line3,line4);
nasiromar 11:6cd02a8539d1 90 }
nasiromar 11:6cd02a8539d1 91
nasiromar 16:06a88c0110ff 92 void heal_up()
nasiromar 16:06a88c0110ff 93 {
nasiromar 16:06a88c0110ff 94 char line1[] = "Player Health:";
nasiromar 16:06a88c0110ff 95 char line2[] = "Low";
nasiromar 16:06a88c0110ff 96 horizontal_speech1(line1,line2);
nasiromar 16:06a88c0110ff 97
nasiromar 16:06a88c0110ff 98 char line3[] = "Hint:";
nasiromar 16:06a88c0110ff 99 char line4[] = "Store or Tree";
nasiromar 16:06a88c0110ff 100 horizontal_speech1(line3,line4);
nasiromar 16:06a88c0110ff 101 }
nasiromar 16:06a88c0110ff 102
nasiromar 16:06a88c0110ff 103 void pick_key()
nasiromar 16:06a88c0110ff 104 {
nasiromar 16:06a88c0110ff 105 char line1[] = "Congrats!!";
nasiromar 16:06a88c0110ff 106 char line2[] = "You've slain the";
nasiromar 16:06a88c0110ff 107 horizontal_speech1(line1,line2);
nasiromar 16:06a88c0110ff 108
nasiromar 16:06a88c0110ff 109 char line3[] = "Dragon and";
nasiromar 16:06a88c0110ff 110 char line4[] = "completed your";
nasiromar 16:06a88c0110ff 111 horizontal_speech1(line3,line4);
nasiromar 18:760dd68e939e 112
nasiromar 16:06a88c0110ff 113 char line5[] = "Quest..";
nasiromar 16:06a88c0110ff 114 char line6[] = "Job Well Done";
nasiromar 16:06a88c0110ff 115 horizontal_speech1(line5,line6);
nasiromar 18:760dd68e939e 116
nasiromar 16:06a88c0110ff 117 char line7[] = "Collect Your";
nasiromar 16:06a88c0110ff 118 char line8[] = "Winnings";
nasiromar 16:06a88c0110ff 119 horizontal_speech1(line7,line8);
nasiromar 18:760dd68e939e 120
nasiromar 16:06a88c0110ff 121 char line9[] = "Thanks For";
nasiromar 16:06a88c0110ff 122 char line10[] = "Playing My";
nasiromar 16:06a88c0110ff 123 horizontal_speech1(line9,line10);
nasiromar 18:760dd68e939e 124
nasiromar 16:06a88c0110ff 125 char line11[] = "Game ;)";
nasiromar 16:06a88c0110ff 126 char line12[] = "-Holiday";
nasiromar 16:06a88c0110ff 127 horizontal_speech1(line11,line12);
nasiromar 16:06a88c0110ff 128 }
nasiromar 16:06a88c0110ff 129
nasiromar 16:06a88c0110ff 130 void mag_up()
nasiromar 16:06a88c0110ff 131 {
nasiromar 16:06a88c0110ff 132 char line1[] = "Player Magic:";
nasiromar 16:06a88c0110ff 133 char line2[] = "Low";
nasiromar 16:06a88c0110ff 134 horizontal_speech1(line1,line2);
nasiromar 16:06a88c0110ff 135
nasiromar 16:06a88c0110ff 136 char line3[] = "Hint:";
nasiromar 16:06a88c0110ff 137 char line4[] = "Store or Chest";
nasiromar 16:06a88c0110ff 138 horizontal_speech1(line3,line4);
nasiromar 16:06a88c0110ff 139 }
nasiromar 16:06a88c0110ff 140
nasiromar 16:06a88c0110ff 141
nasiromar 18:760dd68e939e 142 void merch_speech1()
nasiromar 18:760dd68e939e 143 {
nasiromar 14:7225da81314a 144 char line1[] = "Welcome To";
nasiromar 14:7225da81314a 145 char line2[] = "The Shop";
nasiromar 14:7225da81314a 146 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 147
nasiromar 14:7225da81314a 148 char line3[] = "Take a look";
nasiromar 14:7225da81314a 149 char line4[] = "My Friend";
nasiromar 14:7225da81314a 150 horizontal_speech1(line3,line4);
nasiromar 18:760dd68e939e 151 }
nasiromar 18:760dd68e939e 152
nasiromar 18:760dd68e939e 153 void merch_speech2()
nasiromar 18:760dd68e939e 154 {
nasiromar 14:7225da81314a 155 char line1[] = "Thank You";
nasiromar 14:7225da81314a 156 char line2[] = "For Shopping";
nasiromar 14:7225da81314a 157 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 158
nasiromar 14:7225da81314a 159 char line3[] = "Be sure to";
nasiromar 14:7225da81314a 160 char line4[] = "Return :)";
nasiromar 14:7225da81314a 161 horizontal_speech1(line3,line4);
nasiromar 18:760dd68e939e 162 }
nasiromar 18:760dd68e939e 163
nasiromar 18:760dd68e939e 164 void cantbuy()
nasiromar 14:7225da81314a 165 {
nasiromar 14:7225da81314a 166 char line1[] = "Not Enough";
nasiromar 14:7225da81314a 167 char line2[] = "Funds";
nasiromar 14:7225da81314a 168 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 169 }
nasiromar 14:7225da81314a 170
nasiromar 15:05592aaa468c 171 void drg()
nasiromar 15:05592aaa468c 172 {
nasiromar 15:05592aaa468c 173 char line1[] = "Dragon Damaged";
nasiromar 15:05592aaa468c 174 char line2[] = "DHP: -25";
nasiromar 15:05592aaa468c 175 horizontal_speech2(line1,line2);
nasiromar 15:05592aaa468c 176 }
nasiromar 15:05592aaa468c 177
nasiromar 14:7225da81314a 178 void frt()
nasiromar 14:7225da81314a 179 {
nasiromar 14:7225da81314a 180 char line1[] = "HP:";
nasiromar 14:7225da81314a 181 char line2[] = "+6";
nasiromar 14:7225da81314a 182 horizontal_speech2(line1,line2);
nasiromar 14:7225da81314a 183 }
nasiromar 14:7225da81314a 184
nasiromar 14:7225da81314a 185 void elx()
nasiromar 14:7225da81314a 186 {
nasiromar 14:7225da81314a 187 char line1[] = "HP:";
nasiromar 14:7225da81314a 188 char line2[] = "+10";
nasiromar 14:7225da81314a 189 horizontal_speech2(line1,line2);
nasiromar 14:7225da81314a 190 }
nasiromar 14:7225da81314a 191
nasiromar 14:7225da81314a 192 void poti()
nasiromar 14:7225da81314a 193 {
nasiromar 14:7225da81314a 194 char line1[] = "MP:";
nasiromar 14:7225da81314a 195 char line2[] = "+8";
nasiromar 14:7225da81314a 196 horizontal_speech2(line1,line2);
nasiromar 14:7225da81314a 197 }
nasiromar 14:7225da81314a 198
nasiromar 16:06a88c0110ff 199 void npc2_speech1()
nasiromar 14:7225da81314a 200 {
nasiromar 14:7225da81314a 201 char line1[] = "*Twink Twink*";
nasiromar 14:7225da81314a 202 char line2[] = "*Twink Twink*";
nasiromar 14:7225da81314a 203 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 204
nasiromar 16:06a88c0110ff 205 char line3[] = "Please Save Us";
nasiromar 14:7225da81314a 206 char line4[] = "Mighty Hero";
nasiromar 14:7225da81314a 207 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 208 }
nasiromar 14:7225da81314a 209
nasiromar 16:06a88c0110ff 210 void npc2_speech2()
nasiromar 16:06a88c0110ff 211 {
nasiromar 16:06a88c0110ff 212 char line1[] = "Thank You";
nasiromar 16:06a88c0110ff 213 char line2[] = "For Saving Us";
nasiromar 16:06a88c0110ff 214 horizontal_speech1(line1,line2);
nasiromar 16:06a88c0110ff 215
nasiromar 16:06a88c0110ff 216 char line3[] = "We Are Eternally";
nasiromar 16:06a88c0110ff 217 char line4[] = "Grateful";
nasiromar 16:06a88c0110ff 218 horizontal_speech1(line3,line4);
nasiromar 16:06a88c0110ff 219 }
nasiromar 16:06a88c0110ff 220
nasiromar 18:760dd68e939e 221 void fire_dmg()
nasiromar 18:760dd68e939e 222 {
nasiromar 14:7225da81314a 223 char line1[] = "*Burn Burn*";
nasiromar 14:7225da81314a 224 char line2[] = "*Crackle*";
nasiromar 14:7225da81314a 225 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 226
nasiromar 14:7225da81314a 227 char line3[] = "Fire Damage:";
nasiromar 14:7225da81314a 228 char line4[] = "HP: -2";
nasiromar 14:7225da81314a 229 horizontal_speech1(line3,line4);
nasiromar 18:760dd68e939e 230 }
nasiromar 18:760dd68e939e 231
nasiromar 18:760dd68e939e 232 void eye_dmg()
nasiromar 18:760dd68e939e 233 {
nasiromar 14:7225da81314a 234 char line1[] = "*shake shake*";
nasiromar 14:7225da81314a 235 char line2[] = "Recoiled";
nasiromar 14:7225da81314a 236 horizontal_speech1(line1,line2);
nasiromar 18:760dd68e939e 237
nasiromar 14:7225da81314a 238 char line3[] = "Eye Screeched!";
nasiromar 14:7225da81314a 239 char line4[] = "The sound hurts";
nasiromar 14:7225da81314a 240 horizontal_speech1(line3,line4);
nasiromar 18:760dd68e939e 241
nasiromar 14:7225da81314a 242 char line5[] = "HP Damage:";
nasiromar 14:7225da81314a 243 char line6[] = "HP: -15";
nasiromar 14:7225da81314a 244 horizontal_speech1(line5,line6);
nasiromar 18:760dd68e939e 245 }
nasiromar 18:760dd68e939e 246
nasiromar 18:760dd68e939e 247 void gob_dmg()
nasiromar 18:760dd68e939e 248 {
nasiromar 14:7225da81314a 249 char line1[] = "*shake shake*";
nasiromar 14:7225da81314a 250 char line2[] = "Recoiled";
nasiromar 14:7225da81314a 251 horizontal_speech1(line1,line2);
nasiromar 18:760dd68e939e 252
nasiromar 14:7225da81314a 253 char line3[] = "Goblin Attacked";
nasiromar 14:7225da81314a 254 char line4[] = "Took Damage";
nasiromar 14:7225da81314a 255 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 256
nasiromar 14:7225da81314a 257 char line5[] = "HP Damage:";
nasiromar 14:7225da81314a 258 char line6[] = "HP: -12";
nasiromar 14:7225da81314a 259 horizontal_speech1(line5,line6);
nasiromar 18:760dd68e939e 260 }
nasiromar 18:760dd68e939e 261
nasiromar 14:7225da81314a 262
nasiromar 18:760dd68e939e 263
nasiromar 18:760dd68e939e 264 void potion()
nasiromar 18:760dd68e939e 265 {
nasiromar 14:7225da81314a 266 char line1[] = "Potion:";
nasiromar 14:7225da81314a 267 char line2[] = "Selected";
nasiromar 14:7225da81314a 268 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 269
nasiromar 14:7225da81314a 270 char line3[] = "MP increase";
nasiromar 14:7225da81314a 271 char line4[] = "MP: +5";
nasiromar 14:7225da81314a 272 horizontal_speech1(line3,line4);
nasiromar 18:760dd68e939e 273 }
nasiromar 14:7225da81314a 274
nasiromar 14:7225da81314a 275
nasiromar 11:6cd02a8539d1 276 void npc_speech1()
nasiromar 11:6cd02a8539d1 277 {
nasiromar 11:6cd02a8539d1 278
nasiromar 11:6cd02a8539d1 279 char line1[] = "Salutations:";
nasiromar 11:6cd02a8539d1 280 char line2[] = "Traveler!";
nasiromar 11:6cd02a8539d1 281 horizontal_speech1(line1,line2);
nasiromar 11:6cd02a8539d1 282
nasiromar 11:6cd02a8539d1 283 char line3[] = "Welcome to";
nasiromar 11:6cd02a8539d1 284 char line4[] = "NasLand";
nasiromar 11:6cd02a8539d1 285 horizontal_speech1(line3,line4);
nasiromar 11:6cd02a8539d1 286
nasiromar 11:6cd02a8539d1 287 char line5[] = "I offer a quest";
nasiromar 11:6cd02a8539d1 288 char line6[] = "If thee accept";
nasiromar 11:6cd02a8539d1 289 horizontal_speech1(line5,line6);
nasiromar 11:6cd02a8539d1 290
nasiromar 11:6cd02a8539d1 291 char line7[] = "Excellent!";
nasiromar 11:6cd02a8539d1 292 char line8[] = "I need a dragon";
nasiromar 11:6cd02a8539d1 293 horizontal_speech1(line7,line8);
nasiromar 11:6cd02a8539d1 294
nasiromar 11:6cd02a8539d1 295 char line9[] = "Well not need";
nasiromar 11:6cd02a8539d1 296 char line10[] = "but want DEAD!";
nasiromar 11:6cd02a8539d1 297 horizontal_speech1(line9,line10);
nasiromar 11:6cd02a8539d1 298
nasiromar 11:6cd02a8539d1 299 char line11[] = "so go to the ";
nasiromar 11:6cd02a8539d1 300 char line12[] = "portal next..";
nasiromar 11:6cd02a8539d1 301 horizontal_speech1(line11,line12);
nasiromar 11:6cd02a8539d1 302
nasiromar 11:6cd02a8539d1 303 char line13[] = "Hint: ";
nasiromar 11:6cd02a8539d1 304 char line14[] = "X[20],Y[35]";
nasiromar 11:6cd02a8539d1 305 horizontal_speech1(line13,line14);
nasiromar 10:e18685911e84 306 }
nasiromar 9:cbb9cfb1f6c5 307
nasiromar 11:6cd02a8539d1 308 void npc_speech2()
nasiromar 11:6cd02a8539d1 309 {
nasiromar 9:cbb9cfb1f6c5 310
nasiromar 11:6cd02a8539d1 311 char line1[] = "Welcome Back";
nasiromar 11:6cd02a8539d1 312 char line2[] = "Traveler!";
nasiromar 11:6cd02a8539d1 313 horizontal_speech1(line1,line2);
nasiromar 9:cbb9cfb1f6c5 314
nasiromar 11:6cd02a8539d1 315 char line3[] = "The Dragon";
nasiromar 11:6cd02a8539d1 316 char line4[] = "has been slain";
nasiromar 11:6cd02a8539d1 317 horizontal_speech1(line3,line4);
nasiromar 9:cbb9cfb1f6c5 318
nasiromar 11:6cd02a8539d1 319 char line5[] = "You have saved";
nasiromar 11:6cd02a8539d1 320 char line6[] = "NasLand";
nasiromar 11:6cd02a8539d1 321 horizontal_speech1(line5,line6);
nasiromar 9:cbb9cfb1f6c5 322
nasiromar 11:6cd02a8539d1 323 char line7[] = "Go to Castle";
nasiromar 11:6cd02a8539d1 324 char line8[] = "To collect";
nasiromar 11:6cd02a8539d1 325 horizontal_speech1(line7,line8);
nasiromar 9:cbb9cfb1f6c5 326
nasiromar 11:6cd02a8539d1 327 char line9[] = "TREASURE";
nasiromar 11:6cd02a8539d1 328 char line10[] = "TREASURE";
nasiromar 11:6cd02a8539d1 329 horizontal_speech1(line9,line10);
nasiromar 9:cbb9cfb1f6c5 330
nasiromar 11:6cd02a8539d1 331 char line11[] = "Farwell Great ";
nasiromar 11:6cd02a8539d1 332 char line12[] = "Mage...";
nasiromar 11:6cd02a8539d1 333 horizontal_speech1(line11,line12);
nasiromar 7:862062ffca62 334
nasiromar 11:6cd02a8539d1 335 char line13[] = "Hint: ";
nasiromar 11:6cd02a8539d1 336 char line14[] = "X[26],Y[12]";
nasiromar 11:6cd02a8539d1 337 horizontal_speech1(line13,line14);
nasiromar 11:6cd02a8539d1 338 }
nasiromar 9:cbb9cfb1f6c5 339
nasiromar 9:cbb9cfb1f6c5 340
nasiromar 11:6cd02a8539d1 341 void slay_dragon()
nasiromar 11:6cd02a8539d1 342 {
nasiromar 11:6cd02a8539d1 343 char line1[] = "Me!?!";
nasiromar 11:6cd02a8539d1 344 char line2[] = "Dying? at the";
nasiromar 11:6cd02a8539d1 345 horizontal_speech1(line1,line2);
nasiromar 9:cbb9cfb1f6c5 346
nasiromar 11:6cd02a8539d1 347 char line3[] = "hands of a";
nasiromar 11:6cd02a8539d1 348 char line4[] = "mere MORTAL";
nasiromar 11:6cd02a8539d1 349 horizontal_speech1(line3,line4);
nasiromar 9:cbb9cfb1f6c5 350
nasiromar 11:6cd02a8539d1 351 char line5[] = "Ahhhhhhhh!";
nasiromar 11:6cd02a8539d1 352 char line6[] = "DIES:(";
nasiromar 11:6cd02a8539d1 353 horizontal_speech1(line5,line6);
nasiromar 9:cbb9cfb1f6c5 354
nasiromar 11:6cd02a8539d1 355 char line7[] = "CONGRATULATIONS!";
nasiromar 11:6cd02a8539d1 356 char line8[] = "Dragon Slain";
nasiromar 11:6cd02a8539d1 357 horizontal_speech1(line7,line8);
nasiromar 9:cbb9cfb1f6c5 358
nasiromar 11:6cd02a8539d1 359 char line9[] = "Heres the key!";
nasiromar 11:6cd02a8539d1 360 char line10[] = "Well Done!";
nasiromar 11:6cd02a8539d1 361 horizontal_speech1(line9,line10);
nasiromar 9:cbb9cfb1f6c5 362
nasiromar 11:6cd02a8539d1 363 }
nasiromar 9:cbb9cfb1f6c5 364
nasiromar 14:7225da81314a 365 void money_chest()
nasiromar 14:7225da81314a 366 {
nasiromar 14:7225da81314a 367 char line1[] = "Chest Open:";
nasiromar 14:7225da81314a 368 char line2[] = "Oh La La $$";
nasiromar 14:7225da81314a 369 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 370
nasiromar 14:7225da81314a 371 char line3[] = "Money Gained:";
nasiromar 14:7225da81314a 372 char line4[] = "+$2";
nasiromar 14:7225da81314a 373 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 374 }
nasiromar 14:7225da81314a 375
nasiromar 9:cbb9cfb1f6c5 376
nasiromar 11:6cd02a8539d1 377 void init_dung()
nasiromar 11:6cd02a8539d1 378 {
nasiromar 11:6cd02a8539d1 379 Map* dung = set_active_map(1);
nasiromar 18:760dd68e939e 380
nasiromar 11:6cd02a8539d1 381 add_castle(0, 0, HORIZONTAL, map_width());
nasiromar 11:6cd02a8539d1 382 add_castle(0, map_height()-1, HORIZONTAL, map_width());
nasiromar 11:6cd02a8539d1 383 add_castle(0, 0, VERTICAL, map_height());
nasiromar 11:6cd02a8539d1 384 add_castle(map_width()-1, 0, VERTICAL, map_height());
nasiromar 9:cbb9cfb1f6c5 385
nasiromar 14:7225da81314a 386 add_chest(10,16);
nasiromar 14:7225da81314a 387 add_chest(17,17);
nasiromar 14:7225da81314a 388 add_chest(14,7);
nasiromar 14:7225da81314a 389 add_chest(9,3);
nasiromar 14:7225da81314a 390 add_chest(5,6);
nasiromar 14:7225da81314a 391 add_chest(12,11);
nasiromar 14:7225da81314a 392 add_chest(2,18);
nasiromar 9:cbb9cfb1f6c5 393
nasiromar 12:116a4cc85b16 394 add_portal2(10,2);
nasiromar 11:6cd02a8539d1 395
nasiromar 13:798a4dd14c7e 396 add_dragon(15,9);
nasiromar 9:cbb9cfb1f6c5 397
nasiromar 13:798a4dd14c7e 398 add_goblin(5,7,ENEMY2);
nasiromar 18:760dd68e939e 399
nasiromar 13:798a4dd14c7e 400 add_goblin(10,10,ENEMY1);
nasiromar 18:760dd68e939e 401
nasiromar 14:7225da81314a 402 add_eye(15,15);
nasiromar 9:cbb9cfb1f6c5 403
nasiromar 11:6cd02a8539d1 404 print_map();
nasiromar 9:cbb9cfb1f6c5 405
nasiromar 11:6cd02a8539d1 406 }