|
|
1.1 root 1: # include "trek.h"
2:
3: /**
4: ** ram a klingon
5: **/
6:
7: collide(ix, iy)
8: int ix, iy;
9: {
10: register int i;
11: register char c;
12:
13: printf(" *** RED ALERT: collision imminent\n");
14: c = Sect[ix][iy];
15: switch (c)
16: {
17:
18: case KLINGON:
19: printf("%s rams Klingon at %d,%d\n", Status.shipname, ix, iy);
20: hitkling(ix, iy, i = Status.warp * 100);
21: break;
22:
23: case STAR:
24: case INHABIT:
25: printf("Yeoman Rand: Captain, isn't it getting hot in here?\n");
26: sleep(2);
27: printf("Spock: Hull temperature approaching 550 Degrees Kelvin.\n");
28: lose(L_STAR);
29:
30: case BASE:
31: printf("You ran into the starbase at %d,%d\n", ix, iy);
32: if(!Damage[SINS])
33: Game.killb++;
34: killb(Quadx,Quady);
35: break;
36: }
37: sleep(2);
38: printf("%s extensively damaged.\n", Status.shipname);
39: i = 15 + ranf(10 * Game.skill);
40: Game.deaths =+ i;
41: Status.crew =- i;
42: printf("McCoy: Take it easy Jim; we had %d casualties.\n", i);
43: for (i = 0; i < NDEV; i++)
44: {
45: if (ranf(100) < 50)
46: continue;
47: damage(i, (Status.warp * (franf() + 1.0)) * Param.damfac[i] * 0.1);
48: }
49: Status.shldup = 0;
50: dcrept();
51: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.