Commit | Line | Data |
---|---|---|
9758240b KM |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
2944b611 | 7 | #ifndef lint |
9758240b | 8 | static char sccsid[] = "@(#)lose.c 5.1 (Berkeley) %G%"; |
2944b611 KM |
9 | #endif not lint |
10 | ||
11 | # include "trek.h" | |
12 | ||
13 | /* | |
14 | ** PRINT OUT LOSER MESSAGES | |
15 | ** | |
16 | ** The messages are printed out, the score is computed and | |
17 | ** printed, and the game is restarted. Oh yeh, any special | |
18 | ** actions which need be taken are taken. | |
19 | */ | |
20 | ||
06d69904 | 21 | char *Losemsg[] = |
2944b611 KM |
22 | { |
23 | "You ran out of time", | |
24 | "You ran out of energy", | |
25 | "You have been destroyed", | |
26 | "You ran into the negative energy barrier", | |
27 | "You destroyed yourself by nova'ing that star", | |
28 | "You have been caught in a supernova", | |
29 | "You just suffocated in outer space", | |
30 | "You could not be rematerialized", | |
31 | "\n\032\014 ***\a Ship's hull has imploded\a ***", | |
32 | "You have burned up in a star", | |
33 | "Well, you destroyed yourself, but it didn't do any good", | |
34 | "You have been captured by Klingons and mercilessly tortured", | |
35 | "Your last crew member died", | |
36 | }; | |
37 | ||
38 | lose(why) | |
39 | int why; | |
40 | { | |
41 | Game.killed = 1; | |
42 | sleep(1); | |
43 | printf("\n%s\n", Losemsg[why - 1]); | |
44 | switch (why) | |
45 | { | |
46 | ||
47 | case L_NOTIME: | |
48 | Game.killed = 0; | |
49 | break; | |
50 | } | |
51 | Move.endgame = -1; | |
52 | score(); | |
53 | skiptonl(0); | |
54 | reset(); | |
55 | } |