Haufenweise Reportänderungen für englische Kampfreporte

This commit is contained in:
Enno Rehling 2004-04-21 22:09:39 +00:00
parent d81ce147ca
commit 075172140a
5 changed files with 6170 additions and 6161 deletions

View File

@ -86,17 +86,15 @@
#include <stdlib.h> #include <stdlib.h>
extern int quiet; extern int quiet;
extern int *storms;
extern int weeks_per_month;
extern int months_per_year;
boolean nocr = false; boolean nocr = false;
boolean nonr = false; boolean nonr = false;
boolean nomer = false; boolean nomer = false;
boolean noreports = false; boolean noreports = false;
/*
* -------------------------------------------------------------
*/
extern int *storms;
char **seasonnames; char **seasonnames;
char **weeknames; char **weeknames;
char **weeknames2; char **weeknames2;
@ -104,8 +102,6 @@ char **monthnames;
int *month_season; int *month_season;
char *agename; char *agename;
int seasons; int seasons;
extern int weeks_per_month;
extern int months_per_year;
int int
read_datenames(const char *filename) read_datenames(const char *filename)
@ -278,7 +274,6 @@ gamedate_short(const struct locale * lang)
return buf; return buf;
} }
/* ------------------------------------------------------------- */
static void static void
rpsnr(FILE * F, const char * s, int offset) 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); rnl(F);
} }
/* ------------------------------------------------------------- */
void void
nmr_warnings(void) nmr_warnings(void)
@ -601,8 +595,6 @@ nmr_warnings(void)
} }
} }
/* ------------------------------------------------------------- */
void void
sparagraph(strlist ** SP, const char *s, int indent, char mark) 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 * char *
replace_global_coords(const char *s, const faction * f) 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 * char *
f_regionid(const region * r, const faction * f) 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? * (enno) was? wer hat das geschrieben?
* Momentan ist das wegen der der Mailverschickmimik schwierig. */ * Momentan ist das wegen der der Mailverschickmimik schwierig. */
rp_messages(F, f->msgs, f, 0, true, true); rp_messages(F, f->msgs, f, 0, true, true);
if(f->battles) { rp_battles(F, f);
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);
}
}
a = a_find(f->attribs, &at_reportspell); a = a_find(f->attribs, &at_reportspell);
if (a) { if (a) {
rnl(F); rnl(F);
@ -2364,7 +2351,6 @@ report(FILE *F, faction * f, const faction_list * addresses,
} }
} }
} }
/* ------------------------------------------------------------- */
FILE * FILE *
openbatch(void) openbatch(void)
@ -2418,7 +2404,7 @@ closebatch(FILE * BAT)
fclose(BAT); fclose(BAT);
} }
} }
/* ------------------------------------------------------------- */
void void
base36conversion(void) base36conversion(void)

View File

@ -213,7 +213,7 @@ sidename(side * s, boolean truename)
return sidename_buf; return sidename_buf;
} }
static char * static const char *
sideabkz(side *s, boolean truename) sideabkz(side *s, boolean truename)
{ {
static char sideabkz_buf[4]; static char sideabkz_buf[4];
@ -659,8 +659,6 @@ select_weapon(const troop t, boolean attacking, boolean ismissile)
return preferred_weapon(t, attacking); return preferred_weapon(t, attacking);
} }
/* ------------------------------------------------------------- */
static int static int
weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking) weapon_skill(const weapon_type * wtype, const unit * u, boolean attacking)
/* the 'pure' skill when using this weapon to attack or defend. /* the 'pure' skill when using this weapon to attack or defend.
@ -859,8 +857,6 @@ select_magicarmor(troop t)
return ma; return ma;
} }
/* ------------------------------------------------------------- */
/* Sind side ds und Magier des meffect verbündet, dann return 1*/ /* Sind side ds und Magier des meffect verbündet, dann return 1*/
boolean boolean
meffect_protection(battle * b, meffect * s, side * ds) meffect_protection(battle * b, meffect * s, side * ds)
@ -882,7 +878,6 @@ meffect_blocked(battle *b, meffect *s, side *as)
return false; return false;
} }
/* ------------------------------------------------------------- */
/* rmfighter wird schon im PRAECOMBAT gebraucht, da gibt es noch keine /* rmfighter wird schon im PRAECOMBAT gebraucht, da gibt es noch keine
* troops */ * troops */
void void
@ -942,8 +937,6 @@ remove_troop(troop dt)
} }
} }
/* ------------------------------------------------------------- */
/** reduces the target's exp by an equivalent of n points learning /** reduces the target's exp by an equivalent of n points learning
* 30 points = 1 week * 30 points = 1 week
*/ */
@ -2498,20 +2491,24 @@ aftermath(battle * b)
chaoscounts(r, dead_peasants / 2); chaoscounts(r, dead_peasants / 2);
rsetpeasants(r, rpeasants(r) - dead_peasants); rsetpeasants(r, rpeasants(r) - dead_peasants);
for (bf=b->factions;bf;bf=bf->next) { cv_foreach(s, b->sides) {
faction * f = bf->faction; message * seen = msg_message("battle::army_report",
fbattlerecord(b, f, " "); "index abbrev dead flown survived",
cv_foreach(s, b->sides) { s->index, gc_add(strdup(sideabkz(s, false))), s->dead, s->flee, s->alive);
if (seematrix(f, s)) { message * unseen = msg_message("battle::army_report",
sprintf(buf, "Heer %2d(%s): %d Tote, %d Geflohene, %d Überlebende", "index abbrev dead flown survived",
s->index, sideabkz(s,false), s->dead, s->flee, s->alive); s->index, "-?-", s->dead, s->flee, s->alive);
} else {
sprintf(buf, "Heer %2d(Unb): %d Tote, %d Geflohene, %d Überlebende", for (bf=b->factions;bf;bf=bf->next) {
s->index, s->dead, s->flee, s->alive); faction * f = bf->faction;
} message * m = seematrix(f, s)?seen:unseen;
fbattlerecord(b, f, buf);
} cv_next(s); message_faction(b, f, m);
} }
msg_release(seen);
msg_release(unseen);
} cv_next(s);
/* Wir benutzen drifted, um uns zu merken, ob ein Schiff /* Wir benutzen drifted, um uns zu merken, ob ein Schiff
* schonmal Schaden genommen hat. (moved und drifted * schonmal Schaden genommen hat. (moved und drifted
* sollten in flags überführt werden */ * sollten in flags überführt werden */
@ -2661,38 +2658,30 @@ print_stats(battle * b)
for (bf=b->factions;bf;bf=bf->next) { for (bf=b->factions;bf;bf=bf->next) {
faction * f = bf->faction; faction * f = bf->faction;
const char * loc_army = LOC(f->locale, "battle_army");
fbattlerecord(b, f, " "); fbattlerecord(b, f, " ");
sprintf(buf, "Heer %d: %s", side->index, sprintf(buf, "%s %d: %s", loc_army, side->index,
seematrix(f, side) seematrix(f, side)
? sidename(side,false) : LOC(f->locale, "unknown_faction")); ? sidename(side,false) : LOC(f->locale, "unknown_faction"));
fbattlerecord(b, f, buf); fbattlerecord(b, f, buf);
strcpy(buf, LOC(f->locale, "battle_opponents")); strcpy(buf, LOC(f->locale, "battle_opponents"));
komma = false; komma = false;
cv_foreach(s2, b->sides) { cv_foreach(s2, b->sides) {
if (enemy(s2, side)) if (enemy(s2, side)) {
{ const char * abbrev = seematrix(f, s2)?sideabkz(s2, false):"-?-";
if (seematrix(f, s2) == true) { sprintf(buf, "%s%s %s %d(%s)", buf, komma++ ? "," : "", loc_army,
sprintf(buf, "%s%s Heer %d(%s)", buf, komma++ ? "," : "", s2->index, abbrev);
s2->index, sideabkz(s2,false));
} else {
sprintf(buf, "%s%s Heer %d(Unb)", buf, komma++ ? "," : "",
s2->index);
}
} }
} }
cv_next(s2); cv_next(s2);
fbattlerecord(b, f, buf); fbattlerecord(b, f, buf);
strcpy(buf, "Attacke gegen:"); strcpy(buf, LOC(f->locale, "battle_attack"));
komma = false; komma = false;
cv_foreach(s2, b->sides) { cv_foreach(s2, b->sides) {
if (side->enemy[s2->index] & E_ATTACKING) { if (side->enemy[s2->index] & E_ATTACKING) {
if (seematrix(f, s2) == true) { const char * abbrev = seematrix(f, s2)?sideabkz(s2, false):"-?-";
sprintf(buf, "%s%s Heer %d(%s)", buf, komma++ ? "," : "", sprintf(buf, "%s%s %s %d(%s)", buf, komma++ ? "," : "", loc_army,
s2->index, sideabkz(s2,false)); s2->index, abbrev);
} else {
sprintf(buf, "%s%s Heer %d(Unb)", buf, komma++ ? "," : "",
s2->index);
}
} }
} }
cv_next(s2); cv_next(s2);
@ -3236,36 +3225,32 @@ battle_report(battle * b)
for (bf=b->factions;bf;bf=bf->next) { for (bf=b->factions;bf;bf=bf->next) {
faction * fac = bf->faction; faction * fac = bf->faction;
message * m;
fbattlerecord(b, fac, " "); fbattlerecord(b, fac, " ");
if (cont == true)
sprintf(buf2, "Einheiten vor der %d. Runde:", if (cont) m = msg_message("battle::lineup", "turn", b->turn);
b->turn); else m = msg_message("battle::after", "");
else message_faction(b, fac, m);
sprintf(buf2, "Einheiten nach dem Kampf:"); msg_release(m);
fbattlerecord(b, fac, buf2);
buf2[0] = 0; buf2[0] = 0;
komma = false; komma = false;
cv_foreach(s, b->sides) { cv_foreach(s, b->sides) {
if (s->alive) { if (s->alive) {
int r, k = 0, * alive = get_alive(b, s, fac, seematrix(fac, s)); int r, k = 0, * alive = get_alive(b, s, fac, seematrix(fac, s));
if (!seematrix(fac, s)) { int l = FIGHT_ROW;
sprintf(buf, "%sHeer %2d(Unb): ", const char * abbrev = seematrix(fac, s)?sideabkz(s, false):"-?-";
komma==true?", ":"", s->index); const char * loc_army = LOC(fac->locale, "battle_army");
} else { sprintf(buf, "%s%s %2d(%s): ", komma==true?", ":"", loc_army, abbrev);
sprintf(buf, "%sHeer %2d(%s): ", for (r=FIGHT_ROW;r!=NUMROWS;++r) {
komma==true?", ":"", s->index,sideabkz(s,false)); if (alive[r]) {
} if (l!=FIGHT_ROW) scat("+");
{ while(k--) scat("0+");
int l = FIGHT_ROW; icat(alive[r]);
for (r=FIGHT_ROW;r!=NUMROWS;++r) { k = 0;
if (alive[r]) { l=r+1;
if (l!=FIGHT_ROW) scat("+"); } else ++k;
while(k--) scat("0+");
icat(alive[r]);
k = 0;
l=r+1;
} else ++k;
}
} }
strcat(buf2, buf); strcat(buf2, buf);
@ -3798,8 +3783,6 @@ do_battle(void)
} }
} }
/* ------------------------------------------------------------- */
/* Funktionen, die außerhalb von battle.c verwendet werden. */ /* Funktionen, die außerhalb von battle.c verwendet werden. */
static int static int
nb_armor(unit *u, int index) nb_armor(unit *u, int index)

View File

@ -165,278 +165,277 @@ report_item(const unit * owner, const item * i, const faction * viewer, const ch
int int
bufunit(const faction * f, const unit * u, int indent, int mode) bufunit(const faction * f, const unit * u, int indent, int mode)
{ {
int i, dh; int i, dh;
skill_t sk; skill_t sk;
int getarnt = fval(u, UFL_PARTEITARNUNG); int getarnt = fval(u, UFL_PARTEITARNUNG);
faction *fv; const char *pzTmp;
attrib *a_otherfaction; spell *sp;
const char *pzTmp; building * b;
spell *sp; boolean itemcloak = is_cursed(u->attribs, C_ITEMCLOAK, 0);
building * b; boolean isbattle = (boolean)(mode == see_battle);
boolean itemcloak = is_cursed(u->attribs, C_ITEMCLOAK, 0); int telepath_see = fspecial(f, FS_TELEPATHY);
boolean isbattle = (boolean)(mode == see_battle); attrib *a_fshidden = NULL;
int telepath_see = fspecial(f, FS_TELEPATHY); item * itm;
attrib *a_fshidden = NULL; item * show;
item * itm; faction *fv = visible_faction(f, u);
item * show;
if(fspecial(u->faction, FS_HIDDEN)) if (fspecial(u->faction, FS_HIDDEN))
a_fshidden = a_find(u->attribs, &at_fshidden); a_fshidden = a_find(u->attribs, &at_fshidden);
strcpy(buf, unitname(u)); strcpy(buf, unitname(u));
fv = visible_faction(f, u);
a_otherfaction = a_find(u->attribs, &at_otherfaction);
if (u->faction == f) {
attrib *a = a_find(u->attribs, &at_group);
if (a) {
group * g = (group*)a->data.v;
scat(", ");
scat(groupid(g, f));
}
if (getarnt) {
scat(", "); scat(LOC(f->locale, "anonymous"));
} else if (a_otherfaction) {
faction * otherfaction = get_otherfaction(a_otherfaction);
if (otherfaction) {
scat(", ");
scat(factionname(otherfaction));
}
}
} else {
if (getarnt) {
scat(", "); scat(LOC(f->locale, "anonymous"));
} else {
scat(", ");
if(a_otherfaction
&& alliedunit(u, f, HELP_FSTEALTH)) {
scat(factionname(get_otherfaction(a_otherfaction)));
scat(" (");
scat(factionname(u->faction));
scat(")");
} else {
scat(factionname(fv));
}
}
}
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) {
group * g = (group*)a->data.v;
scat(", ");
scat(groupid(g, f));
}
if (getarnt) {
scat(", "); scat(LOC(f->locale, "anonymous"));
} else if (a_otherfaction) {
faction * otherfaction = get_otherfaction(a_otherfaction);
if (otherfaction) {
scat(", ");
scat(factionname(otherfaction));
}
}
} else {
if (getarnt) {
scat(", "); scat(LOC(f->locale, "anonymous"));
} else {
scat(", ");
if(a_otherfaction
&& alliedunit(u, f, HELP_FSTEALTH)) {
scat(factionname(get_otherfaction(a_otherfaction)));
scat(" (");
scat(factionname(u->faction));
scat(")");
} else {
scat(factionname(fv));
}
}
}
}
#ifdef USE_UGROUPS #ifdef USE_UGROUPS
if(u->faction == f) { if (u->faction == f) {
attrib *a = a_find(u->attribs, &at_ugroup); attrib *a = a_find(u->attribs, &at_ugroup);
if(a) { if(a) {
ugroup *ug = findugroupid(u->faction, a->data.i); ugroup *ug = findugroupid(u->faction, a->data.i);
if(is_ugroupleader(u, ug)) { if(is_ugroupleader(u, ug)) {
scat("*"); scat("*");
} }
scat(itoa36(ug->id)); scat(itoa36(ug->id));
} }
scat(", "); scat(", ");
} }
#endif #endif
scat(", "); scat(", ");
if(u->faction != f && a_fshidden if (u->faction != f && a_fshidden && a_fshidden->data.ca[0] == 1 && effskill(u, SK_STEALTH) >= 6) {
&& a_fshidden->data.ca[0] == 1 && effskill(u, SK_STEALTH) >= 6) { scat("? ");
scat("? "); } else {
} else { icat(u->number);
icat(u->number); scat(" ");
scat(" "); }
}
pzTmp = get_racename(u->attribs); pzTmp = get_racename(u->attribs);
if (pzTmp || u->irace != u->race) { if (pzTmp || u->irace != u->race) {
if (pzTmp) if (pzTmp)
scat(pzTmp); scat(pzTmp);
else else
scat(racename(f->locale, u, u->irace)); scat(racename(f->locale, u, u->irace));
if (u->faction == f) { if (u->faction == f) {
scat(" ("); scat(" (");
scat(racename(f->locale, u, u->race)); scat(racename(f->locale, u, u->race));
scat(")"); scat(")");
} }
} else { } else {
scat(racename(f->locale, u, u->race)); scat(racename(f->locale, u, u->race));
} }
/* status */ /* status */
if (u->number && (u->faction == f || telepath_see || isbattle)) { if (u->number && (u->faction == f || telepath_see || isbattle)) {
const char * c = locale_string(f->locale, hp_status(u)); const char * c = locale_string(f->locale, hp_status(u));
scat(", "); scat(", ");
scat(report_kampfstatus(u, f->locale)); scat(report_kampfstatus(u, f->locale));
if (c || fval(u, UFL_HUNGER)) { if (c || fval(u, UFL_HUNGER)) {
scat(" ("); scat(" (");
if(c) scat(c); if(c) scat(c);
if(fval(u, UFL_HUNGER)) { if(fval(u, UFL_HUNGER)) {
if (c) scat(", hungert"); if (c) scat(", hungert");
else scat("hungert"); else scat("hungert");
} }
scat(")"); scat(")");
} }
} }
if (getguard(u)) scat(", bewacht die Region"); if (getguard(u)) scat(", bewacht die Region");
if (u->faction==f || telepath_see) { if (u->faction==f || telepath_see) {
attrib * a = a_find(u->attribs, &at_follow); attrib * a = a_find(u->attribs, &at_follow);
if (a) { if (a) {
unit * uf = (unit*)a->data.v; unit * uf = (unit*)a->data.v;
if (uf) { if (uf) {
scat(", folgt "); scat(", folgt ");
scat(itoa36(uf->no)); scat(itoa36(uf->no));
} }
} }
} }
if ((b = usiege(u))!=NULL) { if ((b = usiege(u))!=NULL) {
scat(", belagert "); scat(", belagert ");
scat(buildingname(b)); scat(buildingname(b));
} }
dh = 0; dh = 0;
if (u->faction == f || telepath_see) { if (u->faction == f || telepath_see) {
for (sk = 0; sk != MAXSKILLS; sk++) { for (sk = 0; sk != MAXSKILLS; sk++) {
spskill(f->locale, u, sk, &dh, 1); spskill(f->locale, u, sk, &dh, 1);
} }
} }
dh = 0; dh = 0;
if (f == u->faction || telepath_see || omniscient(f)) { if (f == u->faction || telepath_see || omniscient(f)) {
show = u->items; show = u->items;
} else if (!itemcloak && mode >= see_unit && !(a_fshidden } 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) { show = NULL;
item * ishow; for (itm=u->items;itm;itm=itm->next) {
const char * ic; item * ishow;
int in; const char * ic;
report_item(u, itm, f, NULL, &ic, &in, false); int in;
if (ic && *ic && in>0) { report_item(u, itm, f, NULL, &ic, &in, false);
for (ishow = show; ishow; ishow=ishow->next) { if (ic && *ic && in>0) {
const char * sc; for (ishow = show; ishow; ishow=ishow->next) {
int sn; const char * sc;
if (ishow->type==itm->type) sc=ic; int sn;
else report_item(u, ishow, f, NULL, &sc, &sn, false); if (ishow->type==itm->type) sc=ic;
if (sc==ic || strcmp(sc, ic)==0) { else report_item(u, ishow, f, NULL, &sc, &sn, false);
ishow->number+=itm->number; if (sc==ic || strcmp(sc, ic)==0) {
break; ishow->number+=itm->number;
} break;
} }
if (ishow==NULL) { }
ishow = i_add(&show, i_new(itm->type, itm->number)); if (ishow==NULL) {
} ishow = i_add(&show, i_new(itm->type, itm->number));
} }
} }
} else { }
show = NULL; } else {
} show = NULL;
for (itm=show; itm; itm=itm->next) { }
const char * ic; for (itm=show; itm; itm=itm->next) {
int in; const char * ic;
report_item(u, itm, f, &ic, NULL, &in, false); int in;
if (in==0 || ic==NULL) continue; report_item(u, itm, f, &ic, NULL, &in, false);
scat(", "); if (in==0 || ic==NULL) continue;
scat(", ");
if (!dh) { if (!dh) {
sprintf(buf+strlen(buf), "%s: ", LOC(f->locale, "nr_inventory")); sprintf(buf+strlen(buf), "%s: ", LOC(f->locale, "nr_inventory"));
dh = 1; dh = 1;
} }
if (in == 1) { if (in == 1) {
scat(ic); scat(ic);
} else { } else {
icat(in); icat(in);
scat(" "); scat(" ");
scat(ic); scat(ic);
} }
} }
if (show!=u->items) while (show) i_free(i_remove(&show, show)); if (show!=u->items) while (show) i_free(i_remove(&show, show));
if (u->faction == f || telepath_see) { if (u->faction == f || telepath_see) {
dh = 0; dh = 0;
if (is_mage(u) == true) { if (is_mage(u) == true) {
scat(". Aura "); scat(". Aura ");
icat(get_spellpoints(u)); icat(get_spellpoints(u));
scat("/"); scat("/");
icat(max_spellpoints(u->region,u)); icat(max_spellpoints(u->region,u));
{ {
spell_ptr *spt; spell_ptr *spt;
int t = effskill(u, SK_MAGIC); int t = effskill(u, SK_MAGIC);
for (spt = get_mage(u)->spellptr;spt; spt = spt->next){ for (spt = get_mage(u)->spellptr;spt; spt = spt->next){
sp = find_spellbyid(spt->spellid); sp = find_spellbyid(spt->spellid);
if (sp->level > t) continue; if (sp->level > t) continue;
if (!dh) { if (!dh) {
sprintf(buf+strlen(buf),", %s: ", LOC(f->locale, "nr_spells")); sprintf(buf+strlen(buf),", %s: ", LOC(f->locale, "nr_spells"));
dh = 1; dh = 1;
} else { } else {
scat(", "); scat(", ");
} }
scat(spell_name(sp, f->locale)); scat(spell_name(sp, f->locale));
} }
} }
dh = 0; dh = 0;
for (i = 0; i < MAXCOMBATSPELLS; i++){ for (i = 0; i < MAXCOMBATSPELLS; i++){
sp = get_combatspell(u,i); sp = get_combatspell(u,i);
if (sp) { if (sp) {
dh = 1; dh = 1;
} }
} }
if(dh){ if(dh){
dh = 0; dh = 0;
sprintf(buf+strlen(buf),", %s: ", LOC(f->locale, "nr_combatspells")); sprintf(buf+strlen(buf),", %s: ", LOC(f->locale, "nr_combatspells"));
for (i = 0; i < MAXCOMBATSPELLS; i++){ for (i = 0; i < MAXCOMBATSPELLS; i++){
if (!dh){ if (!dh){
dh = 1; dh = 1;
}else{ }else{
scat(", "); scat(", ");
} }
sp = get_combatspell(u,i); sp = get_combatspell(u,i);
if (sp) { if (sp) {
int sl; int sl;
scat(spell_name(sp, u->faction->locale)); scat(spell_name(sp, u->faction->locale));
if((sl = get_combatspelllevel(u,i)) > 0) { if((sl = get_combatspelllevel(u,i)) > 0) {
scat(" ("); scat(" (");
icat(sl); icat(sl);
scat(")"); scat(")");
} }
}else{ }else{
scat(LOC(f->locale, "nr_nospells")); scat(LOC(f->locale, "nr_nospells"));
} }
} }
} }
} }
if (!isbattle && u->lastorder[0]) { if (!isbattle && u->lastorder[0]) {
scat(", \""); scat(", \"");
scat(u->lastorder); scat(u->lastorder);
scat("\""); scat("\"");
} }
} }
i = 0; i = 0;
if (u->display[0]) { if (u->display[0]) {
scat("; "); scat("; ");
scat(u->display); scat(u->display);
i = u->display[strlen(u->display) - 1]; i = u->display[strlen(u->display) - 1];
} }
if (i != '!' && i != '?' && i != '.') if (i != '!' && i != '?' && i != '.')
scat("."); scat(".");
pzTmp = uprivate(u); pzTmp = uprivate(u);
if (u->faction == f && pzTmp) { if (u->faction == f && pzTmp) {
scat(" (Bem: "); scat(" (Bem: ");
scat(pzTmp); scat(pzTmp);
scat(")"); scat(")");
} }
dh=0; dh=0;
if (!getarnt && f) { if (!getarnt && f) {
if (alliedfaction(getplane(u->region), f, fv, HELP_ALL)) { if (alliedfaction(getplane(u->region), f, fv, HELP_ALL)) {
dh = 1; dh = 1;
} }
} }
return dh; return dh;
} }
/* TODO: telepath_see wird nicht berücksichtigt: Parteien mit /* TODO: telepath_see wird nicht berücksichtigt: Parteien mit
@ -669,20 +668,20 @@ void
spunit(struct strlist ** SP, const struct faction * f, const unit * u, int indent, spunit(struct strlist ** SP, const struct faction * f, const unit * u, int indent,
int mode) int mode)
{ {
int dh; int dh;
#ifdef USE_UGROUPS #ifdef USE_UGROUPS
ugroup *ug = findugroup(u); ugroup *ug = findugroup(u);
if(ug) { if(ug) {
if(is_ugroupleader(u, ug)) { if(is_ugroupleader(u, ug)) {
dh = bufunit_ugroupleader(f, u, indent, mode); dh = bufunit_ugroupleader(f, u, indent, mode);
} else { } else {
return; return;
} }
} else } else
#endif #endif
dh = bufunit(f, u, indent, mode); dh = bufunit(f, u, indent, mode);
lparagraph(SP, buf, indent, (char) ((u->faction == f) ? '*' : (dh ? '+' : '-'))); lparagraph(SP, buf, indent, (char) ((u->faction == f) ? '*' : (dh ? '+' : '-')));
} }
/* in spy steht der Unterschied zwischen Wahrnehmung des Opfers und /* in spy steht der Unterschied zwischen Wahrnehmung des Opfers und

File diff suppressed because it is too large Load Diff

View File

@ -698,7 +698,7 @@
<arg name="runto" type="region"/> <arg name="runto" type="region"/>
</type> </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="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>
<message name="killsandhits" section="battle"> <message name="killsandhits" section="battle">
<type> <type>
@ -5742,5 +5742,36 @@
<text locale="de">"$unit($mage) zaubert $spell($spell), aber niemand war in Reichweite."</text> <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> <text locale="en">"$unit($mage) casts $spell($spell), but nobody was in range."</text>
</message> </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> </messages>