forked from github/server
Umsetzung Announce 13.9.: Die Kampfauswirkung auf Bewegung war nicht implementiert.
This commit is contained in:
parent
9b2014d3b4
commit
08fec11034
4 changed files with 32 additions and 13 deletions
|
@ -2395,8 +2395,7 @@ aftermath(battle * b)
|
|||
cv_foreach(s, b->sides) {
|
||||
int snumber = 0;
|
||||
fighter *df;
|
||||
boolean relevant = false; /* Kampf relevant für dieses Heer? */
|
||||
boolean active_army = false; /* anyone in this army done much? */
|
||||
boolean relevant = false; /* Kampf relevant für diese Partei? */
|
||||
if (s->bf->lastturn+(b->has_tactics_turn?1:0)>1) {
|
||||
relevant = true;
|
||||
}
|
||||
|
@ -2407,17 +2406,20 @@ aftermath(battle * b)
|
|||
int dead = du->number - df->alive - df->run.number;
|
||||
int sum_hp = 0;
|
||||
int n;
|
||||
boolean involved = relevant && df->action_counter >= du->number;
|
||||
snumber += du->number;
|
||||
|
||||
if (involved) {
|
||||
ship * sh = du->ship?du->ship:leftship(du);
|
||||
if (sh) fset(sh, SF_DAMAGED);
|
||||
fset(du, UFL_LONGACTION);
|
||||
snumber += du->number;
|
||||
if (relevant) {
|
||||
fset(du, UFL_MOVED); /* 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);
|
||||
fset(du, UFL_LONGACTION);
|
||||
}
|
||||
}
|
||||
for (n = 0; n != df->alive; ++n) {
|
||||
if (df->person[n].hp > 0)
|
||||
if (df->person[n].hp > 0) {
|
||||
sum_hp += df->person[n].hp;
|
||||
}
|
||||
}
|
||||
|
||||
if (df->alive == du->number) {
|
||||
|
@ -2432,7 +2434,7 @@ aftermath(battle * b)
|
|||
/* Zuerst dürfen die Feinde plündern, die mitgenommenen Items
|
||||
* stehen in fig->run.items. Dann werden die Fliehenden auf
|
||||
* die leere (tote) alte Einheit gemapt */
|
||||
if (fval(df,FIG_NOLOOT)){
|
||||
if (fval(df, FIG_NOLOOT)){
|
||||
merge_fleeloot(df, du);
|
||||
} else {
|
||||
loot_items(df);
|
||||
|
|
|
@ -2409,13 +2409,18 @@ movement(void)
|
|||
switch (kword) {
|
||||
case K_ROUTE:
|
||||
case K_MOVE:
|
||||
if (attacked(u)) {
|
||||
/* 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
|
||||
* 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);
|
||||
set_order(&u->thisorder, NULL);
|
||||
} else if (!can_move(u)) {
|
||||
cmistake(u, u->thisorder, 55, MSG_MOVE);
|
||||
set_order(&u->thisorder, NULL);
|
||||
} else {
|
||||
} else if (!fval(u, UFL_MOVED)) {
|
||||
if (ships) {
|
||||
if (u->ship && fval(u, UFL_OWNER)) {
|
||||
init_tokens(u->thisorder);
|
||||
|
|
|
@ -367,6 +367,18 @@
|
|||
<Filter
|
||||
Name="XML files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\res\buildings.xml">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\res\messages.xml">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\res\races.xml">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\res\resources.xml">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\res\de\strings.xml">
|
||||
</File>
|
||||
|
|
|
@ -5291,7 +5291,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 diese Runde keinen langen Befehl mehr ausführen."</text>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Einheit kann keine weiteren langen Befehle ausführen."</text>
|
||||
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - The unit is exhausted from battle."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The unit is exhausted from battle."</text>
|
||||
</message>
|
||||
|
|
Loading…
Reference in a new issue