From ab4eaabc09b7c2dc54ef262625d4e6153b4ab8d2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 24 Jun 2005 19:27:35 +0000 Subject: [PATCH] http://eressea.upb.de/mantis/view.php?id=570 Angriffe von Schiffen aus nur verbieten, wenn die Region bewacht wird. --- src/common/kernel/battle.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index b3e323e46..f8faff2fa 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -3598,17 +3598,19 @@ init_battle(region * r, battle **bp) continue; } - /* Fehler: "Das Schiff muß erst verlassen werden" */ - if (u->ship != NULL && rterrain(r) != T_OCEAN) { - cmistake(u, ord, 19, MSG_BATTLE); - continue; - } - if (leftship(u)) { - cmistake(u, ord, 234, MSG_BATTLE); - continue; - } + if (is_guarded(r, u, GUARD_TRAVELTHRU)) { + /* Fehler: "Das Schiff muß erst verlassen werden" */ + if (u->ship != NULL && rterrain(r) != T_OCEAN) { + cmistake(u, ord, 19, MSG_BATTLE); + continue; + } + if (leftship(u)) { + cmistake(u, ord, 234, MSG_BATTLE); + continue; + } + } /* Ende Fehlerbehandlung Angreifer */