{
pr("%s %s\n", prnatid(plane->pln_own), prplane(plane));
pr("UID <U>: %d\t\t", plane->pln_uid);
+ pr("Type <T>: %s\n", plchr[plane->pln_type].pl_name);
pr("Owner <O>: %d\t\t", plane->pln_own);
pr("Location <l>: %s\n",
xyas(plane->pln_x, plane->pln_y, player->cnum));
print_land(struct lndstr *land)
{
pr("%s %s\n", prnatid(land->lnd_own), prland(land));
- pr("UID <U>: %d\n", land->lnd_uid);
+ pr("UID <U>: %d\t\t", land->lnd_uid);
+ pr("Type <T>: %s\n", lchr[land->lnd_type].l_name);
pr("Owner <O>: %d\n", land->lnd_own);
pr("Location <L>: %s\n", xyas(land->lnd_x, land->lnd_y, player->cnum));
pr("Efficiency <e>: %d\t", land->lnd_effic);
print_ship(struct shpstr *ship)
{
pr("%s %s\n", prnatid(ship->shp_own), prship(ship));
- pr("UID <U>: %d\n", ship->shp_uid);
+ pr("UID <U>: %d\t\t\t", ship->shp_uid);
+ pr("Type <t>: %s\n", mchr[ship->shp_type].m_name);
pr("Owner <O>: %d\t\t\t", ship->shp_own);
pr("Location <L>: %s\n", xyas(ship->shp_x, ship->shp_y, player->cnum));
pr("Tech <T>: %d\t\t\t", ship->shp_tech);
item[ip->i_uid] = arg;
}
+static void
+limit_item(struct empobj *unit, short item[], short lim[])
+{
+ i_type it;
+
+ for (it = I_NONE + 1; it <= I_MAX; it++) {
+ if (item[it] > lim[it])
+ edit_item(unit, item, &ichr[it], item[it], lim);
+ }
+}
+
static int
edit_ship(struct shpstr *ship, char *key, char *p)
{
case 'F':
return edit_unit((struct empobj *)ship, key, p,
SHIP_MINEFF, "fleet", 0);
+ case 't':
+ arg = ef_elt_byname(EF_SHIP_CHR, p);
+ if (arg < 0) {
+ pr("%s: invalid ship type\n", p);
+ return RET_FAIL;
+ }
+ divine_unit_change((struct empobj *)ship, "Type",
+ arg != ship->shp_type, 0,
+ "to %s", mchr[arg].m_name);
+ ship->shp_type = arg;
+ limit_item((struct empobj *)ship, ship->shp_item, mchr[arg].m_item);
+ if (ship->shp_tech >= mchr[arg].m_tech)
+ break;
+ arg = mchr[arg].m_tech;
+ /* fall through */
case 'T':
arg = LIMIT_TO(arg, mcp->m_tech, SHRT_MAX);
divine_unit_change((struct empobj *)ship, "Tech level",
return edit_unit((struct empobj *)land, key, p,
LAND_MINEFF, "army",
land->lnd_ship >= 0 || land->lnd_land >= 0);
+ case 'T':
+ arg = ef_elt_byname(EF_LAND_CHR, p);
+ if (arg < 0) {
+ pr("%s: invalid land unit type\n", p);
+ return RET_FAIL;
+ }
+ divine_unit_change((struct empobj *)land, "Type",
+ arg != land->lnd_type, 0,
+ "to %s", lchr[arg].l_name);
+ land->lnd_type = arg;
+ limit_item((struct empobj *)land, land->lnd_item, lchr[arg].l_item);
+ if (land->lnd_tech >= lchr[arg].l_tech)
+ break;
+ arg = lchr[arg].l_tech;
+ /* fall through */
case 't':
arg = LIMIT_TO(arg, lcp->l_tech, SHRT_MAX);
divine_unit_change((struct empobj *)land, "Tech level",
return edit_unit((struct empobj *)plane, key, p,
PLANE_MINEFF, "wing",
plane->pln_ship >= 0 || plane->pln_land >= 0);
+ case 'T':
+ arg = ef_elt_byname(EF_PLANE_CHR, p);
+ if (arg < 0) {
+ pr("%s: invalid plane type\n", p);
+ return RET_FAIL;
+ }
+ divine_unit_change((struct empobj *)plane, "Type",
+ arg != plane->pln_type, 0,
+ "to %s", plchr[arg].pl_name);
+ plane->pln_type = arg;
+ if (plane->pln_tech >= plchr[arg].pl_tech)
+ break;
+ arg = plchr[arg].pl_tech;
+ /* fall through */
case 't':
arg = LIMIT_TO(arg, pcp->pl_tech, SHRT_MAX);
divine_unit_change((struct empobj *)plane, "Tech level",
3 3 1 -1 2 20 -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 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 0 0 "" 3 "" 1 -1 3 (injured) "jj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"" 0 0 0 () ""
3 3 1 -1 0 10 -127 0 50 0 0 none 0 "a" 0 0 3 -1 () 0 0.00000
4 3 3 -1 0 100 127 0 32767 0 0 none 0 "" 18 0 -1 4 () 0 0.00000
5 3 1 -1 0 100 127 0 32767 0 0 none 0 "" 18 0 -1 -1 () 0 0.00000
-6 0 0 0 0 0 0 0 0 0 0 none 0 "" 0 0 -1 -1 () 0 0.00000
+6 1 0 0 9 10 0 0 90 0 0 none 0 "" 0 0 -1 -1 () 0 0.00000
7 0 0 0 0 0 0 0 0 0 0 none 0 "" 0 0 -1 -1 () 0 0.00000
8 0 0 0 0 0 0 0 0 0 0 none 0 "" 0 0 -1 -1 () 0 0.00000
9 0 0 0 0 0 0 0 0 0 0 none 0 "" 0 0 -1 -1 () 0 0.00000
3 3 1 -1 6 10 -127 0 50 0 0 none 0 "a" 3 0 0 (injured) "jj" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
4 3 3 -1 6 100 127 0 32767 0 0 none 0 "" 2 127 100 () "" 0 25 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
5 3 1 -1 6 100 127 0 32767 0 0 none 0 "" -1 127 100 () "" 0 25 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
-6 0 0 0 0 0 0 0 0 0 0 none 0 "" -1 0 0 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
+6 1 0 0 11 10 0 0 100 0 0 none 0 "" -1 0 0 () "" 0 0 0 10 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
7 0 0 0 0 0 0 0 0 0 0 none 0 "" -1 0 0 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
8 0 0 0 0 0 0 0 0 0 0 none 0 "" -1 0 0 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
9 0 0 0 0 0 0 0 0 0 0 none 0 "" -1 0 0 () "" 0 0 0 0 0 0 0 0 0 0 0 0 0 0 healthy 0 -1 0
0 44 1 32 0 0
0 43 2 5 0 0
0 44 3 22 0 0
-0 43 1 73 0 0
-0 42 1 4 0 0
-1 45 0 1 0 0
+0 43 1 79 0 0
+0 42 1 6 0 0
+1 45 0 3 0 0
0 43 3 33 0 0
0 44 2 6 0 0
0 42 3 4 0 0
edit($ef, 3, $key, '1,-1');
}
+# ship: type
+edit('ship', 6, 't', 'lc', 'O', 1, 't', 'lc', 't', 'hc', 'g', 8, 't', 'lc');
+
# ship: effic mobil tech pstage ptime milit
edit_int('ship', 2, (
['E', 0, 100],
['m', 0, 50],
));
+# plane: type
+edit('plane', 6, 'T', 'mb', 'O', 1, 'T', 'mb', 'T', 'hb', 'T', 'mb');
+
# plane: effic mobil range tech
edit_int('plane', 2, (
['e', 0, 100],
['t', 50, 32767],
));
+# land: type
+edit('land', 6, 'T', 'art', 'O', 1, 'T', 'art', 'T', 'hat', 'g', 12,
+ 'T', 'art');
+
# land: effic mobil tech harden retreat milit
edit_int('land', 2, (
['e', 0, 100],
Play#0 command edit
Play#0 output Play#0 1 Location of sup supply #3 changed from 1,-1 to 1,-1
Play#0 output Play#0 6 0 640
+ Play#0 input edit s 6 t lc O 1 t lc t hc g 8 t lc
+ Play#0 command edit
+ Play#0 output Play#0 1 Type of fb fishing boat (#6) changed to lc light cruiser
+ Play#0 output Play#0 1 Tech level of lc light cruiser (#6) changed from 0 to 45
+ Play#0 output Play#0 1 Owner of lc light cruiser (#6) changed from POGO (#0) to 1 (#1)
+ Play#0 output Play#0 1 Efficiency of lc light cruiser (#6) changed from 0 to 20
+ Play#0 output Play#0 1 Type of lc light cruiser (#6) unchanged
+ Play#0 output Play#0 1 Type of lc light cruiser (#6) changed to hc heavy cruiser
+ Play#0 output Play#0 1 Tech level of hc heavy cruiser (#6) changed from 45 to 50
+ Play#0 output Play#0 1 guns of hc heavy cruiser (#6) changed from 0 to 8
+ Play#0 output Play#0 1 Type of hc heavy cruiser (#6) changed to lc light cruiser
+ Play#0 output Play#0 1 guns of lc light cruiser (#6) changed from 8 to 5
+ Play#0 output Play#0 6 0 640
Play#0 input edit s 2 E 0
Play#0 command edit
Play#0 output Play#0 1 Efficiency of cs cargo ship (#2) unchanged
Play#0 command edit
Play#0 output Play#0 1 military of cs cargo ship (#5) changed from 0 to 50
Play#0 output Play#0 6 0 640
+ Play#0 input edit p 6 T mb O 1 T mb T hb T mb
+ Play#0 command edit
+ Play#0 output Play#0 1 Type of f1 Sopwith Camel #6 changed to mb medium bomber
+ Play#0 output Play#0 1 Tech level of mb medium bomber #6 changed from 0 to 80
+ Play#0 output Play#0 1 Owner of mb medium bomber #6 changed from POGO (#0) to 1 (#1)
+ Play#0 output Play#0 1 Efficiency of mb medium bomber #6 changed from 0 to 10
+ Play#0 output Play#0 1 Type of mb medium bomber #6 unchanged
+ Play#0 output Play#0 1 Type of mb medium bomber #6 changed to hb B-26B Marauder
+ Play#0 output Play#0 1 Tech level of hb B-26B Marauder #6 changed from 80 to 90
+ Play#0 output Play#0 1 Type of hb B-26B Marauder #6 changed to mb medium bomber
+ Play#0 output Play#0 6 0 640
Play#0 input edit p 2 e 0
Play#0 command edit
Play#0 output Play#0 1 Efficiency of f1 Sopwith Camel #2 unchanged
Play#0 command edit
Play#0 output Play#0 1 Tech level of f1 Sopwith Camel #5 changed from 100 to 32767
Play#0 output Play#0 6 0 640
+ Play#0 input edit u 6 T art O 1 T art T hat g 12 T art
+ Play#0 command edit
+ Play#0 output Play#0 1 Type of cav cavalry #6 changed to art artillery
+ Play#0 output Play#0 1 Tech level of art artillery #6 changed from 0 to 35
+ Play#0 output Play#0 1 Owner of art artillery #6 changed from POGO (#0) to 1 (#1)
+ Play#0 output Play#0 1 Efficiency of art artillery #6 changed from 0 to 10
+ Play#0 output Play#0 1 Type of art artillery #6 unchanged
+ Play#0 output Play#0 1 Type of art artillery #6 changed to hat hvy artillery
+ Play#0 output Play#0 1 Tech level of hat hvy artillery #6 changed from 35 to 100
+ Play#0 output Play#0 1 guns of hat hvy artillery #6 changed from 0 to 12
+ Play#0 output Play#0 1 Type of hat hvy artillery #6 changed to art artillery
+ Play#0 output Play#0 1 guns of art artillery #6 changed from 12 to 10
+ Play#0 output Play#0 6 0 640
Play#0 input edit u 2 e 0
Play#0 command edit
Play#0 output Play#0 1 Efficiency of sup supply #2 unchanged
Play#0 input edit s 0
Play#0 command edit
Play#0 output Play#0 1 POGO (#0) cs cargo ship (#0)
- Play#0 output Play#0 1 UID <U>: 0
+ Play#0 output Play#0 1 UID <U>: 0 Type <t>: cs cargo ship
Play#0 output Play#0 1 Owner <O>: 0 Location <L>: 1,-1
Play#0 output Play#0 1 Tech <T>: 100 Efficiency <E>: 0
Play#0 output Play#0 1 Mobility <M>: 0 Fleet <F>:
Play#0 input edit s 0
Play#0 command edit
Play#0 output Play#0 1 POGO (#0) cs cargo ship (#0)
- Play#0 output Play#0 1 UID <U>: 0
+ Play#0 output Play#0 1 UID <U>: 0 Type <t>: cs cargo ship
Play#0 output Play#0 1 Owner <O>: 0 Location <L>: 1,-1
Play#0 output Play#0 1 Tech <T>: 100 Efficiency <E>: 0
Play#0 output Play#0 1 Mobility <M>: 2 Fleet <F>:
Play#0 input edit p 0
Play#0 command edit
Play#0 output Play#0 1 POGO (#0) f1 Sopwith Camel #0
- Play#0 output Play#0 1 UID <U>: 0 Owner <O>: 0 Location <l>: 1,-1
+ Play#0 output Play#0 1 UID <U>: 0 Type <T>: f1 Sopwith Camel
+ Play#0 output Play#0 1 Owner <O>: 0 Location <l>: 1,-1
Play#0 output Play#0 1 Efficiency <e>: 0 Mobility <m>: 0
Play#0 output Play#0 1 Tech <t>: 100 Wing <w>:
Play#0 output Play#0 1 Range <r>: 9 Flags <f>: 0
Play#0 input edit u 0
Play#0 command edit
Play#0 output Play#0 1 POGO (#0) sup supply #0
- Play#0 output Play#0 1 UID <U>: 0
+ Play#0 output Play#0 1 UID <U>: 0 Type <T>: sup supply
Play#0 output Play#0 1 Owner <O>: 0
Play#0 output Play#0 1 Location <L>: 1,-1
Play#0 output Play#0 1 Efficiency <e>: 0 Mobility <M>: 0
Play#0 output Play#0 1 POGO gave you 1 civilians in 8,6
Play#0 output Play#0 1 POGO gave you 9997 civilians in 6,6
Play#0 output Play#0 1 POGO stole 1 civilians from 8,6
+ Play#0 output Play#0 1 lc light cruiser (#6) given to you by an act of POGO!
+ Play#0 output Play#0 1 Type of lc light cruiser (#6) changed to hc heavy cruiser by an act of POGO
+ Play#0 output Play#0 1 Tech level of hc heavy cruiser (#6) changed from 45 to 50 by an act of POGO
+ Play#0 output Play#0 1 POGO gave you 8 guns in hc heavy cruiser (#6)
+ Play#0 output Play#0 1 Type of hc heavy cruiser (#6) changed to lc light cruiser by an act of POGO
+ Play#0 output Play#0 1 POGO stole 3 guns from lc light cruiser (#6)
+ Play#0 output Play#0 1 mb medium bomber #6 given to you by an act of POGO!
+ Play#0 output Play#0 1 Type of mb medium bomber #6 changed to hb B-26B Marauder by an act of POGO
+ Play#0 output Play#0 1 Tech level of hb B-26B Marauder #6 changed from 80 to 90 by an act of POGO
+ Play#0 output Play#0 1 Type of hb B-26B Marauder #6 changed to mb medium bomber by an act of POGO
+ Play#0 output Play#0 1 art artillery #6 given to you by an act of POGO!
+ Play#0 output Play#0 1 Type of art artillery #6 changed to hat hvy artillery by an act of POGO
+ Play#0 output Play#0 1 Tech level of hat hvy artillery #6 changed from 35 to 100 by an act of POGO
+ Play#0 output Play#0 1 POGO gave you 12 guns in hat hvy artillery #6
+ Play#0 output Play#0 1 Type of hat hvy artillery #6 changed to art artillery by an act of POGO
+ Play#0 output Play#0 1 POGO stole 2 guns from art artillery #6
Play#0 output Play#0 1 Money changed from 0 to -2147483648 by an act of POGO!
Play#0 output Play#0 1 Technology changed from 0.00 to 3.14 by an act of POGO!
Play#0 output Play#0 1 Research changed from 0.00 to 3.14 by an act of POGO!