forked from github/server
Haufenweise Reportänderungen für englische Kampfreporte
This commit is contained in:
parent
d81ce147ca
commit
075172140a
|
@ -86,17 +86,15 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
extern int quiet;
|
||||
extern int *storms;
|
||||
extern int weeks_per_month;
|
||||
extern int months_per_year;
|
||||
|
||||
boolean nocr = false;
|
||||
boolean nonr = false;
|
||||
boolean nomer = false;
|
||||
boolean noreports = false;
|
||||
|
||||
/*
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
extern int *storms;
|
||||
|
||||
char **seasonnames;
|
||||
char **weeknames;
|
||||
char **weeknames2;
|
||||
|
@ -104,8 +102,6 @@ char **monthnames;
|
|||
int *month_season;
|
||||
char *agename;
|
||||
int seasons;
|
||||
extern int weeks_per_month;
|
||||
extern int months_per_year;
|
||||
|
||||
int
|
||||
read_datenames(const char *filename)
|
||||
|
@ -278,7 +274,6 @@ gamedate_short(const struct locale * lang)
|
|||
return buf;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
static void
|
||||
rpsnr(FILE * F, const char * s, int offset)
|
||||
{
|
||||
|
@ -579,7 +574,6 @@ report_spell(FILE * F, spellid_t id, const struct locale * lang)
|
|||
|
||||
rnl(F);
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
nmr_warnings(void)
|
||||
|
@ -601,8 +595,6 @@ nmr_warnings(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
sparagraph(strlist ** SP, const char *s, int indent, char mark)
|
||||
{
|
||||
|
@ -762,8 +754,6 @@ print_curses(FILE *F, const faction *viewer, const void * obj, typ_t typ, int in
|
|||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
char *
|
||||
replace_global_coords(const char *s, const faction * f)
|
||||
{
|
||||
|
@ -932,8 +922,24 @@ rp_messages(FILE * F, message_list * msgs, faction * viewer, int indent, boolean
|
|||
}
|
||||
}
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
static void
|
||||
rp_battles(FILE * F, faction * f)
|
||||
{
|
||||
if (f->battles!=NULL) {
|
||||
struct bmsg * bm;
|
||||
rnl(F);
|
||||
centre(F, LOC(f->locale, "section_battle"), false);
|
||||
rnl(F);
|
||||
for (bm=f->battles;bm;bm=bm->next) {
|
||||
RENDER(f, buf, 80, ("battle::header", "region", bm->r));
|
||||
rnl(F);
|
||||
centre(F, buf, true);
|
||||
rnl(F);
|
||||
rp_messages(F, bm->msgs, f, 0, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
f_regionid(const region * r, const faction * f)
|
||||
|
@ -2112,26 +2118,7 @@ report(FILE *F, faction * f, const faction_list * addresses,
|
|||
* (enno) was? wer hat das geschrieben?
|
||||
* Momentan ist das wegen der der Mailverschickmimik schwierig. */
|
||||
rp_messages(F, f->msgs, f, 0, true, true);
|
||||
if(f->battles) {
|
||||
struct bmsg * bm;
|
||||
rnl(F);
|
||||
centre(F, LOC(f->locale, "section_battle"), false);
|
||||
rnl(F);
|
||||
for (bm=f->battles;bm;bm=bm->next) {
|
||||
#ifdef HAVE_SNPRINTF
|
||||
snprintf(buf, 80, "In %s findet ein Kampf statt:",
|
||||
translate_regions(regionid(bm->r), f));
|
||||
#else
|
||||
sprintf(buf, "In %s findet ein Kampf statt:",
|
||||
translate_regions(regionid(bm->r), f));
|
||||
buf[80]=0;
|
||||
#endif
|
||||
rnl(F);
|
||||
centre(F, buf, true);
|
||||
rnl(F);
|
||||
rp_messages(F, bm->msgs, f, 0, true, false);
|
||||
}
|
||||
}
|
||||
rp_battles(F, f);
|
||||
a = a_find(f->attribs, &at_reportspell);
|
||||
if (a) {
|
||||
rnl(F);
|
||||
|
@ -2364,7 +2351,6 @@ report(FILE *F, faction * f, const faction_list * addresses,
|
|||
}
|
||||
}
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
FILE *
|
||||
openbatch(void)
|
||||
|
@ -2418,7 +2404,7 @@ closebatch(FILE * BAT)
|
|||
fclose(BAT);
|
||||
}
|
||||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
|
||||
void
|
||||
base36conversion(void)
|
||||
|
|
|
@ -213,7 +213,7 @@ sidename(side * s, boolean truename)
|
|||
return sidename_buf;
|
||||
}
|
||||
|
||||
static char *
|
||||
static const char *
|
||||
sideabkz(side *s, boolean truename)
|
||||
{
|
||||
static char sideabkz_buf[4];
|
||||
|
@ -659,8 +659,6 @@ select_weapon(const troop t, boolean attacking, boolean ismissile)
|
|||
return preferred_weapon(t, attacking);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
static int
|
||||
weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
|
||||
/* the 'pure' skill when using this weapon to attack or defend.
|
||||
|
@ -859,8 +857,6 @@ select_magicarmor(troop t)
|
|||
return ma;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
/* Sind side ds und Magier des meffect verbündet, dann return 1*/
|
||||
boolean
|
||||
meffect_protection(battle * b, meffect * s, side * ds)
|
||||
|
@ -882,7 +878,6 @@ meffect_blocked(battle *b, meffect *s, side *as)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
/* rmfighter wird schon im PRAECOMBAT gebraucht, da gibt es noch keine
|
||||
* troops */
|
||||
void
|
||||
|
@ -942,8 +937,6 @@ remove_troop(troop dt)
|
|||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
/** reduces the target's exp by an equivalent of n points learning
|
||||
* 30 points = 1 week
|
||||
*/
|
||||
|
@ -2498,20 +2491,24 @@ aftermath(battle * b)
|
|||
chaoscounts(r, dead_peasants / 2);
|
||||
rsetpeasants(r, rpeasants(r) - dead_peasants);
|
||||
|
||||
cv_foreach(s, b->sides) {
|
||||
message * seen = msg_message("battle::army_report",
|
||||
"index abbrev dead flown survived",
|
||||
s->index, gc_add(strdup(sideabkz(s, false))), s->dead, s->flee, s->alive);
|
||||
message * unseen = msg_message("battle::army_report",
|
||||
"index abbrev dead flown survived",
|
||||
s->index, "-?-", s->dead, s->flee, s->alive);
|
||||
|
||||
for (bf=b->factions;bf;bf=bf->next) {
|
||||
faction * f = bf->faction;
|
||||
fbattlerecord(b, f, " ");
|
||||
cv_foreach(s, b->sides) {
|
||||
if (seematrix(f, s)) {
|
||||
sprintf(buf, "Heer %2d(%s): %d Tote, %d Geflohene, %d Überlebende",
|
||||
s->index, sideabkz(s,false), s->dead, s->flee, s->alive);
|
||||
} else {
|
||||
sprintf(buf, "Heer %2d(Unb): %d Tote, %d Geflohene, %d Überlebende",
|
||||
s->index, s->dead, s->flee, s->alive);
|
||||
message * m = seematrix(f, s)?seen:unseen;
|
||||
|
||||
message_faction(b, f, m);
|
||||
}
|
||||
fbattlerecord(b, f, buf);
|
||||
|
||||
msg_release(seen);
|
||||
msg_release(unseen);
|
||||
} cv_next(s);
|
||||
}
|
||||
/* Wir benutzen drifted, um uns zu merken, ob ein Schiff
|
||||
* schonmal Schaden genommen hat. (moved und drifted
|
||||
* sollten in flags überführt werden */
|
||||
|
@ -2661,38 +2658,30 @@ print_stats(battle * b)
|
|||
|
||||
for (bf=b->factions;bf;bf=bf->next) {
|
||||
faction * f = bf->faction;
|
||||
const char * loc_army = LOC(f->locale, "battle_army");
|
||||
fbattlerecord(b, f, " ");
|
||||
sprintf(buf, "Heer %d: %s", side->index,
|
||||
sprintf(buf, "%s %d: %s", loc_army, side->index,
|
||||
seematrix(f, side)
|
||||
? sidename(side,false) : LOC(f->locale, "unknown_faction"));
|
||||
fbattlerecord(b, f, buf);
|
||||
strcpy(buf, LOC(f->locale, "battle_opponents"));
|
||||
komma = false;
|
||||
cv_foreach(s2, b->sides) {
|
||||
if (enemy(s2, side))
|
||||
{
|
||||
if (seematrix(f, s2) == true) {
|
||||
sprintf(buf, "%s%s Heer %d(%s)", buf, komma++ ? "," : "",
|
||||
s2->index, sideabkz(s2,false));
|
||||
} else {
|
||||
sprintf(buf, "%s%s Heer %d(Unb)", buf, komma++ ? "," : "",
|
||||
s2->index);
|
||||
}
|
||||
if (enemy(s2, side)) {
|
||||
const char * abbrev = seematrix(f, s2)?sideabkz(s2, false):"-?-";
|
||||
sprintf(buf, "%s%s %s %d(%s)", buf, komma++ ? "," : "", loc_army,
|
||||
s2->index, abbrev);
|
||||
}
|
||||
}
|
||||
cv_next(s2);
|
||||
fbattlerecord(b, f, buf);
|
||||
strcpy(buf, "Attacke gegen:");
|
||||
strcpy(buf, LOC(f->locale, "battle_attack"));
|
||||
komma = false;
|
||||
cv_foreach(s2, b->sides) {
|
||||
if (side->enemy[s2->index] & E_ATTACKING) {
|
||||
if (seematrix(f, s2) == true) {
|
||||
sprintf(buf, "%s%s Heer %d(%s)", buf, komma++ ? "," : "",
|
||||
s2->index, sideabkz(s2,false));
|
||||
} else {
|
||||
sprintf(buf, "%s%s Heer %d(Unb)", buf, komma++ ? "," : "",
|
||||
s2->index);
|
||||
}
|
||||
const char * abbrev = seematrix(f, s2)?sideabkz(s2, false):"-?-";
|
||||
sprintf(buf, "%s%s %s %d(%s)", buf, komma++ ? "," : "", loc_army,
|
||||
s2->index, abbrev);
|
||||
}
|
||||
}
|
||||
cv_next(s2);
|
||||
|
@ -3236,27 +3225,24 @@ battle_report(battle * b)
|
|||
|
||||
for (bf=b->factions;bf;bf=bf->next) {
|
||||
faction * fac = bf->faction;
|
||||
message * m;
|
||||
|
||||
fbattlerecord(b, fac, " ");
|
||||
if (cont == true)
|
||||
sprintf(buf2, "Einheiten vor der %d. Runde:",
|
||||
b->turn);
|
||||
else
|
||||
sprintf(buf2, "Einheiten nach dem Kampf:");
|
||||
fbattlerecord(b, fac, buf2);
|
||||
|
||||
if (cont) m = msg_message("battle::lineup", "turn", b->turn);
|
||||
else m = msg_message("battle::after", "");
|
||||
message_faction(b, fac, m);
|
||||
msg_release(m);
|
||||
|
||||
buf2[0] = 0;
|
||||
komma = false;
|
||||
cv_foreach(s, b->sides) {
|
||||
if (s->alive) {
|
||||
int r, k = 0, * alive = get_alive(b, s, fac, seematrix(fac, s));
|
||||
if (!seematrix(fac, s)) {
|
||||
sprintf(buf, "%sHeer %2d(Unb): ",
|
||||
komma==true?", ":"", s->index);
|
||||
} else {
|
||||
sprintf(buf, "%sHeer %2d(%s): ",
|
||||
komma==true?", ":"", s->index,sideabkz(s,false));
|
||||
}
|
||||
{
|
||||
int l = FIGHT_ROW;
|
||||
const char * abbrev = seematrix(fac, s)?sideabkz(s, false):"-?-";
|
||||
const char * loc_army = LOC(fac->locale, "battle_army");
|
||||
sprintf(buf, "%s%s %2d(%s): ", komma==true?", ":"", loc_army, abbrev);
|
||||
for (r=FIGHT_ROW;r!=NUMROWS;++r) {
|
||||
if (alive[r]) {
|
||||
if (l!=FIGHT_ROW) scat("+");
|
||||
|
@ -3266,7 +3252,6 @@ battle_report(battle * b)
|
|||
l=r+1;
|
||||
} else ++k;
|
||||
}
|
||||
}
|
||||
|
||||
strcat(buf2, buf);
|
||||
if (komma == false) {
|
||||
|
@ -3798,8 +3783,6 @@ do_battle(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
/* Funktionen, die außerhalb von battle.c verwendet werden. */
|
||||
static int
|
||||
nb_armor(unit *u, int index)
|
||||
|
|
|
@ -168,8 +168,6 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
|
|||
int i, dh;
|
||||
skill_t sk;
|
||||
int getarnt = fval(u, UFL_PARTEITARNUNG);
|
||||
faction *fv;
|
||||
attrib *a_otherfaction;
|
||||
const char *pzTmp;
|
||||
spell *sp;
|
||||
building * b;
|
||||
|
@ -179,15 +177,16 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
|
|||
attrib *a_fshidden = NULL;
|
||||
item * itm;
|
||||
item * show;
|
||||
faction *fv = visible_faction(f, u);
|
||||
|
||||
if (fspecial(u->faction, FS_HIDDEN))
|
||||
a_fshidden = a_find(u->attribs, &at_fshidden);
|
||||
|
||||
strcpy(buf, unitname(u));
|
||||
|
||||
fv = visible_faction(f, u);
|
||||
a_otherfaction = a_find(u->attribs, &at_otherfaction);
|
||||
|
||||
if (!isbattle) {
|
||||
attrib *a_otherfaction = a_find(u->attribs, &at_otherfaction);
|
||||
if (u->faction == f) {
|
||||
attrib *a = a_find(u->attribs, &at_group);
|
||||
if (a) {
|
||||
|
@ -220,7 +219,7 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef USE_UGROUPS
|
||||
if (u->faction == f) {
|
||||
attrib *a = a_find(u->attribs, &at_ugroup);
|
||||
|
@ -237,8 +236,7 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
|
|||
|
||||
scat(", ");
|
||||
|
||||
if(u->faction != f && a_fshidden
|
||||
&& a_fshidden->data.ca[0] == 1 && effskill(u, SK_STEALTH) >= 6) {
|
||||
if (u->faction != f && a_fshidden && a_fshidden->data.ca[0] == 1 && effskill(u, SK_STEALTH) >= 6) {
|
||||
scat("? ");
|
||||
} else {
|
||||
icat(u->number);
|
||||
|
@ -304,7 +302,8 @@ bufunit(const faction * f, const unit * u, int indent, int mode)
|
|||
if (f == u->faction || telepath_see || omniscient(f)) {
|
||||
show = u->items;
|
||||
} else if (!itemcloak && mode >= see_unit && !(a_fshidden
|
||||
&& a_fshidden->data.ca[1] == 1 && effskill(u, SK_STEALTH) >= 3)) {
|
||||
&& a_fshidden->data.ca[1] == 1 && effskill(u, SK_STEALTH) >= 3))
|
||||
{
|
||||
show = NULL;
|
||||
for (itm=u->items;itm;itm=itm->next) {
|
||||
item * ishow;
|
||||
|
|
|
@ -5788,11 +5788,21 @@
|
|||
<text locale="en">gets no aid</text>
|
||||
</string>
|
||||
|
||||
<string name="battle_attack">
|
||||
<text locale="de">Attacke gegen:</text>
|
||||
<text locale="en">Attacked against</text>
|
||||
</string>
|
||||
|
||||
<string name="battle_opponents">
|
||||
<text locale="de">Kämpft gegen:</text>
|
||||
<text locale="en">Fighting against</text>
|
||||
</string>
|
||||
|
||||
<string name="battle_army">
|
||||
<text locale="de">Heer</text>
|
||||
<text locale="en">army</text>
|
||||
</string>
|
||||
|
||||
<string name="unknown_faction">
|
||||
<text locale="de">Unbekannte Partei</text>
|
||||
<text locale="en">unknown faction</text>
|
||||
|
|
|
@ -698,7 +698,7 @@
|
|||
<arg name="runto" type="region"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) verlor $int($fallen) Personen$if($alive,", $int($alive) überlebten","")$if($run," und $int($run) flohen$if($isnull($runto),""," nach $region($runto)")","")."</text>
|
||||
<text locale="en">"$unit($unit) lost $int($fallen) people: $if($alive,", $int($alive) survived","")$if($run," and $int($run) fled$if($isnull($runto),""," to $region($runto)")","")."</text>
|
||||
<text locale="en">"$unit($unit) lost $int($fallen) people$if($alive,", $int($alive) survived","")$if($run," and $int($run) fled$if($isnull($runto),""," to $region($runto)")","")."</text>
|
||||
</message>
|
||||
<message name="killsandhits" section="battle">
|
||||
<type>
|
||||
|
@ -5742,5 +5742,36 @@
|
|||
<text locale="de">"$unit($mage) zaubert $spell($spell), aber niemand war in Reichweite."</text>
|
||||
<text locale="en">"$unit($mage) casts $spell($spell), but nobody was in range."</text>
|
||||
</message>
|
||||
<message name="battle::after" section="battle">
|
||||
<type>
|
||||
</type>
|
||||
<text locale="de">"Einheiten nach dem Kampf:"</text>
|
||||
<text locale="en">"Units after the battle:"</text>
|
||||
</message>
|
||||
<message name="battle::lineup" section="battle">
|
||||
<type>
|
||||
<arg name="turn" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"Einheiten vor der $int($turn). Runde:"</text>
|
||||
<text locale="en">"Units before turn $int($turn):"</text>
|
||||
</message>
|
||||
<message name="battle::header" section="battle">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
</type>
|
||||
<text locale="de">"In $region($region) findet ein Kampf statt."</text>
|
||||
<text locale="en">"There is a battle in $region($region)."</text>
|
||||
</message>
|
||||
<message name="battle::army_report" section="battle">
|
||||
<type>
|
||||
<arg name="index" type="int"/>
|
||||
<arg name="abbrev" type="string"/>
|
||||
<arg name="dead" type="int"/>
|
||||
<arg name="flown" type="int"/>
|
||||
<arg name="survived" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"Heer $int($index)($abbrev): $int($dead) Tote, $int($flown) Geflohene, $int($survived) Überlebende."</text>
|
||||
<text locale="en">"Army $int($index)($abbrev): $int($dead) dead, $int($flown) flown, $int($survived) survivors."</text>
|
||||
</message>
|
||||
</messages>
|
||||
|
||||
|
|
Loading…
Reference in New Issue