forked from github/server
BEWACHE nach "langen" Kampf nicht möglich; Fehlermeldungen nach "langen" Kampf Noch ein Flag eingeführt. Hoffe, dass das klappt.
This commit is contained in:
parent
a14d57f32d
commit
3145295ad4
|
@ -3076,7 +3076,7 @@ produce(void)
|
|||
!is_cursed(u->attribs, C_KAELTESCHUTZ,0))
|
||||
continue;
|
||||
|
||||
if (attacked(u) && u->thisorder==NULL) {
|
||||
if (fval(u, UFL_LONGACTION) && u->thisorder==NULL) {
|
||||
cmistake(u, u->thisorder, 52, MSG_PRODUCE);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -2665,7 +2665,7 @@ instant_orders(void)
|
|||
unit * u;
|
||||
for (u = r->units; u; u = u->next) {
|
||||
order * ord;
|
||||
freset(u, UFL_MOVED);
|
||||
freset(u, UFL_MOVED); /* reset, because it was saved in the datafile (monsters!) */
|
||||
for (ord = u->orders; ord; ord = ord->next) {
|
||||
switch (get_keyword(ord)) {
|
||||
case K_QUIT:
|
||||
|
|
|
@ -473,7 +473,7 @@ learn(void)
|
|||
&& !is_cursed(u->attribs, C_KAELTESCHUTZ,0)) {
|
||||
continue;
|
||||
}
|
||||
if (attacked(u)) {
|
||||
if (fval(u, UFL_LONGACTION)) {
|
||||
cmistake(u, u->thisorder, 52, MSG_PRODUCE);
|
||||
continue;
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ teaching(void)
|
|||
|
||||
switch (get_keyword(u->thisorder)) {
|
||||
case K_TEACH:
|
||||
if (attacked(u)){
|
||||
if (fval(u, UFL_LONGACTION)) {
|
||||
cmistake(u, u->thisorder, 52, MSG_PRODUCE);
|
||||
continue;
|
||||
} else {
|
||||
|
|
|
@ -2428,7 +2428,7 @@ aftermath(battle * b)
|
|||
|
||||
snumber += du->number;
|
||||
if (relevant) {
|
||||
fset(du, UFL_MOVED); /* unit cannot move this round */
|
||||
fset(du, UFL_NOTMOVING); /* unit cannot move this round */
|
||||
if (df->action_counter >= du->number) {
|
||||
ship * sh = du->ship?du->ship:leftship(du);
|
||||
if (sh) fset(sh, SF_DAMAGED);
|
||||
|
|
|
@ -997,7 +997,6 @@ const char *strcheck(const char *s, size_t maxlen);
|
|||
#define strcheck(s, ml) (s)
|
||||
#endif
|
||||
|
||||
#define attacked(u) (fval(u, UFL_LONGACTION))
|
||||
boolean idle(struct faction * f);
|
||||
boolean unit_has_cursed_item(struct unit *u);
|
||||
|
||||
|
|
|
@ -2470,11 +2470,7 @@ magic(void)
|
|||
!is_cursed(u->attribs, C_KAELTESCHUTZ,0))
|
||||
continue;
|
||||
|
||||
if(fval(u, UFL_WERE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (attacked(u)) {
|
||||
if(fval(u, UFL_WERE|UFL_LONGACTION)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -2238,12 +2238,12 @@ hunt(unit *u)
|
|||
cmistake(u, u->thisorder, 144, MSG_MOVE);
|
||||
fset(u, UFL_LONGACTION); /* FOLGE SCHIFF ist immer lang */
|
||||
return 0;
|
||||
} else if(!fval(u, UFL_OWNER)) {
|
||||
} else if (!fval(u, UFL_OWNER)) {
|
||||
cmistake(u, u->thisorder, 146, MSG_MOVE);
|
||||
fset(u, UFL_LONGACTION); /* FOLGE SCHIFF ist immer lang */
|
||||
return 0;
|
||||
} else if(attacked(u)) {
|
||||
cmistake(u, u->thisorder, 52, MSG_MOVE);
|
||||
} else if (fval(u, UFL_NOTMOVING)) {
|
||||
cmistake(u, u->thisorder, 187, MSG_MOVE);
|
||||
fset(u, UFL_LONGACTION); /* FOLGE SCHIFF ist immer lang */
|
||||
return 0;
|
||||
} else if (!can_move(u)) {
|
||||
|
@ -2329,7 +2329,7 @@ move_hunters(void)
|
|||
while (*up!=NULL) {
|
||||
unit * u = *up;
|
||||
|
||||
if (!fval(u, UFL_MOVED)) {
|
||||
if (!fval(u, UFL_MOVED|UFL_NOTMOVING)) {
|
||||
order * ord;
|
||||
|
||||
for (ord=u->orders;ord;ord=ord->next) {
|
||||
|
@ -2435,16 +2435,16 @@ movement(void)
|
|||
case K_MOVE:
|
||||
/* after moving, the unit has no thisorder. this prevents
|
||||
* it from moving twice (or getting error messages twice).
|
||||
* UFL_MOVED is set in combat if the unit is not allowed
|
||||
* UFL_NOTMOVING is set in combat if the unit is not allowed
|
||||
* to move because it was involved in a battle.
|
||||
*/
|
||||
if (fval(u, UFL_LONGACTION) || fval(u, UFL_MOVED)) {
|
||||
cmistake(u, u->thisorder, 52, MSG_MOVE);
|
||||
if (fval(u, UFL_LONGACTION|UFL_MOVED|UFL_NOTMOVING)) {
|
||||
cmistake(u, u->thisorder, 187, MSG_MOVE);
|
||||
set_order(&u->thisorder, NULL);
|
||||
} else if (!can_move(u)) {
|
||||
cmistake(u, u->thisorder, 55, MSG_MOVE);
|
||||
set_order(&u->thisorder, NULL);
|
||||
} else if (!fval(u, UFL_MOVED)) {
|
||||
} else if (!fval(u, UFL_MOVED|UFL_NOTMOVING)) {
|
||||
if (ships) {
|
||||
if (u->ship && fval(u, UFL_OWNER)) {
|
||||
init_tokens(u->thisorder);
|
||||
|
@ -2530,7 +2530,7 @@ follow_unit(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (a && !fval(u, UFL_MOVED)) {
|
||||
if (a && !fval(u, UFL_MOVED|UFL_NOTMOVING)) {
|
||||
unit * u2 = a->data.v;
|
||||
boolean follow = false;
|
||||
|
||||
|
|
|
@ -39,8 +39,7 @@ struct item;
|
|||
#define UFL_WARMTH (1<<6) /* 64 */
|
||||
#define UFL_HERO (1<<7)
|
||||
#define UFL_MOVED (1<<8)
|
||||
#define UFL_FOLLOWING (1<<9)
|
||||
#define UFL_FOLLOWED (1<<10)
|
||||
#define UFL_NOTMOVING (1<<9) /* Die Einheit kann sich wg. langen Kampfes nicht bewegen */
|
||||
#define UFL_HUNGER (1<<11) /* kann im Folgemonat keinen langen Befehl außer ARBEITE ausführen */
|
||||
#define UFL_SIEGE (1<<12) /* speedup: belagert eine burg, siehe attribut */
|
||||
#define UFL_TARGET (1<<13) /* speedup: hat ein target, siehe attribut */
|
||||
|
@ -50,8 +49,9 @@ struct item;
|
|||
/* warning: von 512/1024 gewechslet, wegen konflikt mit NEW_FOLLOW */
|
||||
#define UFL_LOCKED (1<<16) /* Einheit kann keine Personen aufnehmen oder weggeben, nicht rekrutieren. */
|
||||
#define UFL_DH (1<<18) /* same as FL_DH */
|
||||
|
||||
#define UFL_STORM (1<<19) /* Kapitän war in einem Sturm */
|
||||
#define UFL_FOLLOWING (1<<20)
|
||||
#define UFL_FOLLOWED (1<<21)
|
||||
|
||||
#define UFL_NOAID (1<<22) /* Einheit hat Noaid-Status */
|
||||
#define UFL_MARK (1<<23) /* same as FL_MARK */
|
||||
|
|
|
@ -179,6 +179,8 @@ static void
|
|||
lua_autoseed(const char * filename, bool new_island)
|
||||
{
|
||||
newfaction * players = read_newfactions(filename);
|
||||
if (players!=NULL) {
|
||||
rng_init(players->subscription);
|
||||
while (players) {
|
||||
int n = listlen(players);
|
||||
int k = (n+ISLANDSIZE-1)/ISLANDSIZE;
|
||||
|
@ -188,6 +190,7 @@ lua_autoseed(const char * filename, bool new_island)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LUABIND_NO_EXCEPTIONS
|
||||
|
|
|
@ -4034,7 +4034,7 @@
|
|||
<arg name="region" type="region"/>
|
||||
<arg name="command" type="order"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Einheit kann den Befehl in dieser nicht ausführen, da sie sich bewegt hat oder in einen Kampf verwickelt war."</text>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Einheit kann den Befehl in dieser Runde nicht ausführen, da sie sich bewegt hat oder in einen Kampf verwickelt war."</text>
|
||||
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - The unit cannot execute this command because it has either moved or been in combat."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The unit cannot execute this command because it has either moved or been in combat."</text>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue