Game For ECE 2035

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Committer:
nasiromar
Date:
Fri Dec 03 10:52:08 2021 +0000
Revision:
16:06a88c0110ff
Parent:
15:05592aaa468c
Child:
18:760dd68e939e
Finished Game

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 15:05592aaa468c 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 15:05592aaa468c 67 if ( npc_y == 5){
nasiromar 15:05592aaa468c 68 walkXpos = 1;
nasiromar 15:05592aaa468c 69 }
nasiromar 15:05592aaa468c 70 if ( walkXpos == 1){
nasiromar 15:05592aaa468c 71 npc_x--;
nasiromar 15:05592aaa468c 72 add_npc(npc_x,npc_y);
nasiromar 15:05592aaa468c 73 }
nasiromar 15:05592aaa468c 74
nasiromar 15:05592aaa468c 75
nasiromar 10:e18685911e84 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 16:06a88c0110ff 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 16:06a88c0110ff 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 16:06a88c0110ff 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 16:06a88c0110ff 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 14:7225da81314a 142 void merch_speech1(){
nasiromar 14:7225da81314a 143 char line1[] = "Welcome To";
nasiromar 14:7225da81314a 144 char line2[] = "The Shop";
nasiromar 14:7225da81314a 145 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 146
nasiromar 14:7225da81314a 147 char line3[] = "Take a look";
nasiromar 14:7225da81314a 148 char line4[] = "My Friend";
nasiromar 14:7225da81314a 149 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 150 }
nasiromar 14:7225da81314a 151
nasiromar 14:7225da81314a 152 void merch_speech2(){
nasiromar 14:7225da81314a 153 char line1[] = "Thank You";
nasiromar 14:7225da81314a 154 char line2[] = "For Shopping";
nasiromar 14:7225da81314a 155 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 156
nasiromar 14:7225da81314a 157 char line3[] = "Be sure to";
nasiromar 14:7225da81314a 158 char line4[] = "Return :)";
nasiromar 14:7225da81314a 159 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 160 }
nasiromar 14:7225da81314a 161
nasiromar 14:7225da81314a 162 void cantbuy()
nasiromar 14:7225da81314a 163 {
nasiromar 14:7225da81314a 164 char line1[] = "Not Enough";
nasiromar 14:7225da81314a 165 char line2[] = "Funds";
nasiromar 14:7225da81314a 166 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 167 }
nasiromar 14:7225da81314a 168
nasiromar 15:05592aaa468c 169 void drg()
nasiromar 15:05592aaa468c 170 {
nasiromar 15:05592aaa468c 171 char line1[] = "Dragon Damaged";
nasiromar 15:05592aaa468c 172 char line2[] = "DHP: -25";
nasiromar 15:05592aaa468c 173 horizontal_speech2(line1,line2);
nasiromar 15:05592aaa468c 174 }
nasiromar 15:05592aaa468c 175
nasiromar 14:7225da81314a 176 void frt()
nasiromar 14:7225da81314a 177 {
nasiromar 14:7225da81314a 178 char line1[] = "HP:";
nasiromar 14:7225da81314a 179 char line2[] = "+6";
nasiromar 14:7225da81314a 180 horizontal_speech2(line1,line2);
nasiromar 14:7225da81314a 181 }
nasiromar 14:7225da81314a 182
nasiromar 14:7225da81314a 183 void elx()
nasiromar 14:7225da81314a 184 {
nasiromar 14:7225da81314a 185 char line1[] = "HP:";
nasiromar 14:7225da81314a 186 char line2[] = "+10";
nasiromar 14:7225da81314a 187 horizontal_speech2(line1,line2);
nasiromar 14:7225da81314a 188 }
nasiromar 14:7225da81314a 189
nasiromar 14:7225da81314a 190 void poti()
nasiromar 14:7225da81314a 191 {
nasiromar 14:7225da81314a 192 char line1[] = "MP:";
nasiromar 14:7225da81314a 193 char line2[] = "+8";
nasiromar 14:7225da81314a 194 horizontal_speech2(line1,line2);
nasiromar 14:7225da81314a 195 }
nasiromar 14:7225da81314a 196
nasiromar 16:06a88c0110ff 197 void npc2_speech1()
nasiromar 14:7225da81314a 198 {
nasiromar 14:7225da81314a 199 char line1[] = "*Twink Twink*";
nasiromar 14:7225da81314a 200 char line2[] = "*Twink Twink*";
nasiromar 14:7225da81314a 201 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 202
nasiromar 16:06a88c0110ff 203 char line3[] = "Please Save Us";
nasiromar 14:7225da81314a 204 char line4[] = "Mighty Hero";
nasiromar 14:7225da81314a 205 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 206 }
nasiromar 14:7225da81314a 207
nasiromar 16:06a88c0110ff 208 void npc2_speech2()
nasiromar 16:06a88c0110ff 209 {
nasiromar 16:06a88c0110ff 210 char line1[] = "Thank You";
nasiromar 16:06a88c0110ff 211 char line2[] = "For Saving Us";
nasiromar 16:06a88c0110ff 212 horizontal_speech1(line1,line2);
nasiromar 16:06a88c0110ff 213
nasiromar 16:06a88c0110ff 214 char line3[] = "We Are Eternally";
nasiromar 16:06a88c0110ff 215 char line4[] = "Grateful";
nasiromar 16:06a88c0110ff 216 horizontal_speech1(line3,line4);
nasiromar 16:06a88c0110ff 217 }
nasiromar 16:06a88c0110ff 218
nasiromar 14:7225da81314a 219 void fire_dmg(){
nasiromar 14:7225da81314a 220 char line1[] = "*Burn Burn*";
nasiromar 14:7225da81314a 221 char line2[] = "*Crackle*";
nasiromar 14:7225da81314a 222 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 223
nasiromar 14:7225da81314a 224 char line3[] = "Fire Damage:";
nasiromar 14:7225da81314a 225 char line4[] = "HP: -2";
nasiromar 14:7225da81314a 226 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 227 }
nasiromar 14:7225da81314a 228
nasiromar 14:7225da81314a 229 void eye_dmg(){
nasiromar 14:7225da81314a 230 char line1[] = "*shake shake*";
nasiromar 14:7225da81314a 231 char line2[] = "Recoiled";
nasiromar 14:7225da81314a 232 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 233
nasiromar 14:7225da81314a 234 char line3[] = "Eye Screeched!";
nasiromar 14:7225da81314a 235 char line4[] = "The sound hurts";
nasiromar 14:7225da81314a 236 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 237
nasiromar 14:7225da81314a 238 char line5[] = "HP Damage:";
nasiromar 14:7225da81314a 239 char line6[] = "HP: -15";
nasiromar 14:7225da81314a 240 horizontal_speech1(line5,line6);
nasiromar 14:7225da81314a 241 }
nasiromar 14:7225da81314a 242
nasiromar 14:7225da81314a 243 void gob_dmg(){
nasiromar 14:7225da81314a 244 char line1[] = "*shake shake*";
nasiromar 14:7225da81314a 245 char line2[] = "Recoiled";
nasiromar 14:7225da81314a 246 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 247
nasiromar 14:7225da81314a 248 char line3[] = "Goblin Attacked";
nasiromar 14:7225da81314a 249 char line4[] = "Took Damage";
nasiromar 14:7225da81314a 250 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 251
nasiromar 14:7225da81314a 252 char line5[] = "HP Damage:";
nasiromar 14:7225da81314a 253 char line6[] = "HP: -12";
nasiromar 14:7225da81314a 254 horizontal_speech1(line5,line6);
nasiromar 14:7225da81314a 255 }
nasiromar 14:7225da81314a 256
nasiromar 14:7225da81314a 257
nasiromar 14:7225da81314a 258
nasiromar 14:7225da81314a 259 void potion(){
nasiromar 14:7225da81314a 260 char line1[] = "Potion:";
nasiromar 14:7225da81314a 261 char line2[] = "Selected";
nasiromar 14:7225da81314a 262 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 263
nasiromar 14:7225da81314a 264 char line3[] = "MP increase";
nasiromar 14:7225da81314a 265 char line4[] = "MP: +5";
nasiromar 14:7225da81314a 266 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 267 }
nasiromar 14:7225da81314a 268
nasiromar 14:7225da81314a 269
nasiromar 11:6cd02a8539d1 270 void npc_speech1()
nasiromar 11:6cd02a8539d1 271 {
nasiromar 11:6cd02a8539d1 272
nasiromar 11:6cd02a8539d1 273 char line1[] = "Salutations:";
nasiromar 11:6cd02a8539d1 274 char line2[] = "Traveler!";
nasiromar 11:6cd02a8539d1 275 horizontal_speech1(line1,line2);
nasiromar 11:6cd02a8539d1 276
nasiromar 11:6cd02a8539d1 277 char line3[] = "Welcome to";
nasiromar 11:6cd02a8539d1 278 char line4[] = "NasLand";
nasiromar 11:6cd02a8539d1 279 horizontal_speech1(line3,line4);
nasiromar 11:6cd02a8539d1 280
nasiromar 11:6cd02a8539d1 281 char line5[] = "I offer a quest";
nasiromar 11:6cd02a8539d1 282 char line6[] = "If thee accept";
nasiromar 11:6cd02a8539d1 283 horizontal_speech1(line5,line6);
nasiromar 11:6cd02a8539d1 284
nasiromar 11:6cd02a8539d1 285 char line7[] = "Excellent!";
nasiromar 11:6cd02a8539d1 286 char line8[] = "I need a dragon";
nasiromar 11:6cd02a8539d1 287 horizontal_speech1(line7,line8);
nasiromar 11:6cd02a8539d1 288
nasiromar 11:6cd02a8539d1 289 char line9[] = "Well not need";
nasiromar 11:6cd02a8539d1 290 char line10[] = "but want DEAD!";
nasiromar 11:6cd02a8539d1 291 horizontal_speech1(line9,line10);
nasiromar 11:6cd02a8539d1 292
nasiromar 11:6cd02a8539d1 293 char line11[] = "so go to the ";
nasiromar 11:6cd02a8539d1 294 char line12[] = "portal next..";
nasiromar 11:6cd02a8539d1 295 horizontal_speech1(line11,line12);
nasiromar 11:6cd02a8539d1 296
nasiromar 11:6cd02a8539d1 297 char line13[] = "Hint: ";
nasiromar 11:6cd02a8539d1 298 char line14[] = "X[20],Y[35]";
nasiromar 11:6cd02a8539d1 299 horizontal_speech1(line13,line14);
nasiromar 10:e18685911e84 300 }
nasiromar 9:cbb9cfb1f6c5 301
nasiromar 11:6cd02a8539d1 302 void npc_speech2()
nasiromar 11:6cd02a8539d1 303 {
nasiromar 9:cbb9cfb1f6c5 304
nasiromar 11:6cd02a8539d1 305 char line1[] = "Welcome Back";
nasiromar 11:6cd02a8539d1 306 char line2[] = "Traveler!";
nasiromar 11:6cd02a8539d1 307 horizontal_speech1(line1,line2);
nasiromar 9:cbb9cfb1f6c5 308
nasiromar 11:6cd02a8539d1 309 char line3[] = "The Dragon";
nasiromar 11:6cd02a8539d1 310 char line4[] = "has been slain";
nasiromar 11:6cd02a8539d1 311 horizontal_speech1(line3,line4);
nasiromar 9:cbb9cfb1f6c5 312
nasiromar 11:6cd02a8539d1 313 char line5[] = "You have saved";
nasiromar 11:6cd02a8539d1 314 char line6[] = "NasLand";
nasiromar 11:6cd02a8539d1 315 horizontal_speech1(line5,line6);
nasiromar 9:cbb9cfb1f6c5 316
nasiromar 11:6cd02a8539d1 317 char line7[] = "Go to Castle";
nasiromar 11:6cd02a8539d1 318 char line8[] = "To collect";
nasiromar 11:6cd02a8539d1 319 horizontal_speech1(line7,line8);
nasiromar 9:cbb9cfb1f6c5 320
nasiromar 11:6cd02a8539d1 321 char line9[] = "TREASURE";
nasiromar 11:6cd02a8539d1 322 char line10[] = "TREASURE";
nasiromar 11:6cd02a8539d1 323 horizontal_speech1(line9,line10);
nasiromar 9:cbb9cfb1f6c5 324
nasiromar 11:6cd02a8539d1 325 char line11[] = "Farwell Great ";
nasiromar 11:6cd02a8539d1 326 char line12[] = "Mage...";
nasiromar 11:6cd02a8539d1 327 horizontal_speech1(line11,line12);
nasiromar 7:862062ffca62 328
nasiromar 11:6cd02a8539d1 329 char line13[] = "Hint: ";
nasiromar 11:6cd02a8539d1 330 char line14[] = "X[26],Y[12]";
nasiromar 11:6cd02a8539d1 331 horizontal_speech1(line13,line14);
nasiromar 11:6cd02a8539d1 332 }
nasiromar 9:cbb9cfb1f6c5 333
nasiromar 9:cbb9cfb1f6c5 334
nasiromar 11:6cd02a8539d1 335 void slay_dragon()
nasiromar 11:6cd02a8539d1 336 {
nasiromar 11:6cd02a8539d1 337 char line1[] = "Me!?!";
nasiromar 11:6cd02a8539d1 338 char line2[] = "Dying? at the";
nasiromar 11:6cd02a8539d1 339 horizontal_speech1(line1,line2);
nasiromar 9:cbb9cfb1f6c5 340
nasiromar 11:6cd02a8539d1 341 char line3[] = "hands of a";
nasiromar 11:6cd02a8539d1 342 char line4[] = "mere MORTAL";
nasiromar 11:6cd02a8539d1 343 horizontal_speech1(line3,line4);
nasiromar 9:cbb9cfb1f6c5 344
nasiromar 11:6cd02a8539d1 345 char line5[] = "Ahhhhhhhh!";
nasiromar 11:6cd02a8539d1 346 char line6[] = "DIES:(";
nasiromar 11:6cd02a8539d1 347 horizontal_speech1(line5,line6);
nasiromar 9:cbb9cfb1f6c5 348
nasiromar 11:6cd02a8539d1 349 char line7[] = "CONGRATULATIONS!";
nasiromar 11:6cd02a8539d1 350 char line8[] = "Dragon Slain";
nasiromar 11:6cd02a8539d1 351 horizontal_speech1(line7,line8);
nasiromar 9:cbb9cfb1f6c5 352
nasiromar 11:6cd02a8539d1 353 char line9[] = "Heres the key!";
nasiromar 11:6cd02a8539d1 354 char line10[] = "Well Done!";
nasiromar 11:6cd02a8539d1 355 horizontal_speech1(line9,line10);
nasiromar 9:cbb9cfb1f6c5 356
nasiromar 11:6cd02a8539d1 357 }
nasiromar 9:cbb9cfb1f6c5 358
nasiromar 14:7225da81314a 359 void money_chest()
nasiromar 14:7225da81314a 360 {
nasiromar 14:7225da81314a 361 char line1[] = "Chest Open:";
nasiromar 14:7225da81314a 362 char line2[] = "Oh La La $$";
nasiromar 14:7225da81314a 363 horizontal_speech1(line1,line2);
nasiromar 14:7225da81314a 364
nasiromar 14:7225da81314a 365 char line3[] = "Money Gained:";
nasiromar 14:7225da81314a 366 char line4[] = "+$2";
nasiromar 14:7225da81314a 367 horizontal_speech1(line3,line4);
nasiromar 14:7225da81314a 368 }
nasiromar 14:7225da81314a 369
nasiromar 9:cbb9cfb1f6c5 370
nasiromar 11:6cd02a8539d1 371 void init_dung()
nasiromar 11:6cd02a8539d1 372 {
nasiromar 11:6cd02a8539d1 373 Map* dung = set_active_map(1);
nasiromar 14:7225da81314a 374
nasiromar 11:6cd02a8539d1 375 add_castle(0, 0, HORIZONTAL, map_width());
nasiromar 11:6cd02a8539d1 376 add_castle(0, map_height()-1, HORIZONTAL, map_width());
nasiromar 11:6cd02a8539d1 377 add_castle(0, 0, VERTICAL, map_height());
nasiromar 11:6cd02a8539d1 378 add_castle(map_width()-1, 0, VERTICAL, map_height());
nasiromar 9:cbb9cfb1f6c5 379
nasiromar 14:7225da81314a 380 add_chest(10,16);
nasiromar 14:7225da81314a 381 add_chest(17,17);
nasiromar 14:7225da81314a 382 add_chest(14,7);
nasiromar 14:7225da81314a 383 add_chest(9,3);
nasiromar 14:7225da81314a 384 add_chest(5,6);
nasiromar 14:7225da81314a 385 add_chest(12,11);
nasiromar 14:7225da81314a 386 add_chest(2,18);
nasiromar 9:cbb9cfb1f6c5 387
nasiromar 12:116a4cc85b16 388 add_portal2(10,2);
nasiromar 11:6cd02a8539d1 389
nasiromar 13:798a4dd14c7e 390 add_dragon(15,9);
nasiromar 9:cbb9cfb1f6c5 391
nasiromar 13:798a4dd14c7e 392 add_goblin(5,7,ENEMY2);
nasiromar 11:6cd02a8539d1 393
nasiromar 13:798a4dd14c7e 394 add_goblin(10,10,ENEMY1);
nasiromar 14:7225da81314a 395
nasiromar 14:7225da81314a 396 add_eye(15,15);
nasiromar 9:cbb9cfb1f6c5 397
nasiromar 11:6cd02a8539d1 398 print_map();
nasiromar 9:cbb9cfb1f6c5 399
nasiromar 11:6cd02a8539d1 400 }