Galactic Bloodshed
rst.cc
Go to the documentation of this file.
1 // Copyright 2014 The Galactic Bloodshed Authors. All rights reserved.
2 // Use of this source code is governed by a license that can be
3 // found in the COPYING file.
4 
5 /*
6  * ship -- report -- stock -- tactical -- stuff on ship
7  *
8  * Command "factories" programmed by varneyml@gb.erc.clarkson.edu
9  */
10 
11 #include "gb/commands/rst.h"
12 
13 #include <cctype>
14 #include <cmath>
15 #include <cstdio>
16 #include <cstdlib>
17 #include <cstring>
18 
19 #include "gb/GB_server.h"
20 #include "gb/buffers.h"
21 #include "gb/build.h"
22 #include "gb/files_shl.h"
23 #include "gb/fire.h"
24 #include "gb/getplace.h"
25 #include "gb/order.h"
26 #include "gb/races.h"
27 #include "gb/ships.h"
28 #include "gb/shlmisc.h"
29 #include "gb/shootblast.h"
30 #include "gb/tweakables.h"
31 #include "gb/vars.h"
32 
33 #define PLANET 1
34 
35 static const char Caliber[] = {' ', 'L', 'M', 'H'};
36 static char shiplist[256];
37 
38 static unsigned char Status, SHip, Stock, Report, Weapons, Factories, first;
39 
40 static bool Tactical;
41 
42 struct reportdata {
43  unsigned char type; /* ship or planet */
44  Ship s;
45  Planet p;
46  shipnum_t n;
47  starnum_t star;
48  planetnum_t pnum;
49  double x;
50  double y;
51 };
52 
53 using report_array = std::array<char, NUMSTYPES>;
54 
55 static struct reportdata *rd;
56 static int enemies_only, who;
57 
58 static void Free_rlist();
59 static int Getrship(player_t, governor_t, shipnum_t);
60 static int listed(int, char *);
61 static void plan_getrships(player_t, governor_t, starnum_t, planetnum_t);
62 static void ship_report(GameObj &, shipnum_t, const report_array &);
63 static void star_getrships(player_t, governor_t, starnum_t);
64 
65 void rst(const command_t &argv, GameObj &g) {
66  const player_t Playernum = g.player;
67  const governor_t Governor = g.governor;
68  shipnum_t shipno;
69 
70  report_array Report_types;
71  Report_types.fill(1);
72 
73  enemies_only = 0;
74  Num_ships = 0;
75  first = 1;
76  if (argv[0] == "report") {
77  Report = 1;
78  Weapons = Status = Stock = SHip = Tactical = Factories = 0;
79  } else if (argv[0] == "stock") {
80  Stock = 1;
82  } else if (argv[0] == "tactical") {
83  Tactical = true;
84  Weapons = Status = Report = SHip = Stock = Factories = 0;
85  } else if (argv[0] == "ship") {
86  SHip = Report = Stock = 1;
87  Tactical = false;
88  Weapons = Status = Factories = 1;
89  } else if (argv[0] == "stats") {
90  Status = 1;
91  Weapons = Report = Stock = Tactical = SHip = Factories = 0;
92  } else if (argv[0] == "weapons") {
93  Weapons = 1;
94  Status = Report = Stock = Tactical = SHip = Factories = 0;
95  } else if (argv[0] == "factories") {
96  Factories = 1;
97  Status = Report = Stock = Tactical = SHip = Weapons = 0;
98  }
99  shipnum_t n_ships = Numships();
100  rd = (struct reportdata *)malloc(sizeof(struct reportdata) *
101  (n_ships + Sdata.numstars * MAXPLANETS));
102  /* (one list entry for each ship, planet in universe) */
103 
104  if (argv.size() == 3) {
105  if (isdigit(argv[2][0]))
106  who = std::stoi(argv[2]);
107  else {
108  who = 999; /* treat argv[2].c_str() as a list of ship types */
109  strcpy(shiplist, argv[2].c_str());
110  }
111  } else
112  who = 0;
113 
114  if (argv.size() >= 2) {
115  if (*argv[1].c_str() == '#' || isdigit(*argv[1].c_str())) {
116  /* report on a couple ships */
117  int l = 1;
118  while (l < MAXARGS && *argv[l].c_str() != '\0') {
119  sscanf(argv[l].c_str() + (*argv[l].c_str() == '#'), "%lu", &shipno);
120  if (shipno > n_ships || shipno < 1) {
121  sprintf(buf, "rst: no such ship #%lu \n", shipno);
122  notify(Playernum, Governor, buf);
123  free(rd);
124  return;
125  }
126  (void)Getrship(Playernum, Governor, shipno);
127  if (rd[Num_ships - 1].s.whatorbits != ScopeLevel::LEVEL_UNIV) {
128  star_getrships(Playernum, Governor, rd[Num_ships - 1].s.storbits);
129  ship_report(g, Num_ships - 1, Report_types);
130  } else
131  ship_report(g, Num_ships - 1, Report_types);
132  l++;
133  }
134  Free_rlist();
135  return;
136  }
137  Report_types.fill(0);
138 
139  for (const auto &c : argv[1]) {
140  shipnum_t i = NUMSTYPES;
141  while (--i && Shipltrs[i] != c)
142  ;
143  if (Shipltrs[i] != c) {
144  sprintf(buf, "'%c' -- no such ship letter\n", c);
145  notify(Playernum, Governor, buf);
146  } else
147  Report_types[i] = 1;
148  }
149  }
150 
151  switch (g.level) {
152  case ScopeLevel::LEVEL_UNIV:
153  if (!(Tactical && argv.size() < 2)) {
154  shipnum_t shn = Sdata.ships;
155  while (shn && Getrship(Playernum, Governor, shn))
156  shn = rd[Num_ships - 1].s.nextship;
157 
158  for (starnum_t i = 0; i < Sdata.numstars; i++)
159  star_getrships(Playernum, Governor, i);
160  for (shipnum_t i = 0; i < Num_ships; i++)
161  ship_report(g, i, Report_types);
162  } else {
163  notify(Playernum, Governor,
164  "You can't do tactical option from universe level.\n");
165  free(rd); /* nothing allocated */
166  return;
167  }
168  break;
169  case ScopeLevel::LEVEL_PLAN:
170  plan_getrships(Playernum, Governor, g.snum, g.pnum);
171  for (shipnum_t i = 0; i < Num_ships; i++) ship_report(g, i, Report_types);
172  break;
173  case ScopeLevel::LEVEL_STAR:
174  star_getrships(Playernum, Governor, g.snum);
175  for (shipnum_t i = 0; i < Num_ships; i++) ship_report(g, i, Report_types);
176  break;
177  case ScopeLevel::LEVEL_SHIP:
178  (void)Getrship(Playernum, Governor, g.shipno);
179  ship_report(g, 0, Report_types); /* first ship report */
180  shipnum_t shn = rd[0].s.ships;
181  Num_ships = 0;
182 
183  while (shn && Getrship(Playernum, Governor, shn))
184  shn = rd[Num_ships - 1].s.nextship;
185 
186  for (shipnum_t i = 0; i < Num_ships; i++) ship_report(g, i, Report_types);
187  break;
188  }
189  Free_rlist();
190 }
191 
192 static void ship_report(GameObj &g, shipnum_t indx,
193  const report_array &rep_on) {
194  player_t Playernum = g.player;
195  governor_t Governor = g.governor;
196  int i;
197  int sight;
198  int caliber;
199  placetype where;
200  char orb[PLACENAMESIZE];
201  char strng[COMMANDSIZE];
202  char locstrn[COMMANDSIZE];
203  char tmpbuf1[10];
204  char tmpbuf2[10];
205  char tmpbuf3[10];
206  char tmpbuf4[10];
207  double Dist;
208 
209  /* last ship gotten from disk */
210  auto &s = rd[indx].s;
211  auto &p = rd[indx].p;
212  shipnum_t shipno = rd[indx].n;
213 
214  /* launched canister, non-owned ships don't show up */
215  if ((rd[indx].type == PLANET && p.info[Playernum - 1].numsectsowned) ||
216  (rd[indx].type != PLANET && s.alive && s.owner == Playernum &&
217  authorized(Governor, s) && rep_on[s.type] &&
218  !(s.type == ShipType::OTYPE_CANIST && !s.docked) &&
219  !(s.type == ShipType::OTYPE_GREEN && !s.docked))) {
220  if (rd[indx].type != PLANET && Stock) {
221  if (first) {
222  sprintf(buf,
223  " # name x hanger res des "
224  " fuel crew/mil\n");
225  notify(Playernum, Governor, buf);
226  if (!SHip) first = 0;
227  }
228  sprintf(buf,
229  "%5lu %c "
230  "%14.14s%3u%4u:%-3u%5lu:%-5ld%5u:%-5ld%7.1f:%-6ld%lu/%lu:%d\n",
231  shipno, Shipltrs[s.type], (s.active ? s.name : "INACTIVE"),
232  s.crystals, s.hanger, s.max_hanger, s.resource, max_resource(s),
233  s.destruct, max_destruct(s), s.fuel, max_fuel(s), s.popn,
234  s.troops, s.max_crew);
235  notify(Playernum, Governor, buf);
236  }
237 
238  if (rd[indx].type != PLANET && Status) {
239  if (first) {
240  sprintf(buf,
241  " # name las cew hyp guns arm tech "
242  "spd cost mass size\n");
243  notify(Playernum, Governor, buf);
244  if (!SHip) first = 0;
245  }
246  sprintf(buf,
247  "%5lu %c %14.14s %s%s%s%3lu%c/%3lu%c%4lu%5.0f%4lu%5lu%7.1f%4u",
248  shipno, Shipltrs[s.type], (s.active ? s.name : "INACTIVE"),
249  s.laser ? "yes " : " ", s.cew ? "yes " : " ",
250  s.hyper_drive.has ? "yes " : " ", s.primary,
251  Caliber[s.primtype], s.secondary, Caliber[s.sectype], armor(s),
252  s.tech, max_speed(s), shipcost(s), mass(s), size(s));
253  notify(Playernum, Governor, buf);
254  if (s.type == ShipType::STYPE_POD) {
255  sprintf(buf, " (%d)", s.special.pod.temperature);
256  notify(Playernum, Governor, buf);
257  }
258  g.out << "\n";
259  }
260 
261  if (rd[indx].type != PLANET && Weapons) {
262  if (first) {
263  sprintf(buf,
264  " # name laser cew safe guns "
265  "damage class\n");
266  notify(Playernum, Governor, buf);
267  if (!SHip) first = 0;
268  }
269  sprintf(
270  buf,
271  "%5lu %c %14.14s %s %3d/%-4d %4d %3lu%c/%3lu%c %3d%% %c %s\n",
272  shipno, Shipltrs[s.type], (s.active ? s.name : "INACTIVE"),
273  s.laser ? "yes " : " ", s.cew, s.cew_range,
274  (int)((1.0 - .01 * s.damage) * s.tech / 4.0), s.primary,
275  Caliber[s.primtype], s.secondary, Caliber[s.sectype], s.damage,
276  s.type == ShipType::OTYPE_FACTORY ? Shipltrs[s.build_type] : ' ',
277  ((s.type == ShipType::OTYPE_TERRA) ||
278  (s.type == ShipType::OTYPE_PLOW))
279  ? "Standard"
280  : s.shipclass);
281  notify(Playernum, Governor, buf);
282  }
283 
284  if (rd[indx].type != PLANET && Factories &&
285  (s.type == ShipType::OTYPE_FACTORY)) {
286  if (first) {
287  sprintf(buf,
288  " # Cost Tech Mass Sz A Crw Ful Crg Hng Dst Sp "
289  "Weapons Lsr CEWs Range Dmg\n");
290  notify(Playernum, Governor, buf);
291  if (!SHip) first = 0;
292  }
293  if ((s.build_type == 0) || (s.build_type == ShipType::OTYPE_FACTORY)) {
294  sprintf(buf,
295  "%5lu (No ship type specified yet) "
296  " 75%% (OFF)",
297  shipno);
298  notify(Playernum, Governor, buf);
299  } else {
300  if (s.primtype)
301  sprintf(tmpbuf1, "%2lu%s", s.primary,
302  s.primtype == GTYPE_LIGHT
303  ? "L"
304  : s.primtype == GTYPE_MEDIUM
305  ? "M"
306  : s.primtype == GTYPE_HEAVY ? "H" : "N");
307  else
308  strcpy(tmpbuf1, "---");
309  if (s.sectype)
310  sprintf(tmpbuf2, "%2lu%s", s.secondary,
311  s.sectype == GTYPE_LIGHT
312  ? "L"
313  : s.sectype == GTYPE_MEDIUM
314  ? "M"
315  : s.sectype == GTYPE_HEAVY ? "H" : "N");
316  else
317  strcpy(tmpbuf2, "---");
318  if (s.cew)
319  sprintf(tmpbuf3, "%4d", s.cew);
320  else
321  strcpy(tmpbuf3, "----");
322  if (s.cew)
323  sprintf(tmpbuf4, "%5d", s.cew_range);
324  else
325  strcpy(tmpbuf4, "-----");
326  sprintf(buf,
327  "%5lu %c%4d%6.1f%5.1f%3d%2d%4d%4d%4lu%4d%4d %s%1d %s/%s %s "
328  "%s %s %02d%%%s\n",
329  shipno, Shipltrs[s.build_type], s.build_cost, s.complexity,
330  s.base_mass, ship_size(s), s.armor, s.max_crew, s.max_fuel,
331  s.max_resource, s.max_hanger, s.max_destruct,
332  s.hyper_drive.has ? (s.mount ? "+" : "*") : " ", s.max_speed,
333  tmpbuf1, tmpbuf2, s.laser ? "yes" : " no", tmpbuf3, tmpbuf4,
334  s.damage, s.damage ? (s.on ? "" : "*") : "");
335  notify(Playernum, Governor, buf);
336  }
337  }
338 
339  if (rd[indx].type != PLANET && Report) {
340  if (first) {
341  sprintf(buf,
342  " # name gov dam crew mil des fuel sp orbits "
343  " destination\n");
344  notify(Playernum, Governor, buf);
345  if (!SHip) first = 0;
346  }
347  if (s.docked)
348  if (s.whatdest == ScopeLevel::LEVEL_SHIP)
349  sprintf(locstrn, "D#%ld", s.destshipno);
350  else
351  sprintf(locstrn, "L%2d,%-2d", s.land_x, s.land_y);
352  else if (s.navigate.on)
353  sprintf(locstrn, "nav:%d (%d)", s.navigate.bearing, s.navigate.turns);
354  else
355  strcpy(locstrn, prin_ship_dest(s).c_str());
356 
357  if (!s.active) {
358  sprintf(strng, "INACTIVE(%d)", s.rad);
359  notify(Playernum, Governor, buf);
360  }
361 
362  sprintf(buf,
363  "%c%-5lu %12.12s %2d %3u%5lu%4lu%5u%5.0f %c%1u %-10s %-18s\n",
364  Shipltrs[s.type], shipno, (s.active ? s.name : strng), s.governor,
365  s.damage, s.popn, s.troops, s.destruct, s.fuel,
366  s.hyper_drive.has ? (s.mounted ? '+' : '*') : ' ', s.speed,
367  Dispshiploc_brief(&s), locstrn);
368  notify(Playernum, Governor, buf);
369  }
370 
371  auto Race = races[Playernum - 1];
372 
373  if (Tactical) {
374  int fev = 0;
375  int fspeed = 0;
376  int fdam = 0;
377  double tech;
378 
379  sprintf(buf,
380  "\n # name tech guns armor size dest "
381  "fuel dam spd evad orbits\n");
382  notify(Playernum, Governor, buf);
383 
384  if (rd[indx].type == PLANET) {
385  tech = Race->tech;
386  /* tac report from planet */
387  sprintf(buf, "(planet)%15.15s%4.0f %4dM %5u %6u\n",
388  Stars[rd[indx].star]->pnames[rd[indx].pnum], tech,
389  p.info[Playernum - 1].guns, p.info[Playernum - 1].destruct,
390  p.info[Playernum - 1].fuel);
391  notify(Playernum, Governor, buf);
392  caliber = GTYPE_MEDIUM;
393  } else {
394  where.level = s.whatorbits;
395  where.snum = s.storbits;
396  where.pnum = s.pnumorbits;
397  tech = s.tech;
398  caliber = current_caliber(&s);
399  if ((s.whatdest != ScopeLevel::LEVEL_UNIV || s.navigate.on) &&
400  !s.docked && s.active) {
401  fspeed = s.speed;
402  fev = s.protect.evade;
403  }
404  fdam = s.damage;
405  sprintf(orb, "%30.30s", Dispplace(where).c_str());
406  sprintf(buf,
407  "%3lu %c %16.16s %4.0f%3lu%c/%3lu%c%6d%5d%5u%7.1f%3d%% %d "
408  "%3s%21.22s",
409  shipno, Shipltrs[s.type], (s.active ? s.name : "INACTIVE"),
410  s.tech, s.primary, Caliber[s.primtype], s.secondary,
411  Caliber[s.sectype], s.armor, s.size, s.destruct, s.fuel,
412  s.damage, fspeed, (fev ? "yes" : " "), orb);
413  notify(Playernum, Governor, buf);
414  if (landed(s)) {
415  sprintf(buf, " (%d,%d)", s.land_x, s.land_y);
416  notify(Playernum, Governor, buf);
417  }
418  if (!s.active) {
419  sprintf(buf, " INACTIVE(%d)", s.rad);
420  notify(Playernum, Governor, buf);
421  }
422  sprintf(buf, "\n");
423  notify(Playernum, Governor, buf);
424  }
425 
426  sight = 0;
427  if (rd[indx].type == PLANET)
428  sight = 1;
429  else if (shipsight(s))
430  sight = 1;
431 
432  /* tactical display */
433  sprintf(buf,
434  "\n Tactical: # own typ name rng (50%%) size "
435  "spd evade hit dam loc\n");
436  notify(Playernum, Governor, buf);
437 
438  if (sight)
439  for (i = 0; i < Num_ships; i++) {
440  if (i != indx &&
441  (Dist = sqrt(Distsq(rd[indx].x, rd[indx].y, rd[i].x, rd[i].y))) <
442  gun_range(Race, &rd[indx].s, (rd[indx].type == PLANET))) {
443  if (rd[i].type == PLANET) {
444  /* tac report at planet */
445  sprintf(buf, " %13s(planet) %8.0f\n",
446  Stars[rd[i].star]->pnames[rd[i].pnum], Dist);
447  notify(Playernum, Governor, buf);
448  } else if (!who || who == rd[i].s.owner ||
449  (who == 999 && listed((int)rd[i].s.type, shiplist))) {
450  /* tac report at ship */
451  if ((rd[i].s.owner != Playernum ||
452  !authorized(Governor, rd[i].s)) &&
453  rd[i].s.alive && rd[i].s.type != ShipType::OTYPE_CANIST &&
454  rd[i].s.type != ShipType::OTYPE_GREEN) {
455  int tev = 0;
456  int tspeed = 0;
457  int body = 0;
458  int prob = 0;
459  int factor = 0;
460  if ((rd[i].s.whatdest != ScopeLevel::LEVEL_UNIV ||
461  rd[i].s.navigate.on) &&
462  !rd[i].s.docked && rd[i].s.active) {
463  tspeed = rd[i].s.speed;
464  tev = rd[i].s.protect.evade;
465  }
466  body = size(rd[i].s);
467  auto defense = getdefense(rd[i].s);
468  prob = hit_odds(Dist, &factor, tech, fdam, fev, tev, fspeed,
469  tspeed, body, caliber, defense);
470  if (rd[indx].type != PLANET && laser_on(rd[indx].s) &&
471  rd[indx].s.focus)
472  prob = prob * prob / 100;
473  sprintf(
474  buf,
475  "%13lu %s%2d,%1d %c%14.14s %4.0f %4d %4d %d %3s "
476  "%3d%% %3u%%%s",
477  rd[i].n,
478  (isset(races[Playernum - 1]->atwar, rd[i].s.owner))
479  ? "-"
480  : (isset(races[Playernum - 1]->allied, rd[i].s.owner))
481  ? "+"
482  : " ",
483  rd[i].s.owner, rd[i].s.governor, Shipltrs[rd[i].s.type],
484  rd[i].s.name, Dist, factor, body, tspeed,
485  (tev ? "yes" : " "), prob, rd[i].s.damage,
486  (rd[i].s.active ? "" : " INACTIVE"));
487  if ((enemies_only == 0) ||
488  ((enemies_only == 1) &&
489  (!isset(races[Playernum - 1]->allied, rd[i].s.owner)))) {
490  notify(Playernum, Governor, buf);
491  if (landed(rd[i].s)) {
492  sprintf(buf, " (%d,%d)", rd[i].s.land_x, rd[i].s.land_y);
493  notify(Playernum, Governor, buf);
494  } else {
495  sprintf(buf, " ");
496  notify(Playernum, Governor, buf);
497  }
498  sprintf(buf, "\n");
499  notify(Playernum, Governor, buf);
500  }
501  }
502  }
503  }
504  }
505  }
506  }
507 }
508 
509 static void plan_getrships(player_t Playernum, governor_t Governor,
510  starnum_t snum, planetnum_t pnum) {
511  rd[Num_ships].p = getplanet(snum, pnum);
512  const auto &p = rd[Num_ships].p;
513  /* add this planet into the ship list */
514  rd[Num_ships].star = snum;
515  rd[Num_ships].pnum = pnum;
516  rd[Num_ships].type = PLANET;
517  rd[Num_ships].n = 0;
518  rd[Num_ships].x = Stars[snum]->xpos + p.xpos;
519  rd[Num_ships].y = Stars[snum]->ypos + p.ypos;
520  Num_ships++;
521 
522  if (p.info[Playernum - 1].explored) {
523  shipnum_t shn = p.ships;
524  while (shn && Getrship(Playernum, Governor, shn))
525  shn = rd[Num_ships - 1].s.nextship;
526  }
527 }
528 
529 static void star_getrships(player_t Playernum, governor_t Governor,
530  starnum_t snum) {
531  if (isset(Stars[snum]->explored, Playernum)) {
532  shipnum_t shn = Stars[snum]->ships;
533  while (shn && Getrship(Playernum, Governor, shn))
534  shn = rd[Num_ships - 1].s.nextship;
535  for (planetnum_t i = 0; i < Stars[snum]->numplanets; i++)
536  plan_getrships(Playernum, Governor, snum, i);
537  }
538 }
539 
540 /* get a ship from the disk and add it to the ship list we're maintaining. */
541 static int Getrship(player_t Playernum, governor_t Governor, shipnum_t shipno) {
542  auto shiptmp = getship(shipno);
543  if (shiptmp) {
544  rd[Num_ships].s = *shiptmp;
545  rd[Num_ships].type = 0;
546  rd[Num_ships].n = shipno;
547  rd[Num_ships].x = rd[Num_ships].s.xpos;
548  rd[Num_ships].y = rd[Num_ships].s.ypos;
549  Num_ships++;
550  return 1;
551  }
552  sprintf(buf, "Getrship: error on ship get (%lu).\n", shipno);
553  notify(Playernum, Governor, buf);
554  return 0;
555 }
556 
557 static void Free_rlist() { free(rd); }
558 
559 static int listed(int type, char *string) {
560  char *p;
561 
562  for (p = string; *p; p++) {
563  if (Shipltrs[type] == *p) return 1;
564  }
565  return 0;
566 }
static int Getrship(player_t, governor_t, shipnum_t)
Definition: rst.cc:541
#define COMMANDSIZE
Definition: tweakables.h:26
#define Distsq(x1, y1, x2, y2)
Definition: tweakables.h:218
static bool Tactical
Definition: rst.cc:40
#define PLACENAMESIZE
Definition: tweakables.h:70
static unsigned char Stock
Definition: rst.cc:38
static void ship_report(GameObj &, shipnum_t, const report_array &)
Definition: rst.cc:192
double y
Definition: rst.cc:50
int current_caliber(Ship *)
Definition: shootblast.cc:546
char * Dispshiploc_brief(Ship *ship)
Definition: getplace.cc:188
Planet getplanet(const starnum_t star, const planetnum_t pnum)
Definition: files_shl.cc:335
static void Free_rlist()
Definition: rst.cc:557
#define isset(a, i)
Definition: vars.h:312
#define PLANET
Definition: rst.cc:33
void rst(const command_t &argv, GameObj &g)
Definition: rst.cc:65
double x
Definition: rst.cc:49
Planet p
Definition: rst.cc:45
shipnum_t Numships()
Definition: files_shl.cc:1516
#define MAXARGS
Definition: tweakables.h:27
static int who
Definition: rst.cc:56
Ship s
Definition: rst.cc:44
static void plan_getrships(player_t, governor_t, starnum_t, planetnum_t)
Definition: rst.cc:509
static unsigned char Status
Definition: rst.cc:38
unsigned char type
Definition: rst.cc:43
static int listed(int, char *)
Definition: rst.cc:559
static int enemies_only
Definition: rst.cc:56
shipnum_t n
Definition: rst.cc:46
int hit_odds(double, int *, double, int, int, int, int, int, int, int, int)
Definition: shootblast.cc:493
static struct reportdata * rd
Definition: rst.cc:55
static unsigned char SHip
Definition: rst.cc:38
static unsigned char Factories
Definition: rst.cc:38
planetnum_t pnum
Definition: rst.cc:48
#define MAXPLANETS
Definition: tweakables.h:72
static unsigned char Weapons
Definition: rst.cc:38
static char shiplist[256]
Definition: rst.cc:36
#define NUMSTYPES
Definition: ships.h:99
static const char Caliber[]
Definition: rst.cc:35
starnum_t star
Definition: rst.cc:47
static void star_getrships(player_t, governor_t, starnum_t)
Definition: rst.cc:529
static unsigned char Report
Definition: rst.cc:38
static unsigned char first
Definition: rst.cc:38