The retreat code happily retreats anything, without considering who
owns it. It reports retreat to the owner by bulletin, even when the
owner is the current player.
Commands shouldn't report to the current player by bulletin, they
should print directly. Fixable. However, your ships and land units
retreating from your own actions makes little sense. Suppress it.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
#include "nsc.h"
#include "optlist.h"
#include "path.h"
#include "nsc.h"
#include "optlist.h"
#include "path.h"
#include "prototypes.h"
#include "retreat.h"
#include "sect.h"
#include "prototypes.h"
#include "retreat.h"
#include "sect.h"
if (sp->shp_effic < SHIP_MINEFF || CANT_HAPPEN(!sp->shp_own))
return;
if (sp->shp_effic < SHIP_MINEFF || CANT_HAPPEN(!sp->shp_own))
return;
+ if (sp->shp_own == player->cnum)
+ return;
retreat_ship1(sp, code, 1);
if (sp->shp_rpath[0] == 0)
retreat_ship1(sp, code, 1);
if (sp->shp_rpath[0] == 0)
if (lp->lnd_effic < LAND_MINEFF || CANT_HAPPEN(!lp->lnd_own))
return;
if (lp->lnd_effic < LAND_MINEFF || CANT_HAPPEN(!lp->lnd_own))
return;
+ if (lp->lnd_own == player->cnum)
+ return;
retreat_land1(lp, code, 1);
if (lp->lnd_rpath[0] == 0)
retreat_land1(lp, code, 1);
if (lp->lnd_rpath[0] == 0)
fire se -2,2 10
| nj into friendly harbor
fire se -2,2 10
fire se -2,2 10
| nj into friendly harbor
fire se -2,2 10
fire se -2,2 2
|| ships retreating from gun fire
| injured covered above
fire se -2,2 2
|| ships retreating from gun fire
| injured covered above
l
10
| BUG: can't enter allied sector
l
10
| BUG: can't enter allied sector
+| own land unit stays put
uid owner xloc yloc type effic mobil off tech opx opy mission radius fleet xstart xend ystart yend cargostart(0) cargostart(1) cargostart(2) cargostart(3) cargostart(4) cargostart(5) cargoend(0) cargoend(1) cargoend(2) cargoend(3) cargoend(4) cargoend(5) amtstart(0) amtstart(1) amtstart(2) amtstart(3) amtstart(4) amtstart(5) amtend(0) amtend(1) amtend(2) amtend(3) amtend(4) amtend(5) autonav civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime access mquota path follow name xbuilt ybuilt builder rflags rpath
0 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 0 "" -3 1 1 (injured) "garbage"
1 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 1 "" -3 1 1 () ""
uid owner xloc yloc type effic mobil off tech opx opy mission radius fleet xstart xend ystart yend cargostart(0) cargostart(1) cargostart(2) cargostart(3) cargostart(4) cargostart(5) cargoend(0) cargoend(1) cargoend(2) cargoend(3) cargoend(4) cargoend(5) amtstart(0) amtstart(1) amtstart(2) amtstart(3) amtstart(4) amtstart(5) amtend(0) amtend(1) amtend(2) amtend(3) amtend(4) amtend(5) autonav civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime access mquota path follow name xbuilt ybuilt builder rflags rpath
0 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 0 "" -3 1 1 (injured) "garbage"
1 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 1 "" -3 1 1 () ""
-2 1 -6 2 2 91 81 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 "" 2 "" -3 1 1 (injured torped sonared helpless bombed depth-charged boarded) "yujnbgy"
+2 1 -3 1 2 91 115 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 "" 2 "" -3 1 1 (injured torped sonared helpless bombed depth-charged boarded) "bgyujnbgy"
3 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 3 "" -3 1 1 () ""
4 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 4 "" -3 1 1 (group helpless) "b"
5 1 -5 1 17 96 63 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 9 31 1 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 5 "" -3 1 1 () ""
3 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 3 "" -3 1 1 () ""
4 1 -3 1 2 100 127 0 20 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 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 4 "" -3 1 1 (group helpless) "b"
5 1 -5 1 17 96 63 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 9 31 1 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 5 "" -3 1 1 () ""
uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime land access
0 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 (injured) "garbage" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
1 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
uid owner xloc yloc type effic mobil off tech opx opy mission radius army ship harden retreat rflags rpath civil milit shell gun petrol iron dust bar food oil lcm hcm uw rad pstage ptime land access
0 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 (injured) "garbage" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
1 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
-2 1 -3 -1 2 89 85 0 50 0 0 none 0 "" -1 127 42 (injured helpless bombed) "jnbgyuj" 0 9 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
+2 1 -3 1 2 89 113 0 50 0 0 none 0 "" -1 127 42 (injured helpless bombed) "yujnbgyuj" 0 9 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
3 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
4 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 (group helpless) "b" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
5 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
3 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 () "" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
4 1 -3 1 2 100 127 0 50 0 0 none 0 "a" -1 127 42 (group helpless) "b" 0 10 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
5 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#1 output Play#1 1 \007Kaboom!!!
Play#1 output Play#1 1 Shells hit cs cargo ship (#2) in -3,1 for 11 damage.
Play#1 output Play#1 1 cs cargo ship (#2) takes 9
Play#1 output Play#1 1 \007Kaboom!!!
Play#1 output Play#1 1 Shells hit cs cargo ship (#2) in -3,1 for 11 damage.
Play#1 output Play#1 1 cs cargo ship (#2) takes 9
- Play#1 output Play#1 1 You have a new telegram waiting ...
Play#1 output Play#1 6 0 616
Play#1 input fire se -2,2 11
Play#1 command fire
Play#1 output Play#1 6 0 616
Play#1 input fire se -2,2 11
Play#1 command fire
Play#1 output Play#1 1 1 pinpoint bombing raid did 36 damage to inf infantry #2
Play#1 output Play#1 1 inf infantry #2 takes 11
Play#1 output Play#1 1 -3,1 takes 4% collateral damage
Play#1 output Play#1 1 1 pinpoint bombing raid did 36 damage to inf infantry #2
Play#1 output Play#1 1 inf infantry #2 takes 11
Play#1 output Play#1 1 -3,1 takes 4% collateral damage
- Play#1 output Play#1 1 You have a new telegram waiting ...
Play#1 output Play#1 6 0 545
Play#1 input bomb 20/21/22/23/24 . p -2,2 uuh
Play#1 command bomb
Play#1 output Play#1 6 0 545
Play#1 input bomb 20/21/22/23/24 . p -2,2 uuh
Play#1 command bomb
Play#0 output Play#0 6 0 640
Play#0 input read 1
Play#0 command read
Play#0 output Play#0 6 0 640
Play#0 input read 1
Play#0 command read
- Play#0 output Play#0 1
- Play#0 output Play#0 1 > BULLETIN from POGO, (#0) dated Thu Jan 1 00:00:00 1970
- Play#0 output Play#0 1 cs cargo ship (#2) was damaged, and retreated to -6,2
- Play#0 output Play#0 1 inf infantry #2 was damaged, and retreated to -3,-1
+ Play#0 output Play#0 1 No telegrams for 1 at the moment...
Play#0 output Play#0 6 0 640
Play#0 input read 2
Play#0 command read
Play#0 output Play#0 6 0 640
Play#0 input read 2
Play#0 command read
Play#0 input ship * ?fleet#a
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 input ship * ?fleet#a
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 -6,2 91% 0 9 0 0 0 0 0 0 81 20
+ 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 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 10 cs cargo ship 4,4 83% 0 8 0 0 0 0 0 0 22 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 input retr * ?fleet#a
Play#0 command retreat
Play#0 output Play#0 1 own shp# ship type x,y fl path as flt? flags
Play#0 input retr * ?fleet#a
Play#0 command retreat
Play#0 output Play#0 1 own shp# ship type x,y fl path as flt? flags
- Play#0 output Play#0 1 1 2 cs cargo ship -6,2 yujnbgy itshbdu
+ Play#0 output Play#0 1 1 2 cs cargo ship -3,1 bgyujnbgy itshbdu
Play#0 output Play#0 1 2 10 cs cargo ship 4,4
Play#0 output Play#0 1 2 11 cs cargo ship 1,3
Play#0 output Play#0 1 2 20 cs cargo ship -3,1 u h
Play#0 output Play#0 1 2 10 cs cargo ship 4,4
Play#0 output Play#0 1 2 11 cs cargo ship 1,3
Play#0 output Play#0 1 2 20 cs cargo ship -3,1 u h
Play#0 input land * ?army#a
Play#0 command land
Play#0 output Play#0 1 own # unit type x,y a eff mil frt mu fd tch retr xl ln carry
Play#0 input land * ?army#a
Play#0 command land
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 85 0 50 42% 0 0
+ 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 31 cav cavalry 0,2 99% 10 127 126 0 50 42% 0 0 35S
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 31 cav cavalry 0,2 99% 10 127 126 0 50 42% 0 0 35S
Play#0 input lretr * ?army#a
Play#0 command lretreat
Play#0 output Play#0 1 own lnd# unit type x,y ar path as army? flags
Play#0 input lretr * ?army#a
Play#0 command lretreat
Play#0 output Play#0 1 own lnd# unit type x,y ar path as army? flags
- Play#0 output Play#0 1 1 2 inf infantry -3,-1 jnbgyuj ihb
+ Play#0 output Play#0 1 1 2 inf infantry -3,1 yujnbgyuj ihb
Play#0 output Play#0 1 2 9 tra train 1,1
Play#0 output Play#0 1 2 10 cav cavalry 4,0
Play#0 output Play#0 1 2 31 cav cavalry 0,2 j b
Play#0 output Play#0 1 2 9 tra train 1,1
Play#0 output Play#0 1 2 10 cav cavalry 4,0
Play#0 output Play#0 1 2 31 cav cavalry 0,2 j b