Land units loaded on land units fight che again
They didn't since commit 93d033cf
, v4.3.26. Drawback: micromanagement
incentive to unload them for the update. Similar incentive has always
existed for military on ships.
Since the previous commit, land units loaded on land units get
unloaded when the carrier dies fighting che. Such land units get
stuck in the sector if the take over, and can be boarded. Doesn't
feel right, and increases the micromanagement incentive. Avoid by
letting them fight.
This commit is contained in:
parent
7aba25e826
commit
91c2ecec53
1 changed files with 12 additions and 6 deletions
|
@ -162,7 +162,7 @@ guerrilla(struct sctstr *sp)
|
|||
while (NULL != (lp = nxtitemp(&ni))) {
|
||||
if (lp->lnd_own != sp->sct_own)
|
||||
continue;
|
||||
if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
|
||||
if (lp->lnd_ship >= 0)
|
||||
continue;
|
||||
|
||||
mil += lp->lnd_item[I_MILIT];
|
||||
|
@ -440,7 +440,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
while (NULL != (lp = nxtitemp(&ni))) {
|
||||
if (lp->lnd_own != sp->sct_own)
|
||||
continue;
|
||||
if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
|
||||
if (lp->lnd_ship >= 0)
|
||||
continue;
|
||||
nunits++;
|
||||
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
|
||||
|
@ -457,7 +457,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
while (NULL != (lp = nxtitemp(&ni))) {
|
||||
if (lp->lnd_own != sp->sct_own)
|
||||
continue;
|
||||
if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
|
||||
if (lp->lnd_ship >= 0)
|
||||
continue;
|
||||
if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
|
||||
continue;
|
||||
|
@ -486,7 +486,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
while (NULL != (lp = nxtitemp(&ni))) {
|
||||
if (lp->lnd_own != sp->sct_own)
|
||||
continue;
|
||||
if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
|
||||
if (lp->lnd_ship >= 0)
|
||||
continue;
|
||||
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
|
||||
continue;
|
||||
|
@ -516,7 +516,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
while (NULL != (lp = nxtitemp(&ni))) {
|
||||
if (lp->lnd_own != sp->sct_own)
|
||||
continue;
|
||||
if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
|
||||
if (lp->lnd_ship >= 0)
|
||||
continue;
|
||||
if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
|
||||
continue;
|
||||
|
@ -533,7 +533,7 @@ take_casualties(struct sctstr *sp, int mc)
|
|||
while (NULL != (lp = nxtitemp(&ni))) {
|
||||
if (lp->lnd_own != sp->sct_own)
|
||||
continue;
|
||||
if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
|
||||
if (lp->lnd_ship >= 0)
|
||||
continue;
|
||||
if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
|
||||
continue;
|
||||
|
@ -562,6 +562,12 @@ lnd_dies_fighting_che(struct lndstr *lp)
|
|||
makelost(EF_LAND, lp->lnd_own, lp->lnd_uid, lp->lnd_x, lp->lnd_y);
|
||||
lp->lnd_own = 0;
|
||||
|
||||
/* Take dead lp off its carrier */
|
||||
if (lp->lnd_land >= 0) {
|
||||
lnd_carrier_change(lp, EF_LAND, lp->lnd_land, -1);
|
||||
lp->lnd_land = -1;
|
||||
}
|
||||
|
||||
/* Unload lp's land unit cargo */
|
||||
for (i = lnd_first_on_land(lp); i >= 0; i = lnd_next_on_unit(i)) {
|
||||
clp = getlandp(i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue