2 * Elite - The New Kind.
4 * Reverse engineered from the BBC disk version of Elite.
5 * Additional material by C.J.Pinder.
7 * The original Elite code is (C) I.Bell & D.Braben 1984.
8 * This version re-engineered in C by C.J.Pinder 1999-2001.
10 * email: <christian@newkind.co.uk>
18 * Code to handle the special missions.
35 char *mission1_brief_a =
36 "Greetings Commander, I am Captain Curruthers of "
37 "Her Majesty's Space Navy and I beg a moment of your "
38 "valuable time. We would like you to do a little job "
39 "for us. The ship you see here is a new model, the "
40 "Constrictor, equiped with a top secret new shield "
41 "generator. Unfortunately it's been stolen.";
43 char *mission1_brief_b =
44 "It went missing from our ship yard on Xeer five months ago "
45 "and was last seen at Reesdice. Your mission should you decide "
46 "to accept it, is to seek and destroy this ship. You are "
47 "cautioned that only Military Lasers will get through the new "
48 "shields and that the Constrictor is fitted with an E.C.M. "
49 "System. Good Luck, Commander. ---MESSAGE ENDS.";
51 char *mission1_brief_c =
52 "It went missing from our ship yard on Xeer five months ago "
53 "and is believed to have jumped to this galaxy. "
54 "Your mission should you decide to accept it, is to seek and "
55 "destroy this ship. You are cautioned that only Military Lasers "
56 "will get through the new shields and that the Constrictor is "
57 "fitted with an E.C.M. System. Good Luck, Commander. ---MESSAGE ENDS.";
59 char *mission1_debrief =
60 "There will always be a place for you in Her Majesty's Space Navy. "
61 "And maybe sooner than you think... ---MESSAGE ENDS.";
63 char *mission1_pdesc[] =
65 "THE CONSTRICTOR WAS LAST SEEN AT REESDICE, COMMANDER.",
66 "A STRANGE LOOKING SHIP LEFT HERE A WHILE BACK. LOOKED BOUND FOR AREXE.",
67 "YEP, AN UNUSUAL NEW SHIP HAD A GALACTIC HYPERDRIVE FITTED HERE, USED IT TOO.",
68 "I HEAR A WEIRD LOOKING SHIP WAS SEEN AT ERRIUS.",
69 "THIS STRANGE SHIP DEHYPED HERE FROM NOWHERE, SUN SKIMMED AND JUMPED. I HEAR IT WENT TO INBIBE.",
70 "ROGUE SHIP WENT FOR ME AT AUSAR. MY LASERS DIDN'T EVEN SCRATCH ITS HULL.",
71 "OH DEAR ME YES. A FRIGHTFUL ROGUE WITH WHAT I BELIEVE YOU PEOPLE CALL A LEAD "
72 "POSTERIOR SHOT UP LOTS OF THOSE BEASTLY PIRATES AND WENT TO USLERI.",
73 "YOU CAN TACKLE THE VICIOUS SCOUNDREL IF YOU LIKE. HE'S AT ORARRA.",
74 "THERE'S A REAL DEADLY PIRATE OUT THERE.",
75 "BOY ARE YOU IN THE WRONG GALAXY!",
76 "COMING SOON: ELITE - DARKNESS FALLS.",
79 char *mission2_brief_a =
80 "Attention Commander, I am Captain Fortesque of Her Majesty's Space Navy. "
81 "We have need of your services again. If you would be so good as to go to "
82 "Ceerdi you will be briefed.If succesful, you will be rewarded."
85 char *mission2_brief_b =
86 "Good Day Commander. I am Agent Blake of Naval Intelligence. As you know, "
87 "the Navy have been keeping the Thargoids off your ass out in deep space "
88 "for many years now. Well the situation has changed. Our boys are ready "
89 "for a push right to the home system of those murderers.";
91 char *mission2_brief_c =
92 "I have obtained the defence plans for their Hive Worlds. The beetles "
93 "know we've got something but not what. If I transmit the plans to our "
94 "base on Birera they'll intercept the transmission. I need a ship to "
95 "make the run. You're elected. The plans are unipulse coded within "
96 "this transmission. You will be paid. Good luck Commander. ---MESSAGE ENDS.";
98 char *mission2_debrief =
99 "You have served us well and we shall remember. "
100 "We did not expect the Thargoids to find out about you."
101 "For the moment please accept this Navy Extra Energy Unit as payment. "
106 char *mission_planet_desc (struct galaxy_seed planet)
113 if ((planet.a != docked_planet.a) ||
114 (planet.b != docked_planet.b) ||
115 (planet.c != docked_planet.c) ||
116 (planet.d != docked_planet.d) ||
117 (planet.e != docked_planet.e) ||
118 (planet.f != docked_planet.f))
121 pnum = find_planet_number (planet);
123 if (cmdr.galaxy_number == 0)
128 return mission1_pdesc[0];
131 return mission1_pdesc[1];
134 return mission1_pdesc[2];
138 if (cmdr.galaxy_number == 1)
155 return mission1_pdesc[3];
158 return mission1_pdesc[4];
161 return mission1_pdesc[5];
164 return mission1_pdesc[6];
167 return mission1_pdesc[7];
170 return mission1_pdesc[8];
174 if ((cmdr.galaxy_number == 2) && (pnum == 101))
175 return mission1_pdesc[9];
181 void constrictor_mission_brief (void)
187 current_screen = SCR_FRONT_VIEW;
190 gfx_display_centre_text (10, "INCOMING MESSAGE", 140, GFX_COL_GOLD);
191 gfx_draw_line (0, 36, 511, 36);
193 gfx_display_pretty_text (16, 50, 300, 384, mission1_brief_a);
194 gfx_display_pretty_text (16, 200, 470, 384,
195 (cmdr.galaxy_number == 0) ? mission1_brief_b : mission1_brief_c);
197 gfx_display_centre_text (330, "Press space to continue.", 140, GFX_COL_GOLD);
200 set_init_matrix (rotmat);
201 add_new_ship (SHIP_CONSTRICTOR, 200, 90, 600, rotmat, -127, -127);
211 gfx_clear_area (310, 50, 510, 180);
213 universe[0].location.z = 600;
216 } while (!kbd_space_pressed);
220 void constrictor_mission_debrief (void)
226 cmdr.credits += 50000;
229 gfx_display_centre_text (10, "INCOMING MESSAGE", 140, GFX_COL_GOLD);
230 gfx_draw_line (0, 36, 511, 36);
232 gfx_display_centre_text (100, "Congratulations Commander!", 140, GFX_COL_GOLD);
234 gfx_display_pretty_text (116, 132, 400, 384, mission1_debrief);
236 gfx_display_centre_text (330, "Press space to continue.", 140, GFX_COL_GOLD);
242 keyasc = kbd_read_key();
243 } while (keyasc != ' ');
247 void thargoid_mission_first_brief (void)
254 gfx_display_centre_text (10, "INCOMING MESSAGE", 140, GFX_COL_GOLD);
255 gfx_draw_line (0, 36, 511, 36);
257 gfx_display_pretty_text (116, 132, 400, 384, mission2_brief_a);
259 gfx_display_centre_text (330, "Press space to continue.", 140, GFX_COL_GOLD);
265 keyasc = kbd_read_key();
266 } while (keyasc != ' ');
270 void thargoid_mission_second_brief (void)
277 gfx_display_centre_text (10, "INCOMING MESSAGE", 140, GFX_COL_GOLD);
278 gfx_draw_line (0, 36, 511, 36);
280 gfx_display_pretty_text (16, 50, 300, 384, mission2_brief_b);
281 gfx_display_pretty_text (16, 200, 470, 384, mission2_brief_c);
283 gfx_draw_sprite (IMG_BLAKE, 352, 46);
285 gfx_display_centre_text (330, "Press space to continue.", 140, GFX_COL_GOLD);
291 keyasc = kbd_read_key();
292 } while (keyasc != ' ');
296 void thargoid_mission_debrief (void)
302 cmdr.energy_unit = 2;
304 gfx_clear_display ();
305 gfx_display_centre_text (10, "INCOMING MESSAGE", 140, GFX_COL_GOLD);
306 gfx_draw_line (0, 36, 511, 36);
308 gfx_display_centre_text (100, "Well done Commander.", 140, GFX_COL_GOLD);
310 gfx_display_pretty_text (116, 132, 400, 384, mission2_debrief);
312 gfx_display_centre_text (330, "Press space to continue.", 140, GFX_COL_GOLD);
318 keyasc = kbd_read_key();
319 } while (keyasc != ' ');
324 void check_mission_brief (void)
326 if ((cmdr.mission == 0) && (cmdr.score >= 256) && (cmdr.galaxy_number < 2))
328 constrictor_mission_brief();
332 if (cmdr.mission == 2)
334 constrictor_mission_debrief();
338 if ((cmdr.mission == 3) && (cmdr.score >= 1280) && (cmdr.galaxy_number == 2))
340 thargoid_mission_first_brief();
344 if ((cmdr.mission == 4) && (docked_planet.d == 215) && (docked_planet.b == 84))
346 thargoid_mission_second_brief();
350 if ((cmdr.mission == 5) && (docked_planet.d == 63) && (docked_planet.b == 72))
352 thargoid_mission_debrief();