]> git.pond.sub.org Git - empserver/commitdiff
build: Stop abuse of construction material random rounding
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 12 Jan 2014 17:24:06 +0000 (18:24 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 16 Feb 2014 10:44:43 +0000 (11:44 +0100)
Construction materials required for building a ship, plane or land
unit are rounded randomly.  Crafty players exploit this to save
materials: they put just enough materials there so that build succeeds
when it rounds down.  Then they simply keep trying until it succeeds.

Planes and land units are built at 10%, so rounding happens when
materials for 100% aren't multiples of ten.  If they're below ten, you
can even build without materials.  In the stock game, this is the case
for linf, and many plane types.

Ships are built at 20%, so multiples of five aren't rounded.  Ship
building never rounds in the stock game.

Prevent the abuse of random rounding by requiring the required
fractional amount rounded up to be present.  Don't change the actual
charging of materials; that's still randomly rounded.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/buil.c
tests/build/final.xdump
tests/build/journal.log
tests/build/units/02-planes-2
tests/build/units/03-lands-3
tests/smoke/final.xdump
tests/smoke/journal.log

index 6ce1081e695e8cbd46d8f87953db49f8bea6039a..89a42f8e8a139f68cabe0b1fcc55ab164f289a2d 100644 (file)
@@ -56,7 +56,6 @@ static int pick_unused_unit_uid(int);
 static int build_bridge(char);
 static int build_bspan(struct sctstr *sp);
 static int build_btower(struct sctstr *sp);
 static int build_bridge(char);
 static int build_bspan(struct sctstr *sp);
 static int build_btower(struct sctstr *sp);
-static void build_material_use(short[], short[], int);
 static int sector_can_build(struct sctstr *, short[], int, int, char *);
 static void build_charge(struct sctstr *, short[], int, double, int);
 static int build_can_afford(double, int, char *);
 static int sector_can_build(struct sctstr *, short[], int, int, char *);
 static void build_charge(struct sctstr *, short[], int, double, int);
 static int build_can_afford(double, int, char *);
@@ -208,14 +207,13 @@ static int
 build_ship(struct sctstr *sp, int type, int tlev)
 {
     struct mchrstr *mp = &mchr[type];
 build_ship(struct sctstr *sp, int type, int tlev)
 {
     struct mchrstr *mp = &mchr[type];
-    short mat[I_MAX+1], mat_100[I_MAX+1];
+    short mat[I_MAX+1];
     int work;
     struct shpstr ship;
 
     int work;
     struct shpstr ship;
 
-    memset(mat_100, 0, sizeof(mat_100));
-    mat_100[I_LCM] = mp->m_lcm;
-    mat_100[I_HCM] = mp->m_hcm;
-    build_material_use(mat, mat_100, SHIP_MINEFF);
+    memset(mat, 0, sizeof(mat));
+    mat[I_LCM] = mp->m_lcm;
+    mat[I_HCM] = mp->m_hcm;
     work = SHP_BLD_WORK(mp->m_lcm, mp->m_hcm);
 
     if (sp->sct_type != SCT_HARBR) {
     work = SHP_BLD_WORK(mp->m_lcm, mp->m_hcm);
 
     if (sp->sct_type != SCT_HARBR) {
@@ -262,14 +260,13 @@ static int
 build_land(struct sctstr *sp, int type, int tlev)
 {
     struct lchrstr *lp = &lchr[type];
 build_land(struct sctstr *sp, int type, int tlev)
 {
     struct lchrstr *lp = &lchr[type];
-    short mat[I_MAX+1], mat_100[I_MAX+1];
+    short mat[I_MAX+1];
     int work;
     struct lndstr land;
 
     int work;
     struct lndstr land;
 
-    memset(mat_100, 0, sizeof(mat_100));
-    mat_100[I_LCM] = lp->l_lcm;
-    mat_100[I_HCM] = lp->l_hcm;
-    build_material_use(mat, mat_100, LAND_MINEFF);
+    memset(mat, 0, sizeof(mat));
+    mat[I_LCM] = lp->l_lcm;
+    mat[I_HCM] = lp->l_hcm;
     work = LND_BLD_WORK(lp->l_lcm, lp->l_hcm);
 
     if (sp->sct_type != SCT_HEADQ) {
     work = LND_BLD_WORK(lp->l_lcm, lp->l_hcm);
 
     if (sp->sct_type != SCT_HEADQ) {
@@ -378,7 +375,7 @@ static int
 build_plane(struct sctstr *sp, int type, int tlev)
 {
     struct plchrstr *pp = &plchr[type];
 build_plane(struct sctstr *sp, int type, int tlev)
 {
     struct plchrstr *pp = &plchr[type];
-    short mat[I_MAX+1], mat_100[I_MAX+1];
+    short mat[I_MAX+1];
     int work;
     struct plnstr plane;
     double eff = PLANE_MINEFF / 100.0;
     int work;
     struct plnstr plane;
     double eff = PLANE_MINEFF / 100.0;
@@ -388,10 +385,9 @@ build_plane(struct sctstr *sp, int type, int tlev)
     /* Always use at least 1 mil to build a plane */
     if (mil == 0 && pp->pl_crew > 0)
        mil = 1;
     /* Always use at least 1 mil to build a plane */
     if (mil == 0 && pp->pl_crew > 0)
        mil = 1;
-    memset(mat_100, 0, sizeof(mat_100));
-    mat_100[I_LCM] = pp->pl_lcm;
-    mat_100[I_HCM] = pp->pl_hcm;
-    build_material_use(mat, mat_100, PLANE_MINEFF);
+    memset(mat, 0, sizeof(mat));
+    mat[I_LCM] = pp->pl_lcm;
+    mat[I_HCM] = pp->pl_hcm;
     work = PLN_BLD_WORK(pp->pl_lcm, pp->pl_hcm);
 
     if (sp->sct_type != SCT_AIRPT && !player->god) {
     work = PLN_BLD_WORK(pp->pl_lcm, pp->pl_hcm);
 
     if (sp->sct_type != SCT_AIRPT && !player->god) {
@@ -714,21 +710,12 @@ build_btower(struct sctstr *sp)
     return 1;
 }
 
     return 1;
 }
 
-static void
-build_material_use(short mat[], short mat_100[], int effic)
-{
-    int i;
-
-    for (i = I_MAX; i > I_NONE; i--) {
-       mat[i] = mat_100[i] ? roundavg(mat_100[i] * (effic / 100.0)) : 0;
-    }
-}
-
 static int
 sector_can_build(struct sctstr *sp, short mat[], int work,
                 int effic, char *what)
 {
     int i, avail;
 static int
 sector_can_build(struct sctstr *sp, short mat[], int work,
                 int effic, char *what)
 {
     int i, avail;
+    double needed;
 
     if (sp->sct_effic < 60 && !player->god) {
        pr("Sector %s is not 60%% efficient.\n",
 
     if (sp->sct_effic < 60 && !player->god) {
        pr("Sector %s is not 60%% efficient.\n",
@@ -737,11 +724,13 @@ sector_can_build(struct sctstr *sp, short mat[], int work,
     }
 
     for (i = I_NONE + 1; i <= I_MAX; i++) {
     }
 
     for (i = I_NONE + 1; i <= I_MAX; i++) {
-       if (sp->sct_item[i] < mat[i]) {
+       needed = mat[i] * (effic / 100.0);
+       if (sp->sct_item[i] < needed) {
            pr("Not enough materials in %s\n",
               xyas(sp->sct_x, sp->sct_y, player->cnum));
            return 0;
        }
            pr("Not enough materials in %s\n",
               xyas(sp->sct_x, sp->sct_y, player->cnum));
            return 0;
        }
+       mat[i] = roundavg(needed);
     }
 
     avail = (work * effic + 99) / 100;
     }
 
     avail = (work * effic + 99) / 100;
index 75c97cd325e6af25d055a357b0a68937e426dad1..5fc6dc659cd67dc76ad57e38c48b842577a65e50 100644 (file)
@@ -10,8 +10,8 @@ owner xloc yloc des effic mobil off loyal terr0 terr1 terr2 terr3 dterr xdist yd
 0 -6 0 0 0 0 0 0 0 0 0 0 0 -6 0 0 0 0 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 0 -4 0 0 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 1 -2 0 5 100 127 0 0 0 0 0 0 0 -2 0 0 0 0 1 5 0 0 0 0 0 1 100 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 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 0 -6 0 0 0 0 0 0 0 0 0 0 0 -6 0 0 0 0 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 0 -4 0 0 0 0 0 0 0 0 0 0 0 -4 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 -1 1 13 100 122 0 0 0 0 0 0 0 -1 1 0 0 0 0 13 0 0 0 0 0 2 100 82 0 0 0 0 0 0 0 900 1992 1992 0 900 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 healthy 0 0 0 0 0 0 0 0
 3 0 2 13 100 127 0 0 0 0 0 0 0 0 2 0 0 0 0 13 0 0 0 0 0 3 100 90 0 0 0 0 0 0 0 900 1992 1992 0 900 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 healthy 0 0 0 0 0 0 0 0
 2 -3 1 5 100 127 0 0 0 0 0 0 0 -3 1 0 0 0 1 5 0 0 0 0 0 2 100 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 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 2 -1 1 13 100 122 0 0 0 0 0 0 0 -1 1 0 0 0 0 13 0 0 0 0 0 2 100 82 0 0 0 0 0 0 0 900 1992 1992 0 900 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 healthy 0 0 0 0 0 0 0 0
 3 0 2 13 100 127 0 0 0 0 0 0 0 0 2 0 0 0 0 13 0 0 0 0 0 3 100 90 0 0 0 0 0 0 0 900 1992 1992 0 900 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 healthy 0 0 0 0 0 0 0 0
-3 2 2 26 100 127 0 0 0 0 0 0 0 2 2 3 0 0 0 26 0 0 0 0 0 3 100 0 0 0 0 0 0 0 0 0 3 3 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 healthy 0 0 0 0 0 0 0 0
-3 4 2 26 60 127 0 0 0 0 0 0 0 4 2 7 0 0 0 26 0 0 0 0 0 3 100 0 0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 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 0 8 2 0 0 0 0 0 0 0 0 0 0 8 2 0 0 0 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 0 -10 2 0 0 0 0 0 0 0 0 0 0 -10 2 0 0 0 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
index 715838228cc94bcfedb434283e0f3b2ff3a08f5a..819a77eb646e09c071da3d1bac80f59ddca3bbba 100644 (file)
     Play#2 output Play#2 1 Thu Jan  1 00:00:00 1970
     Play#2 output Play#2 1 COMMODITIES deliver--  distribute
     Play#2 output Play#2 1   sect      sgpidbolhr sgpidbolhr  sh gun  pet iron dust bar  oil  lcm  hcm rad
     Play#2 output Play#2 1 Thu Jan  1 00:00:00 1970
     Play#2 output Play#2 1 COMMODITIES deliver--  distribute
     Play#2 output Play#2 1   sect      sgpidbolhr sgpidbolhr  sh gun  pet iron dust bar  oil  lcm  hcm rad
-    Play#2 output Play#2 1    1,1    * .......... ..........   0   0    0    0    0   0    0    3    4   0
-    Play#2 output Play#2 1    3,1    * .......... ..........   0   0    0    0    0   0    0    3    3   0
+    Play#2 output Play#2 1    1,1    * .......... ..........   0   0    0    0    0   0    0    2    2   0
+    Play#2 output Play#2 1    3,1    * .......... ..........   0   0    0    0    0   0    0    3    4   0
     Play#2 output Play#2 1    5,1    * .......... ..........   0   0    0    0    0   0  500  500  500 500
     Play#2 output Play#2 1 3 sectors
     Play#2 output Play#2 6 0 621
     Play#2 output Play#2 1    5,1    * .......... ..........   0   0    0    0    0   0  500  500  500 500
     Play#2 output Play#2 1 3 sectors
     Play#2 output Play#2 6 0 621
     Play#3 output Play#3 1 Thu Jan  1 00:00:00 1970
     Play#3 output Play#3 1 COMMODITIES deliver--  distribute
     Play#3 output Play#3 1   sect      sgpidbolhr sgpidbolhr  sh gun  pet iron dust bar  oil  lcm  hcm rad
     Play#3 output Play#3 1 Thu Jan  1 00:00:00 1970
     Play#3 output Play#3 1 COMMODITIES deliver--  distribute
     Play#3 output Play#3 1   sect      sgpidbolhr sgpidbolhr  sh gun  pet iron dust bar  oil  lcm  hcm rad
-    Play#3 output Play#3 1    2,2    ! .......... ..........   0   0    0    0    0   0    0    3    3   0
-    Play#3 output Play#3 1    4,2    ! .......... ..........   0   0    0    0    0   0    0    3    3   0
+    Play#3 output Play#3 1    2,2    ! .......... ..........   0   0    0    0    0   0    0    2    2   0
+    Play#3 output Play#3 1    4,2    ! .......... ..........   0   0    0    0    0   0    0    3    4   0
     Play#3 output Play#3 1    6,2    ! .......... ..........   0   0    0    0    0   0  500  500  500 500
     Play#3 output Play#3 1 3 sectors
     Play#3 output Play#3 6 0 624
     Play#3 output Play#3 1    6,2    ! .......... ..........   0   0    0    0    0   0  500  500  500 500
     Play#3 output Play#3 1 3 sectors
     Play#3 output Play#3 6 0 624
index 2f596c2b12d3a7889265883e08161cb02fbcfb64..e492edb5d37b41c9c2514fc45a2afd570fe0e7bb 100644 (file)
@@ -12,12 +12,8 @@ build p -1,1 f2 1 101
 build p -1,1 f2 1 79
 | not an airfield, no materials, inefficient
 build p -1,1 f2
 build p -1,1 f2 1 79
 | not an airfield, no materials, inefficient
 build p -1,1 f2
-| Note: fractional cms are randomly rounded, which can make build
-| succeed, upsetting the rest of the test
 build p 3:5,1 f2
 | insufficient materials: 1,1 short 1l/1h, 3,1 short 1m
 build p 3:5,1 f2
 | insufficient materials: 1,1 short 1l/1h, 3,1 short 1m
-| Note: fractional cms are randomly rounded, which can make build
-| succeed in 1,1, upsetting the rest of the test
 move m -1,1 1 jh
 move l -1,1 1 jjh
 move h -1,1 1 jjh
 move m -1,1 1 jh
 move l -1,1 1 jjh
 move h -1,1 1 jjh
index c516684b0345bfe0cbc26db448f8c222fcfcf3a6..5b761eb7f7bf42ebdc82a918d013bf9b48b7a8e5 100644 (file)
@@ -11,13 +11,9 @@ n
 build l 0,2 linf 1 101
 build l 0,2 linf 1 39
 | not an headquarters, no materials, inefficient
 build l 0,2 linf 1 101
 build l 0,2 linf 1 39
 | not an headquarters, no materials, inefficient
-| Note: fractional cms are randomly rounded, which can make build
-| succeed in 4,2, upsetting the rest of the test
 build l 0,2 linf
 build l 4:6,2 linf
 | insufficient materials: 2,2 short 1l, 4,2 short 1h
 build l 0,2 linf
 build l 4:6,2 linf
 | insufficient materials: 2,2 short 1l, 4,2 short 1h
-| Note: fractional cms are randomly rounded, which can make build
-| succeed in either sector, upsetting the rest of the test
 move l 0,2 1 jjh
 move h 0,2 1 jh
 build l 2:4,2 linf
 move l 0,2 1 jjh
 move h 0,2 1 jh
 build l 2:4,2 linf
index 23fecc5497ae45d99c673f5f92998c96245cbb3f..db7a9aa0f6de18176cc39eba6274764b315fae96 100644 (file)
@@ -677,7 +677,7 @@ owner xloc yloc des effic mobil off loyal terr0 terr1 terr2 terr3 dterr xdist yd
 1 5 -11 10 100 127 0 0 0 0 0 0 0 11 -11 0 93 100 0 10 100 0 0 0 100 1 1000 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
 1 7 -11 14 100 127 0 0 0 0 0 0 0 11 -11 657 79 100 1 14 91 0 0 0 68 1 1000 30 180 0 200 0 0 0 0 0 200 200 0 0 0 30 180 0 200 0 0 0 0 0 200 200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
 1 9 -11 21 100 127 0 0 0 0 0 0 0 11 -11 490 75 100 1 21 85 0 0 0 57 1 1000 0 0 0 0 0 10 0 0 50 100 0 0 0 0 0 0 0 0 0 10 0 0 50 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
 1 5 -11 10 100 127 0 0 0 0 0 0 0 11 -11 0 93 100 0 10 100 0 0 0 100 1 1000 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
 1 7 -11 14 100 127 0 0 0 0 0 0 0 11 -11 657 79 100 1 14 91 0 0 0 68 1 1000 30 180 0 200 0 0 0 0 0 200 200 0 0 0 30 180 0 200 0 0 0 0 0 200 200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
 1 9 -11 21 100 127 0 0 0 0 0 0 0 11 -11 490 75 100 1 21 85 0 0 0 57 1 1000 0 0 0 0 0 10 0 0 50 100 0 0 0 0 0 0 0 0 0 10 0 0 50 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
-1 11 -11 13 100 127 0 0 0 0 0 0 0 11 -11 667 71 100 1 13 78 0 0 0 45 1 1000 105 181 0 1226 2071 473 0 0 740 4113 4521 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 healthy 0 0 1 0 0 0 0 0
+1 11 -11 13 100 127 0 0 0 0 0 0 0 11 -11 667 71 100 1 13 78 0 0 0 45 1 1000 105 181 0 1226 2071 473 0 0 740 4114 4522 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 healthy 0 0 1 0 0 0 0 0
 1 13 -11 31 100 127 0 12 0 0 0 0 0 11 -11 649 64 100 1 31 67 0 0 0 25 1 967 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 healthy 0 0 1 0 0 0 0 0
 1 15 -11 26 100 127 0 0 0 0 0 0 0 11 -11 656 57 100 1 26 56 0 0 0 5 1 1000 25 200 17 0 0 0 0 0 0 200 200 0 0 0 25 200 25 0 0 0 0 0 0 200 200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
 0 17 -11 0 0 0 0 0 0 0 0 0 0 17 -11 0 -9 0 1 0 0 0 50 20 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
 1 13 -11 31 100 127 0 12 0 0 0 0 0 11 -11 649 64 100 1 31 67 0 0 0 25 1 967 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 healthy 0 0 1 0 0 0 0 0
 1 15 -11 26 100 127 0 0 0 0 0 0 0 11 -11 656 57 100 1 26 56 0 0 0 5 1 1000 25 200 17 0 0 0 0 0 0 200 200 0 0 0 25 200 25 0 0 0 0 0 0 200 200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 1 0 0 0 0 0
 0 17 -11 0 0 0 0 0 0 0 0 0 0 17 -11 0 -9 0 1 0 0 0 50 20 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 0 0 0 0 0
index 53a89af75ef6371debeed11a55f4fc7f8f81e8f7..0e7c67205e6e998758db40811be52461896498ec 100644 (file)
     Play#0 output Play#0 1
     Play#0 output Play#0 1          sects  eff civ  mil  shell gun pet  iron dust oil  pln ship unit money
     Play#0 output Play#0 1         1  33  100%  31K 210  514   22    0  9.1K 849  1.2K   3    5    4   46K
     Play#0 output Play#0 1
     Play#0 output Play#0 1          sects  eff civ  mil  shell gun pet  iron dust oil  pln ship unit money
     Play#0 output Play#0 1         1  33  100%  31K 210  514   22    0  9.1K 849  1.2K   3    5    4   46K
-    Play#0 output Play#0 1    639.34
+    Play#0 output Play#0 1    639.37
     Play#0 output Play#0 1         8  29   91%  25K 110  101    0    0   14K 2.8K 527    0    0    0   21K
     Play#0 output Play#0 1    329.62
     Play#0 output Play#0 1         2  30   28% 4.9K   0    0    0    0  1.7K 1.3K 170    0    0    0   35K
     Play#0 output Play#0 1         8  29   91%  25K 110  101    0    0   14K 2.8K 527    0    0    0   21K
     Play#0 output Play#0 1    329.62
     Play#0 output Play#0 1         2  30   28% 4.9K   0    0    0    0  1.7K 1.3K 170    0    0    0   35K
     Play#0 output Play#0 1  10 -11,-11  g .......... ..........   0   0    0    0  225   0    0    0    0   0
     Play#0 output Play#0 1   1   3,-11  i .......... 0......63.   1   0    0    0    0   0    0  600  300   0
     Play#0 output Play#0 1   1   5,-11  m .......... ...0......   0   0    0    1    0   0    0    0    0   0
     Play#0 output Play#0 1  10 -11,-11  g .......... ..........   0   0    0    0  225   0    0    0    0   0
     Play#0 output Play#0 1   1   3,-11  i .......... 0......63.   1   0    0    0    0   0    0  600  300   0
     Play#0 output Play#0 1   1   5,-11  m .......... ...0......   0   0    0    1    0   0    0    0    0   0
-    Play#0 output Play#0 1   1   7,-11  * .......... 1.2....22.   0   0    0    0    0   0    0  197  199   0
+    Play#0 output Play#0 1   1   7,-11  * .......... 1.2....22.   0   0    0    0    0   0    0  198  200   0
     Play#0 output Play#0 1   1   9,-11  r .......... ....0.01..   0   0    0    0   10   0   50  100    0   0
     Play#0 output Play#0 1   1  11,-11  w .......... .......... 273   0    0 2519  523   0  849 2514 3122   0
     Play#0 output Play#0 1   1  13,-11  e .......... ..........   0   0    0    0    0   0    0    0    0   0
     Play#0 output Play#0 1   1   9,-11  r .......... ....0.01..   0   0    0    0   10   0   50  100    0   0
     Play#0 output Play#0 1   1  11,-11  w .......... .......... 273   0    0 2519  523   0  849 2514 3122   0
     Play#0 output Play#0 1   1  13,-11  e .......... ..........   0   0    0    0    0   0    0    0    0   0
     Play#0 output Play#0 1
     Play#0 output Play#0 1          sects  eff civ  mil  shell gun pet  iron dust oil  pln ship unit money
     Play#0 output Play#0 1         1  33  100%  31K 232  659   30  994  8.9K 524  1.0K   3    5    4   51K
     Play#0 output Play#0 1
     Play#0 output Play#0 1          sects  eff civ  mil  shell gun pet  iron dust oil  pln ship unit money
     Play#0 output Play#0 1         1  33  100%  31K 232  659   30  994  8.9K 524  1.0K   3    5    4   51K
-    Play#0 output Play#0 1    756.23
+    Play#0 output Play#0 1    756.27
     Play#0 output Play#0 1         8  29  100%  29K 105  215    5    0   15K 2.5K 541    0    0    0   23K
     Play#0 output Play#0 1    447.37
     Play#0 output Play#0 1         2  30   33% 6.3K   0    0    0    0  3.2K 1.2K 523    0    0    0   36K
     Play#0 output Play#0 1         8  29  100%  29K 105  215    5    0   15K 2.5K 541    0    0    0   23K
     Play#0 output Play#0 1    447.37
     Play#0 output Play#0 1         2  30   33% 6.3K   0    0    0    0  3.2K 1.2K 523    0    0    0   36K
     Play#0 output Play#0 1   1   5,-11  m .......... ...0......   0   0    0    1    0   0    0    0    0   0
     Play#0 output Play#0 1   1   7,-11  * .......... 1.2....22. 180   0  200    0    0   0    0  200  200   0
     Play#0 output Play#0 1   1   9,-11  r .......... ....0.01..   0   0    0    0   10   0   50  100    0   0
     Play#0 output Play#0 1   1   5,-11  m .......... ...0......   0   0    0    1    0   0    0    0    0   0
     Play#0 output Play#0 1   1   7,-11  * .......... 1.2....22. 180   0  200    0    0   0    0  200  200   0
     Play#0 output Play#0 1   1   9,-11  r .......... ....0.01..   0   0    0    0   10   0   50  100    0   0
-    Play#0 output Play#0 1   1  11,-11  w .......... ..........  25   0  778 2295  498   0  828 3245 3775   0
+    Play#0 output Play#0 1   1  11,-11  w .......... ..........  25   0  778 2295  498   0  828 3246 3776   0
     Play#0 output Play#0 1   1  13,-11  e .......... ..........   0   0    0    0    0   0    0    0    0   0
     Play#0 output Play#0 1   1  15,-11  ! .......... 20.....22. 200  11    0    0    0   0    0  200  200   0
     Play#0 output Play#0 1   8  21,-11  p .......... .......0..   0   0    0    0    1   0    0   75    0   0
     Play#0 output Play#0 1   1  13,-11  e .......... ..........   0   0    0    0    0   0    0    0    0   0
     Play#0 output Play#0 1   1  15,-11  ! .......... 20.....22. 200  11    0    0    0   0    0  200  200   0
     Play#0 output Play#0 1   8  21,-11  p .......... .......0..   0   0    0    0    1   0    0   75    0   0