OpenGrok
Home
Sort by:
relevance
|
last modified time
|
path
Full Search
in project(s):
src
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:klingon
(Results
1 - 12
of
12
) sorted by relevancy
/src/games/trek/
compkl.c
45
** compute
klingon
distances
47
** The
klingon
list has the distances for all klingons recomputed
69
/* compute distance to the
Klingon
*/
70
dx = Ship.sectx - Etc.
klingon
[i].x;
71
dy = Ship.secty - Etc.
klingon
[i].y;
75
/* compute average of new and old distances to
Klingon
*/
77
temp = Etc.
klingon
[i].dist;
78
Etc.
klingon
[i].avgdist = 0.5 * (temp + d);
81
Etc.
klingon
[i].avgdist = d;
83
Etc.
klingon
[i].dist = d
[
all
...]
destruct.c
57
**
Klingon
with you.
112
if (Etc.
klingon
[i].power * Etc.
klingon
[i].dist <= zap)
113
killk(Etc.
klingon
[i].x, Etc.
klingon
[i].y);
117
/* if we didn't kill the last
Klingon
(detected by killk), */
attack.c
46
**
Klingon
Attack Routine
48
** This routine performs the
Klingon
attack provided that
108
/* let each
Klingon
do his damndest */
111
if (Etc.
klingon
[i].power < 20)
114
printf("\nStardate %.2f:
Klingon
attack:\n",
120
tothe = Etc.
klingon
[i].avgdist;
121
hit = Etc.
klingon
[i].power * pow(dustfac, tothe) * Param.hitfac;
123
dustfac = Etc.
klingon
[i].power;
124
Etc.
klingon
[i].power = dustfac * Param.phasfac *
140
Etc.
klingon
[i].x, Etc.klingon[i].y)
[
all
...]
initquad.c
99
Sect[rx][ry] =
KLINGON
;
100
Etc.
klingon
[i].x = rx;
101
Etc.
klingon
[i].y = ry;
102
Etc.
klingon
[i].power = Param.klingpwr;
103
Etc.
klingon
[i].srndreq = 0;
kill.c
52
** Handle a
Klingon
's death
54
** The
Klingon
at the sector given by the parameters is killed
55
** and removed from the
Klingon
list. Notice that it is not
58
** and the game is won if that was the last
klingon
.
66
printf(" ***
Klingon
at %d,%d destroyed ***\n", ix, iy);
76
/* find the
Klingon
in the
Klingon
list */
78
if (ix == Etc.
klingon
[i].x && iy == Etc.
klingon
[i].y) {
82
Etc.
klingon
[i] = Etc.klingon[i+1]
[
all
...]
torped.c
169
case
KLINGON
:
171
if (Etc.
klingon
[k].x != ix ||
172
Etc.
klingon
[k].y != iy)
174
Etc.
klingon
[k].power -= 500 + ranf(501);
175
if (Etc.
klingon
[k].power > 0) {
176
printf("*** Hit on
Klingon
at "
capture.c
47
** Ask a
Klingon
To Surrender
51
** The Subspace Radio is needed to ask a
Klingon
if he will kindly
52
** surrender. A random
Klingon
from the ones in the quadrant is
55
** The
Klingon
is requested to surrender. The probability of this
56
** is a function of that
Klingon
's remaining power, our power,
83
/* if there is more than one
Klingon
, find out which one */
88
/* check out that
Klingon
*/
101
printf("
Klingon
at %d,%d surrenders\n", k->x, k->y);
121
** SELECT A
KLINGON
135
return (&Etc.
klingon
[i])
[
all
...]
computer.c
63
**
Klingon
in the quadrant. Obviously this fails if the
177
/* for each
Klingon
, give the course & distance */
179
printf("
Klingon
at %d,%d",
180
Etc.
klingon
[i].x, Etc.
klingon
[i].y);
182
Etc.
klingon
[i].x,
183
Etc.
klingon
[i].y, &dist);
269
printf("
Klingon
is attacking starbase "
klmove.c
59
** sector to move to on a per-
Klingon
basis; they are roughly
86
k = &Etc.
klingon
[n];
111
/* try to move the
klingon
*/
138
printf("
Klingon
at %d,%d escapes to "
153
*k = Etc.
klingon
[Etc.nkling];
177
printf("
Klingon
at %d,%d moves to %d,%d\n",
180
Sect[k->x = nextx][k->y = nexty] =
KLINGON
;
events.c
183
case E_KATSB: /*
Klingon
attacks starbase */
194
/* see if a
Klingon
exists in this quadrant */
246
case E_KDESB: /*
Klingon
destroys starbase */
251
*
Klingon
got tired and went home, ignore this event
337
case E_REPRO: /*
Klingon
reproduces */
346
/* reproduce one
Klingon
*/
384
/* we must position
Klingon
*/
386
Sect[ix][iy] =
KLINGON
;
387
k = &Etc.
klingon
[Etc.nkling++];
392
compkldist(Etc.
klingon
[0].dist =
[
all
...]
phaser.c
217
k = &Etc.
klingon
[i];
289
k = Etc.
klingon
;
307
** angle of the
klingon
,
312
** dist is the distance to the
klingon
338
printf("%d unit hit on
Klingon
", hit);
trek.h
95
#define
KLINGON
'K'
137
#define E_KATSB 2 /*
Klingon
attacks starbase */
138
#define E_KDESB 3 /*
Klingon
destroys starbase */
141
#define E_REPRO 6 /* a
Klingon
is reproduced */
143
#define E_ATTACK 8 /*
Klingon
attack during rest period */
291
int klingpwr; /*
Klingon
initial power */
293
double phasfac; /*
Klingon
phaser power eater factor */
294
char moveprob[6]; /* probability that a
Klingon
moves */
295
double movefac[6]; /*
Klingon
move distance multiplier */
300
double hitfac; /*
Klingon
attack factor *
324
struct kling
klingon
[MAXKLQUAD];\/* sorted Klingon list *\/
member in struct:Etc_struct
[
all
...]
Completed in 18 milliseconds
Indexes created Mon Oct 20 16:09:52 GMT 2025