- /* Get new commission */
- game.quad[sectx][secty] = ship = IHF;
- prout("Starfleet puts you in command of another ship,");
- prout("the Faerie Queene, which is antiquated but,");
- prout("still useable.");
- if (icrystl!=0) prout("The dilithium crystals have been moved.");
- imine=0;
- iscraft=0; /* Gallileo disappears */
- /* Resupply ship */
- condit=IHDOCKED;
- for (l = 1; l <= NDEVICES; l++) game.damage[l] = 0.0;
- game.damage[DSHUTTL] = -1;
- energy = inenrg = 3000.0;
- shield = inshld = 1250.0;
- torps = intorps = 6;
- lsupres=inlsr=3.0;
- shldup=0;
- warpfac=5.0;
- wfacsq=25.0;
- return;
+ if (game.damage[DSHUTTL]<0) {
+ prout("Shuttle craft now serving Big Mac's.");
+ return;
+ }
+ if (game.damage[DSHUTTL]>0) {
+ prout("Shuttle craft damaged.");
+ return;
+ }
+ if (landed==1) {
+ prout("You must be aboard the Enterprise.");
+ return;
+ }
+ if (iscraft!=1) {
+ prout("Shuttle craft not currently available.");
+ return;
+ }
+ /* Print abandon ship messages */
+ skip(1);
+ prouts("***ABANDON SHIP! ABANDON SHIP!");
+ skip(1);
+ prouts("***ALL HANDS ABANDON SHIP!");
+ skip(2);
+ prout("Captain and crew escape in shuttle craft.");
+ prout("Remainder of ship's complement beam down");
+ prout("to nearest habitable planet.");
+ if (game.state.rembase==0) {
+ /* Ops! no place to go... */
+ finish(FABANDN);
+ return;
+ }
+ /* If at least one base left, give 'em the Faerie Queene */
+ skip(1);
+ icrystl = 0; /* crystals are lost */
+ nprobes = 0; /* No probes */
+ prout("You are captured by Klingons and released to");
+ prout("the Federation in a prisoner-of-war exchange.");
+ nb = Rand()*game.state.rembase+1;
+ /* Set up quadrant and position FQ adjacient to base */
+ if (quadx!=game.state.baseqx[nb] || quady!=game.state.baseqy[nb]) {
+ quadx = game.state.baseqx[nb];
+ quady = game.state.baseqy[nb];
+ sectx = secty = 5;
+ newqad(1);
+ }
+ for (;;) {
+ /* position next to base by trial and error */
+ game.quad[sectx][secty] = IHDOT;
+ for (l = 1; l <= QUADSIZE; l++) {
+ sectx = 3.0*Rand() - 1.0 + basex;
+ secty = 3.0*Rand() - 1.0 + basey;
+ if (sectx >= 1 && sectx <= QUADSIZE &&
+ secty >= 1 && secty <= QUADSIZE &&
+ game.quad[sectx][secty] == IHDOT) break;
+ }
+ if (l < QUADSIZE+1) break; /* found a spot */
+ sectx=QUADSIZE/2;
+ secty=QUADSIZE/2;
+ newqad(1);
+ }
+ }
+ /* Get new commission */
+ game.quad[sectx][secty] = ship = IHF;
+ prout("Starfleet puts you in command of another ship,");
+ prout("the Faerie Queene, which is antiquated but,");
+ prout("still useable.");
+ if (icrystl!=0) prout("The dilithium crystals have been moved.");
+ imine=0;
+ iscraft=0; /* Gallileo disappears */
+ /* Resupply ship */
+ condit=IHDOCKED;
+ for (l = 1; l <= NDEVICES; l++) game.damage[l] = 0.0;
+ game.damage[DSHUTTL] = -1;
+ energy = inenrg = 3000.0;
+ shield = inshld = 1250.0;
+ torps = intorps = 6;
+ lsupres=inlsr=3.0;
+ shldup=0;
+ warpfac=5.0;
+ wfacsq=25.0;
+ return;