};
/* Land unit ability flags */
-#define L_XLIGHT bit(0) /* Hold xlight planes */
#define L_ENGINEER bit(1) /* Do engineering things */
#define L_SUPPLY bit(2) /* supply other units/sects */
#define L_SECURITY bit(3) /* anti-terrorist troops */
s_char prompt[512];
s_char buf[1024];
- if (!(lchr[(int)lp->lnd_type].l_flags & L_XLIGHT)) {
+ if (!lp->lnd_maxlight) {
if (noisy)
pr("%s cannot carry extra-light planes.\n", prland(lp));
return 0;
"tra train",
100, 50, 0, 0, 0, 40, 3500,
0.0, 0.0, 120, 10, 25, 3, 0, 0, 0, 0, 0, 0, 0, 0, 5, 12,
- L_XLIGHT | L_TRAIN | L_HEAVY | L_SUPPLY,
+ L_TRAIN | L_HEAVY | L_SUPPLY,
},
{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
"rad radar unit",
10, 5, 0, 0, 0, 270, 1000,
0.0, 0.0, 50, 33, 15, 3, 0, 0, 0, 0, 0, 2, 25, 2, 1, 0,
- L_XLIGHT | L_RADAR | L_LIGHT,
+ L_RADAR | L_LIGHT,
},
/* name
};
struct symbol land_chr_flags[] = {
- {L_XLIGHT, "xlight"},
{L_ENGINEER, "engineer"},
{L_SUPPLY, "supply"},
{L_SECURITY, "security"},
struct lndstr land;
struct plchrstr *pcp;
struct mchrstr *scp;
- struct lchrstr *lcp;
getplane(p, &plane);
pcp = &plchr[(int)plane.pln_type];
return 0;
getland(plane.pln_land, &land);
- lcp = &lchr[(int)land.lnd_type];
- if ((pcp->pl_flags & P_E) && (lcp->l_flags & L_XLIGHT)) {
+ if ((pcp->pl_flags & P_E) && land.lnd_maxlight) {
return 1;
}
}
take_plane_off_land(struct plnstr *plane, struct lndstr *land)
{
struct plchrstr *pcp;
- struct lchrstr *lcp;
pcp = &plchr[(int)plane->pln_type];
- lcp = &lchr[(int)land->lnd_type];
/* Try to take off ship as an xlight plane */
- if ((pcp->pl_flags & P_E) &&
- (lcp->l_flags & L_XLIGHT) && (land->lnd_nxlight)) {
+ if ((pcp->pl_flags & P_E) && land->lnd_nxlight) {
land->lnd_nxlight--;
plane->pln_land = -1;
put_plane_on_land(struct plnstr *plane, struct lndstr *land)
{
struct plchrstr *pcp;
- struct lchrstr *lcp;
pcp = &plchr[(int)plane->pln_type];
- lcp = &lchr[(int)land->lnd_type];
if (((int)plane->pln_land) == ((int)land->lnd_uid))
return 1; /* Already on unit */
/* Try to put on unit as an xlight plane */
if ((pcp->pl_flags & P_E) &&
- (lcp->l_flags & L_XLIGHT) &&
- (land->lnd_nxlight < lcp->l_nxlight)) {
+ (land->lnd_nxlight < land->lnd_maxlight)) {
land->lnd_nxlight++;
plane->pln_x = land->lnd_x;