]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/revolt.c
Don't let embarked land units fight a che revolt
[empserver] / src / lib / update / revolt.c
index f8aef8dc0d06aed411848385b2fffa781bf6117e..dfc9029e1af058d17c0eb96a4a66fa002ff88a9e 100644 (file)
@@ -164,6 +164,8 @@ 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)
+           continue;
 
        mil += lp->lnd_item[I_MILIT];
 
@@ -441,6 +443,8 @@ 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)
+           continue;
        nunits++;
        if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
            nunits++;
@@ -456,6 +460,8 @@ 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)
+           continue;
        if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
            continue;
 
@@ -483,6 +489,8 @@ 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)
+           continue;
        if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
            continue;
 
@@ -511,6 +519,8 @@ 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)
+           continue;
        if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
            continue;
 
@@ -531,6 +541,8 @@ 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)
+           continue;
        if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
            continue;