From 9725e09309c5c0ffc264dbb5344b12f330d822dd Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 16 Apr 2005 11:24:50 +0000 Subject: [PATCH] =?UTF-8?q?Delphine=20u.a.=20k=C3=B6nnen=20wieder=20in=20K?= =?UTF-8?q?=C3=BCstenregionen=20einschwimmen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/kernel/movement.c | 6 +++--- src/common/kernel/race.h | 1 + src/common/kernel/xmlreader.c | 1 + src/res/races.xml | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/common/kernel/movement.c b/src/common/kernel/movement.c index 7b4a14636..a88cdc186 100644 --- a/src/common/kernel/movement.c +++ b/src/common/kernel/movement.c @@ -1219,10 +1219,10 @@ travel_route(unit * u, region_list * route_begin, region_list * route_end, order * aquarian special, flying units, horses, the works */ if ((u->race->flags & RCF_FLY) == 0) { if (rterrain(current)==T_OCEAN && rterrain(next) != T_OCEAN) { - int moving = u->race->flags & (RCF_SWIM|RCF_WALK); + int moving = u->race->flags & (RCF_SWIM|RCF_WALK|RCF_COASTAL); /* Die Einheit kann nicht fliegen, ist im Ozean, und will an Land */ - if (moving != (RCF_SWIM|RCF_WALK) && old_race(u->race) != RC_AQUARIAN) { - /* can't swim+walk and isn't an aquarian */ + if (moving != (RCF_SWIM|RCF_WALK) && (moving|RCF_COASTAL)==0) { + /* can't swim+walk and isn't allowed to enter coast from sea */ if (ord!=NULL) cmistake(u, ord, 44, MSG_MOVE); break; } diff --git a/src/common/kernel/race.h b/src/common/kernel/race.h index 7a52c9006..9156078c8 100644 --- a/src/common/kernel/race.h +++ b/src/common/kernel/race.h @@ -132,6 +132,7 @@ extern int rc_specialdamage(const race *, const race *, const struct weapon_type #define RCF_SHAPESHIFTANY (1<<19) /* Kann TARNE RASSE "string" benutzen. */ #define RCF_UNDEAD (1<<20) /* Undead. */ #define RCF_DRAGON (1<<21) /* Drachenart (für Zauber)*/ +#define RCF_COASTAL (1<<22) /* kann in Landregionen an der Küste sein */ /* Economic flags */ #define NOGIVE (1<<0) /* gibt niemals nix */ diff --git a/src/common/kernel/xmlreader.c b/src/common/kernel/xmlreader.c index 6d9ffb5e8..90987dd70 100644 --- a/src/common/kernel/xmlreader.c +++ b/src/common/kernel/xmlreader.c @@ -807,6 +807,7 @@ parse_races(xmlDocPtr doc) if (xml_bvalue(node, "scarepeasants", false)) rc->flags |= RCF_SCAREPEASANTS; if (xml_bvalue(node, "cannotmove", false)) rc->flags |= RCF_CANNOTMOVE; if (xml_bvalue(node, "fly", false)) rc->flags |= RCF_FLY; + if (xml_bvalue(node, "coastal", false)) rc->flags |= RCF_COASTAL; if (xml_bvalue(node, "swim", false)) rc->flags |= RCF_SWIM; if (xml_bvalue(node, "walk", false)) rc->flags |= RCF_WALK; if (xml_bvalue(node, "nolearn", false)) rc->flags |= RCF_NOLEARN; diff --git a/src/res/races.xml b/src/res/races.xml index d9caff906..aa4db0805 100644 --- a/src/res/races.xml +++ b/src/res/races.xml @@ -1,6 +1,6 @@ - + @@ -34,7 +34,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -722,7 +722,7 @@ - +