lboard: Don't permit boarding of embarked land units
You can board land units loaded on a ship or land unit. This makes no sense. Reject attempts to board land units on a ship or land unit exactly like attempts to board land units that don't exist. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
2315b50e52
commit
4c21c69acc
1 changed files with 2 additions and 1 deletions
|
@ -188,7 +188,8 @@ att_get_combat(struct combat *com, int isdef)
|
||||||
y = com->y;
|
y = com->y;
|
||||||
break;
|
break;
|
||||||
case EF_LAND:
|
case EF_LAND:
|
||||||
if (!getland(com->lnd_uid, &land) || !land.lnd_own) {
|
if (!getland(com->lnd_uid, &land) || !land.lnd_own
|
||||||
|
|| land.lnd_ship >= 0 || land.lnd_land >= 0) {
|
||||||
if (isdef)
|
if (isdef)
|
||||||
pr("Land unit #%d is not in the same sector!\n",
|
pr("Land unit #%d is not in the same sector!\n",
|
||||||
com->lnd_uid);
|
com->lnd_uid);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue