forked from github/server
- stooopider fehler in FAHRE (Neu-AW)
- Bauernmobs benennen
This commit is contained in:
parent
d1f42fa634
commit
51614d2eb4
|
@ -1720,65 +1720,65 @@ kapitaen(region * r, ship * sh)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Segeln, Wandern, Reiten
|
/* Segeln, Wandern, Reiten
|
||||||
* when this routine returns a non-zero value, movement for the region needs
|
* when this routine returns a non-zero value, movement for the region needs
|
||||||
* to be done again because of followers that got new MOVE orders.
|
* to be done again because of followers that got new MOVE orders.
|
||||||
* Setting FL_LONGACTION will prevent a unit from being handled more than once
|
* Setting FL_LONGACTION will prevent a unit from being handled more than once
|
||||||
* by this routine
|
* by this routine
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
move(region * r, unit * u, boolean move_on_land)
|
move(region * r, unit * u, boolean move_on_land)
|
||||||
{
|
{
|
||||||
region *r2;
|
region *r2;
|
||||||
direction_t * route;
|
direction_t * route;
|
||||||
|
|
||||||
r2 = movewhere(r, u);
|
r2 = movewhere(r, u);
|
||||||
|
|
||||||
if (!r2) {
|
if (!r2) {
|
||||||
cmistake(u, findorder(u, u->thisorder), 71, MSG_MOVE);
|
cmistake(u, findorder(u, u->thisorder), 71, MSG_MOVE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (u->ship && fval(u, UFL_OWNER))
|
else if (u->ship && fval(u, UFL_OWNER))
|
||||||
route = sail(r, u, r2, move_on_land);
|
route = sail(r, u, r2, move_on_land);
|
||||||
else
|
else
|
||||||
route = travel(r, u, r2, 0);
|
route = travel(r, u, r2, 0);
|
||||||
|
|
||||||
if (i_get(u->items, &it_demonseye)) {
|
if (i_get(u->items, &it_demonseye)) {
|
||||||
direction_t d;
|
direction_t d;
|
||||||
for (d=0;d!=MAXDIRECTIONS;++d) {
|
for (d=0;d!=MAXDIRECTIONS;++d) {
|
||||||
region * rc = rconnect(r2,d);
|
region * rc = rconnect(r2,d);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
sprintf(buf, "Im %s ist eine ungeheure magische Präsenz zu verspüren.",
|
sprintf(buf, "Im %s ist eine ungeheure magische Präsenz zu verspüren.",
|
||||||
locale_string(u->faction->locale, directions[back[d]]));
|
locale_string(u->faction->locale, directions[back[d]]));
|
||||||
addmessage(rc, NULL, buf, MSG_EVENT, ML_IMPORTANT);
|
addmessage(rc, NULL, buf, MSG_EVENT, ML_IMPORTANT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u->region!=r) fset(u, UFL_LONGACTION);
|
if (u->region!=r) fset(u, UFL_LONGACTION);
|
||||||
set_string(&u->thisorder, "");
|
set_string(&u->thisorder, "");
|
||||||
|
|
||||||
if (fval(u, UFL_FOLLOWED) && route && route[0]!=NODIRECTION) {
|
if (fval(u, UFL_FOLLOWED) && route && route[0]!=NODIRECTION) {
|
||||||
int followers = 0;
|
int followers = 0;
|
||||||
unit *up;
|
unit *up;
|
||||||
for (up=r->units;up;up=up->next) {
|
for (up=r->units;up;up=up->next) {
|
||||||
if (fval(up, UFL_FOLLOWING) && !fval(up, UFL_LONGACTION)) {
|
if (fval(up, UFL_FOLLOWING) && !fval(up, UFL_LONGACTION)) {
|
||||||
const attrib * a = a_findc(up->attribs, &at_follow);
|
const attrib * a = a_findc(up->attribs, &at_follow);
|
||||||
if (a && a->data.v==u) {
|
if (a && a->data.v==u) {
|
||||||
/* wir basteln ihm ein NACH */
|
/* wir basteln ihm ein NACH */
|
||||||
int k, i = 0;
|
int k, i = 0;
|
||||||
strcpy(buf, locale_string(up->faction->locale, keywords[K_MOVE]));
|
strcpy(buf, locale_string(up->faction->locale, keywords[K_MOVE]));
|
||||||
while (route[i]!=NODIRECTION)
|
while (route[i]!=NODIRECTION)
|
||||||
strcat(strcat(buf, " "), locale_string(up->faction->locale, directions[route[i++]]));
|
strcat(strcat(buf, " "), locale_string(up->faction->locale, directions[route[i++]]));
|
||||||
set_string(&up->thisorder, buf);
|
set_string(&up->thisorder, buf);
|
||||||
k = igetkeyword(up->thisorder, up->faction->locale);
|
k = igetkeyword(up->thisorder, up->faction->locale);
|
||||||
assert(k==K_MOVE);
|
assert(k==K_MOVE);
|
||||||
++followers;
|
++followers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return followers;
|
return followers;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct piracy_data {
|
typedef struct piracy_data {
|
||||||
|
@ -2235,7 +2235,7 @@ movement(void)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*up==u) {
|
if (u->region==r) {
|
||||||
/* not moved, use next unit */
|
/* not moved, use next unit */
|
||||||
up = &u->next;
|
up = &u->next;
|
||||||
} else if (*up && (*up)->region!=r) {
|
} else if (*up && (*up)->region!=r) {
|
||||||
|
|
|
@ -4245,6 +4245,7 @@ sp_raisepeasantmob(castorder *co)
|
||||||
assert(rpeasants(r) >= 0);
|
assert(rpeasants(r) >= 0);
|
||||||
|
|
||||||
u = createunit(r, findfaction(MONSTER_FACTION), n, new_race[RC_PEASANT]);
|
u = createunit(r, findfaction(MONSTER_FACTION), n, new_race[RC_PEASANT]);
|
||||||
|
set_string(&u->name, "Aufgebrachte Bauern");
|
||||||
guard(u, GUARD_ALL);
|
guard(u, GUARD_ALL);
|
||||||
a = a_new(&at_unitdissolve);
|
a = a_new(&at_unitdissolve);
|
||||||
a->data.ca[0] = 1; /* An rpeasants(r). */
|
a->data.ca[0] = 1; /* An rpeasants(r). */
|
||||||
|
@ -4897,6 +4898,7 @@ sp_raisepeasants(castorder *co)
|
||||||
rsetpeasants(r, rpeasants(r) - bauern);
|
rsetpeasants(r, rpeasants(r) - bauern);
|
||||||
|
|
||||||
u2 = create_unit(r,mage->faction, bauern, new_race[RC_PEASANT], 0,"Wilder Bauernmob",mage);
|
u2 = create_unit(r,mage->faction, bauern, new_race[RC_PEASANT], 0,"Wilder Bauernmob",mage);
|
||||||
|
set_string(&u2->name, "Erzürnte Bauern");
|
||||||
|
|
||||||
fset(u2, UFL_LOCKED);
|
fset(u2, UFL_LOCKED);
|
||||||
fset(u2, UFL_PARTEITARNUNG);
|
fset(u2, UFL_PARTEITARNUNG);
|
||||||
|
|
Loading…
Reference in New Issue