/* Is this the originally scared ship, or a follower */
{
struct sctstr sect;
- int n;
+ int i;
int m;
int max;
int dir;
coord newy;
coord dx;
coord dy;
- int stopping;
int mines;
int shells;
double mobcost;
return 0;
}
- n = -MAX_RETREAT;
- stopping = 0;
- while (!stopping && n) {
- dx = dy = 0;
- if (sp->shp_rpath[0] == 0) {
- stopping = 1;
- continue;
- }
+ for (i = 0; i < MAX_RETREAT && sp->shp_rpath[0]; i++) {
if (sp->shp_mobil <= 0.0) {
wu(0, sp->shp_own,
"%s %s,\nbut ran out of mobility, and couldn't retreat fully!\n",
if (dir < 0)
continue;
if (dir == DIR_STOP)
- stopping++;
- else {
- dx = diroff[dir][0];
- dy = diroff[dir][1];
- }
- n++;
+ break;
+ dx = diroff[dir][0];
+ dy = diroff[dir][1];
mcp = &mchr[(int)sp->shp_type];
newx = xnorm(sp->shp_x + dx);
sp->shp_y = newy;
sp->shp_mobil -= mobcost;
sp->shp_mission = 0;
- if (stopping)
- continue;
mines = sect.sct_mines;
changed = 0;
/* Is this the originally scared unit, or a follower */
{
struct sctstr sect;
- int n;
+ int i;
int m;
int max;
int dir;
coord newy;
coord dx;
coord dy;
- int stopping;
int mines;
int shells;
double mobcost;
return 0;
}
- n = -MAX_RETREAT;
- stopping = 0;
- while (!stopping && n) {
- dx = dy = 0;
- if (lp->lnd_rpath[0] == 0) {
- stopping = 1;
- continue;
- }
+ for (i = 0; i < MAX_RETREAT && lp->lnd_rpath[0]; i++) {
if (lp->lnd_mobil <= 0.0) {
wu(0, lp->lnd_own,
"%s %s,\nbut ran out of mobility, and couldn't retreat fully!\n",
if (dir < 0)
continue;
if (dir == DIR_STOP)
- stopping++;
- else {
- dx = diroff[dir][0];
- dy = diroff[dir][1];
- }
- n++;
+ break;
+ dx = diroff[dir][0];
+ dy = diroff[dir][1];
lcp = &lchr[(int)lp->lnd_type];
newx = xnorm(lp->lnd_x + dx);
lp->lnd_y = newy;
lp->lnd_mobil -= mobcost;
lp->lnd_mission = 0;
- if (stopping)
- continue;
mines = SCT_LANDMINES(§);
if (mines <= 0 || sect.sct_oldown == lp->lnd_own)
7 0 0 0 0 0 127 0 0 0 0 none 0 "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 0 "" 0 0 0 () ""
8 0 0 0 0 0 127 0 0 0 0 none 0 "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 0 "" 0 0 0 () ""
9 2 -4 -2 17 60 127 0 70 0 0 none 0 "a" 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 38 1 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 9 "" -3 1 1 () ""
-10 2 4 4 2 83 22 0 20 0 0 none 0 "" 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 10 "" -3 1 1 () ""
+10 2 4 4 2 83 53 0 20 0 0 none 0 "" 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 10 "" -3 1 1 () ""
11 2 1 3 2 91 99 0 20 0 0 none 0 "" 0 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 11 "" -3 1 1 () ""
12 0 0 0 0 0 127 0 0 0 0 none 0 "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 0 "" 0 0 0 () ""
13 0 0 0 0 0 127 0 0 0 0 none 0 "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 0 "" 0 0 0 () ""
7 0 0 0 0 0 127 0 0 0 0 none 0 "" -1 127 0 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
8 0 0 0 0 0 127 0 0 0 0 none 0 "" -1 127 0 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
9 2 1 1 7 93 119 0 50 0 0 none 0 "" -1 127 42 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
-10 2 4 0 0 61 45 0 50 0 0 none 0 "" -1 127 42 () "" 0 6 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
+10 2 4 0 0 61 61 0 50 0 0 none 0 "" -1 127 42 () "" 0 6 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
11 0 0 0 0 0 127 0 0 0 0 none 0 "" -1 127 0 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
12 0 0 0 0 0 127 0 0 0 0 none 0 "" -1 127 0 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
13 0 0 0 0 0 127 0 0 0 0 none 0 "" -1 127 0 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
Play#0 command ship
Play#0 output Play#0 1 own shp# ship type x,y fl eff civ mil uw fd pn he xl ln mob tech
Play#0 output Play#0 1 1 2 cs cargo ship -3,1 91% 0 9 0 0 0 0 0 0 115 20
- Play#0 output Play#0 1 2 10 cs cargo ship 4,4 83% 0 8 0 0 0 0 0 0 22 20
+ Play#0 output Play#0 1 2 10 cs cargo ship 4,4 83% 0 8 0 0 0 0 0 0 53 20
Play#0 output Play#0 1 2 11 cs cargo ship 1,3 91% 0 9 0 0 0 0 0 0 99 20
Play#0 output Play#0 1 2 20 cs cargo ship -3,1 95% 0 9 0 0 0 0 0 0 121 20
Play#0 output Play#0 1 2 31 cs cargo ship 0,2 94% 0 10 0 0 0 0 0 0 119 20
Play#0 output Play#0 1 own # unit type x,y a eff mil frt mu fd tch retr xl ln carry
Play#0 output Play#0 1 1 2 inf infantry -3,1 89% 9 127 113 0 50 42% 0 0
Play#0 output Play#0 1 2 9 tra train 1,1 93% 10 127 119 0 50 42% 0 1
- Play#0 output Play#0 1 2 10 cav cavalry 4,0 61% 6 127 45 0 50 42% 0 0
+ Play#0 output Play#0 1 2 10 cav cavalry 4,0 61% 6 127 61 0 50 42% 0 0
Play#0 output Play#0 1 2 31 cav cavalry 0,2 99% 10 127 126 0 50 42% 0 0 35S
Play#0 output Play#0 1 2 32 cav cavalry 3,1 83% 0 127 96 0 50 42% 0 0
Play#0 output Play#0 1 2 33 cav cavalry 1,1 85% 8 127 97 0 50 42% 0 0