Commit | Line | Data |
---|---|---|
9758240b KM |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
e9fb6bea KB |
3 | * All rights reserved. |
4 | * | |
5 | * Redistribution and use in source and binary forms are permitted | |
6 | * provided that this notice is preserved and that due credit is given | |
7 | * to the University of California at Berkeley. The name of the University | |
8 | * may not be used to endorse or promote products derived from this | |
9 | * software without specific prior written permission. This software | |
10 | * is provided ``as is'' without express or implied warranty. | |
9758240b KM |
11 | */ |
12 | ||
2944b611 | 13 | #ifndef lint |
5b8cd1f5 | 14 | static char sccsid[] = "@(#)lose.c 5.3 (Berkeley) %G%"; |
e9fb6bea | 15 | #endif /* not lint */ |
2944b611 KM |
16 | |
17 | # include "trek.h" | |
18 | ||
19 | /* | |
20 | ** PRINT OUT LOSER MESSAGES | |
21 | ** | |
22 | ** The messages are printed out, the score is computed and | |
23 | ** printed, and the game is restarted. Oh yeh, any special | |
24 | ** actions which need be taken are taken. | |
25 | */ | |
26 | ||
06d69904 | 27 | char *Losemsg[] = |
2944b611 KM |
28 | { |
29 | "You ran out of time", | |
30 | "You ran out of energy", | |
31 | "You have been destroyed", | |
32 | "You ran into the negative energy barrier", | |
33 | "You destroyed yourself by nova'ing that star", | |
34 | "You have been caught in a supernova", | |
35 | "You just suffocated in outer space", | |
36 | "You could not be rematerialized", | |
5b8cd1f5 | 37 | "\n\032\014 ***\07 Ship's hull has imploded\07 ***", |
2944b611 KM |
38 | "You have burned up in a star", |
39 | "Well, you destroyed yourself, but it didn't do any good", | |
40 | "You have been captured by Klingons and mercilessly tortured", | |
41 | "Your last crew member died", | |
42 | }; | |
43 | ||
44 | lose(why) | |
45 | int why; | |
46 | { | |
47 | Game.killed = 1; | |
48 | sleep(1); | |
49 | printf("\n%s\n", Losemsg[why - 1]); | |
50 | switch (why) | |
51 | { | |
52 | ||
53 | case L_NOTIME: | |
54 | Game.killed = 0; | |
55 | break; | |
56 | } | |
57 | Move.endgame = -1; | |
58 | score(); | |
59 | skiptonl(0); | |
60 | reset(); | |
61 | } |