Zauber "Ruf der Realität" benutzt jetzt Schemen statt standard_to_astral(), siehe Announce.

Einige Messages übersetzt
This commit is contained in:
Enno Rehling 2004-05-25 21:50:23 +00:00
parent f9e95a266e
commit 16f28a3d99
8 changed files with 221 additions and 223 deletions

View File

@ -1119,8 +1119,8 @@ quit(void)
break;
} else {
cmistake(u, S->s, 86, MSG_EVENT);
printf(" Warnung: STIRB mit falschem Passwort für Partei %s: %s\n",
factionid(u->faction), S->s);
log_warning(("STIRB mit falschem Passwort für Partei %s: %s\n",
factionid(u->faction), S->s));
}
} else if(igetkeyword(S->s, u->faction->locale) == K_RESTART && u->number > 0) {
const char *s_race, *s_pass;
@ -1155,8 +1155,8 @@ quit(void)
if (!checkpasswd(u->faction, s_pass, false)) {
cmistake(u, S->s, 86, MSG_EVENT);
printf(" Warnung: NEUSTART mit falschem Passwort für Partei %s: %s\n",
factionid(u->faction), S->s);
log_warning(("NEUSTART mit falschem Passwort für Partei %s: %s\n",
factionid(u->faction), S->s));
continue;
}
restart(u, frace);

View File

@ -421,11 +421,10 @@ destroy(region * r, unit * u, const char * cmd)
add_message(&u->faction->msgs, new_message(
u->faction, "shipdestroy_partial%u:unit%r:region%h:ship", u, r, sh));
}
} else
printf("* Fehler im Program! Die Einheit %s von %s\n"
" (Spieler: %s) war owner eines objects,\n"
" war aber weder in einer Burg noch in einem Schiff.\n",
unitname(u), u->faction->name, u->faction->email);
} else {
log_error(("Die Einheit %s von %s war owner eines objects, war aber weder in einer Burg noch in einem Schiff.\n",
unitname(u), u->faction->name, u->faction->email));
}
#if 0
/* Achtung: Nicht an ZERSTÖRE mit Punktangabe angepaßt! */

View File

@ -2842,11 +2842,11 @@ movewhere(region * r, const unit *u)
#endif
if (!rconnect(r, d)) {
#if USE_CREATION
#ifdef USE_CREATION
makeblock(r->x + delta_x[d], r->y + delta_y[d], 1);
printf("* Fehler! Region (%d,%d) hatte seine Nachbarn "
log_error((("Region (%d,%d) hatte seine Nachbarn "
"(%d,%d) noch nicht generiert!\n", r->x, r->y,
r->x + delta_x[d], r->y + delta_y[d]);
r->x + delta_x[d], r->y + delta_y[d]));
#else
add_message(&u->faction->msgs,
msg_message("moveblocked", "unit direction", u, d));
@ -2856,9 +2856,9 @@ movewhere(region * r, const unit *u)
r2 = rconnect(r, d);
if (!r2) {
printf("* Fehler! Region (%d,%d) hatte seine Nachbarn "
log_error(("Region (%d,%d) hatte seine Nachbarn "
"(%d,%d) nicht gefunden!", r->x, r->y,
r->x + delta_x[d], r->y + delta_y[d]);
r->x + delta_x[d], r->y + delta_y[d]));
return 0;
}
@ -2872,7 +2872,7 @@ movewhere(region * r, const unit *u)
* auch schon alle existieren. Dies erleichtert das Umherschauen bei
* den Reports! */
#if USE_CREATION
#ifdef USE_CREATION
for (d = 0; d != MAXDIRECTIONS; d++)
if (!rconnect(r2, d))
makeblock(r2->x + delta_x[d], r2->y + delta_y[d], 1);

View File

@ -676,9 +676,6 @@ ship_in_storm(unit *cap, region *next_point)
if(i) fset(cap, UFL_STORM);
}
#define USE_CREATION 0
/* ------------------------------------------------------------- */
static boolean
present(region * r, unit * u)
{

View File

@ -253,7 +253,7 @@ rds(FILE * F, char **ds)
if (s - buffer > DISPLAYSIZE) {
assert(s <= buffer + DISPLAYSIZE + 1);
*s = 0;
printf("\nDer String %s wurde nicht terminiert.\n", s);
log_error(("\nDer String %s wurde nicht terminiert.\n", s));
exit(1);
}
rc(F);
@ -665,7 +665,7 @@ readorders(const char *filename)
fclose(F);
puts("\n");
printf(" %d Befehlsdateien gelesen\n", nfactions);
log_printf(" %d Befehlsdateien gelesen\n", nfactions);
return 0;
}
/* ------------------------------------------------------------- */
@ -1237,12 +1237,7 @@ writeunit(FILE * F, const unit * u)
wnl(F);
assert(u->number >= 0);
#ifdef MONEY_BUG
if (get_money(u) < 0)
printf("Einheit %s hat %d silber", unitname(u), get_money(u));
#else
assert(u->race);
#endif
for (i=0;i!=u->skill_size;++i) {
skill * sv = u->skills+i;
@ -1741,16 +1736,8 @@ readgame(const char * filename, int backup)
if (backup) create_backup(buf);
F = cfopen(buf, "r");
if (F==NULL) {
printf("Keine Spieldaten gefunden.\n");
#if 0
printf("Neues Spiel (j/n)? ");
if (tolower(getchar()) != 'j') {
exit(0);
}
return creategame();
#else
log_error(("Keine Spieldaten gefunden.\n"));
return -1;
#endif
}
rc(F);
@ -1774,9 +1761,7 @@ readgame(const char * filename, int backup)
++basearg;
}
if (strcmp(basearg, basefile)!=0) {
printf("WARNING: xmlfile mismatch:\n");
printf("WARNING: datafile contains %s\n", basefile);
printf("WARNING: argument/default is %s\n", basearg);
log_warning(("xmlfile mismatch: datafile contains %s, argument/default is %s\n", basefile, basearg));
printf("WARNING: any key to continue, Ctrl-C to stop\n");
getchar();
}

View File

@ -1804,10 +1804,9 @@ sp_treewalkenter(castorder *co)
double power = co->force;
int cast_level = co->level;
region *rt;
unit *u, *u2;
int remaining_cap;
int n;
int erfolg = 0 ;
int erfolg = 0;
if (getplane(r) != 0) {
cmistake(mage, strdup(co->order), 190, MSG_MAGIC);
@ -1831,54 +1830,38 @@ sp_treewalkenter(castorder *co)
/* fuer jede Einheit */
for (n = 0; n < pa->length; n++) {
if(pa->param[n]->flag == TARGET_RESISTS
|| pa->param[n]->flag == TARGET_NOTFOUND)
unit * u = pa->param[n]->data.u;
spllprm * param = pa->param[n];
if (param->flag & (TARGET_RESISTS|TARGET_NOTFOUND)) {
continue;
}
u = pa->param[n]->data.u;
if(!ucontact(u, mage)) {
if (!ucontact(u, mage)) {
cmistake(mage, strdup(co->order), 73, MSG_MAGIC);
} else {
int w = weight(u);
if(!can_survive(u, rt)) {
int w;
if (!can_survive(u, rt)) {
cmistake(mage, strdup(co->order), 231, MSG_MAGIC);
} else if(remaining_cap - w < 0) {
sprintf(buf, "%s ist zu schwer.", unitname(u));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_WARN);
} else {
continue;
}
w = weight(u);
if (remaining_cap - w < 0) {
ADDMSG(&mage->faction->msgs, msg_message("fail_tooheavy",
"command region unit target", co->order, r, mage, u));
continue;
}
remaining_cap = remaining_cap - w;
move_unit(u, rt, NULL);
erfolg = cast_level;
/* Meldungen in der Ausgangsregion */
for (u2 = r->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for(u2 = r->units; u2; u2 = u2->next ) {
if(!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if(cansee(u2->faction, r, u, 0)) {
sprintf(buf, "%s wird durchscheinend und verschwindet.",
unitname(u));
addmessage(r, u2->faction, buf, MSG_EVENT, ML_INFO);
}
}
}
ADDMSG(&r->msgs, msg_message("astral_disappear", "unit", u));
/* Meldungen in der Zielregion */
for (u2 = r->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for(u2 = rt->units; u2; u2 = u2->next ) {
if(!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if(cansee(u2->faction, rt, u, 0)) {
sprintf(buf, "%s erscheint plötzlich.", unitname(u));
addmessage(rt, u2->faction, buf, MSG_EVENT, ML_INFO);
}
}
}
}
ADDMSG(&rt->msgs, msg_message("astral_appear", "unit", u));
}
}
return erfolg;
@ -3601,7 +3584,7 @@ sp_chaossuction(castorder *co)
unit *mage = (unit *)co->magician;
int cast_level = co->level;
if(getplane(r)) {
if (getplane(r)!=get_normalplane()) {
/* Der Zauber funktioniert nur in der materiellen Welt. */
cmistake(mage, strdup(co->order), 190, MSG_MAGIC);
return 0;
@ -3609,7 +3592,7 @@ sp_chaossuction(castorder *co)
rt = r_standard_to_astral(r);
if(!rt || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
if (rt==NULL || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
/* Hier gibt es keine Verbindung zur astralen Welt.*/
cmistake(mage, strdup(co->order), 216, MSG_MAGIC);
return 0;
@ -5795,8 +5778,7 @@ sp_resist_magic_bonus(castorder *co)
}
/* ------------------------------------------------------------- */
/* "ZAUBERE [STUFE n] \"Astraler Weg\" [<Ziel-X> <Ziel-Y>]
* <Einheit-Nr> [<Einheit-Nr> ...]",
/* "ZAUBERE [STUFE n] \"Astraler Weg\" <Einheit-Nr> [<Einheit-Nr> ...]",
*
* Parameter:
* pa->param[0]->data.s
@ -6165,114 +6147,100 @@ sp_leaveastral(castorder *co)
int
sp_fetchastral(castorder *co)
{
region *rt, *ro;
unit *u, *u2;
int remaining_cap;
int n, w;
region *r = co->rt;
int n;
unit *mage = (unit *)co->magician;
int cast_level = co->level;
double power = co->force;
spellparameter *pa = co->par;
double power = co->force;
int remaining_cap = (int)((power-3) * 1500);
region_list * rtl = NULL;
region * rt = co->rt;
region * ro = NULL;
switch(getplaneid(r)) {
case 0:
rt = r;
ro = r_standard_to_astral(r);
if(!ro) {
cmistake(mage, strdup(co->order), 216, MSG_MAGIC);
return 0;
}
break;
default:
sprintf(buf, "Der Zauber funktioniert nur in der materiellen Welt.");
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
if (rplane(rt)!=get_normalplane()) {
ADDMSG(&mage->faction->msgs, msg_message("error190",
"command region unit", co->order, rt, mage));
return 0;
}
if(!ro
|| is_cursed(ro->attribs, C_ASTRALBLOCK, 0)
|| is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
sprintf(buf, "Die Wege aus dieser astralen Region sind blockiert.");
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
ADDMSG(&mage->faction->msgs, msg_message("spellfail_distance",
"command region unit", co->order, rt, mage));
return 0;
}
remaining_cap = (int)((power-3) * 1500);
/* für jede Einheit in der Kommandozeile */
for (n = 0; n < pa->length; n++) {
for (n=0; n!=pa->length; ++n) {
unit * u = pa->param[n]->data.u;
int w;
if(pa->param[n]->flag == TARGET_NOTFOUND) continue;
if (pa->param[n]->flag & TARGET_NOTFOUND) continue;
u = pa->param[n]->data.u;
if (u->region!=ro) {
/* this can happen several times if the units are from different astral
* regions. Only possible on the intersections of schemes */
region_list * rfind;
rt = u->region;
if (rtl!=NULL) free_regionlist(rtl);
rtl = astralregions(rt, NULL);
for (rfind=rtl;rfind!=NULL;rfind=rfind->next) {
if (rfind->data==ro) break;
}
if (rfind==NULL) {
/* the region r is not in the schemes of rt */
ADDMSG(&mage->faction->msgs, msg_message("spellfail_distance",
"command region unit target", co->order, ro, mage, u));
continue;
}
}
if (ro != u->region) {
sprintf(buf, "%s ist zu weit von %s entfernt.",
unitname(u), unitname(mage));
addmessage(r, mage->faction, buf, MSG_EVENT, ML_MISTAKE);
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
ADDMSG(&mage->faction->msgs, msg_message("spellfail_distance",
"command region unit", co->order, ro, mage));
continue;
}
if (!can_survive(u, rt)) {
cmistake(mage, strdup(co->order), 231, MSG_MAGIC);
continue;
}
w = weight(u);
if (remaining_cap - w < 0) {
ADDMSG(&mage->faction->msgs, msg_message("fail_tooheavy",
"command region unit target", co->order, ro, mage, u));
continue;
}
if (!ucontact(u, mage)) {
if (power > 12 && !pa->param[n]->flag == TARGET_RESISTS && can_survive(u, rt)) {
if (power>12 && !(pa->param[n]->flag & TARGET_RESISTS)) {
sprintf(buf, "%s hat uns nicht kontaktiert, widersteht dem "
"Zauber jedoch nicht.", unitname(u));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_INFO);
addmessage(rt, mage->faction, buf, MSG_MAGIC, ML_INFO);
sprintf(buf, "%s wird von %s in eine andere Welt geschleudert.",
unitname(u),
cansee(u->faction, r, mage, 0)?unitname(mage):"jemandem");
addmessage(r, u->faction, buf, MSG_EVENT, ML_WARN);
unitname(u), unitname(mage));
addmessage(rt, u->faction, buf, MSG_EVENT, ML_WARN);
} else {
sprintf(buf, "%s hat uns nicht kontaktiert und widersteht dem "
"Zauber.", unitname(u));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_WARN);
addmessage(rt, mage->faction, buf, MSG_MAGIC, ML_WARN);
sprintf(buf, "%s versucht, %s in eine andere Welt zu schleudern.",
cansee(u->faction, r, mage, 0)?unitname(mage):"Jemand",
unitname(u));
addmessage(r, u->faction, buf, MSG_EVENT, ML_WARN);
unitname(mage), unitname(u));
addmessage(ro, u->faction, buf, MSG_EVENT, ML_WARN);
continue;
}
}
w = weight(u);
if(!can_survive(u, rt)) {
cmistake(mage, strdup(co->order), 231, MSG_MAGIC);
} else if(remaining_cap - w < 0) {
addmessage(r, mage->faction, "Die Einheit ist zu schwer.",
MSG_MAGIC, ML_MISTAKE);
} else {
remaining_cap = remaining_cap - w;
remaining_cap -= w;
move_unit(u, rt, NULL);
/* Meldungen in der Ausgangsregion */
for (u2 = ro->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for(u2 = ro->units; u2; u2 = u2->next ) {
if(!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if(cansee(u2->faction, ro, u, 0)) {
sprintf(buf, "%s wird durchscheinend und verschwindet.",
unitname(u));
addmessage(ro, u2->faction, buf, MSG_EVENT, ML_INFO);
}
}
}
ADDMSG(&ro->msgs, msg_message("astral_disappear", "unit", u));
/* Meldungen in der Zielregion */
for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
for (u2 = rt->units; u2; u2 = u2->next ) {
if(!fval(u2->faction, FL_DH)) {
fset(u2->faction, FL_DH);
if(cansee(u2->faction, rt, u, 0)) {
sprintf(buf, "%s erscheint plötzlich.", unitname(u));
addmessage(rt, u2->faction, buf, MSG_EVENT, ML_INFO);
}
}
}
}
ADDMSG(&rt->msgs, msg_message("astral_appear", "unit", u));
}
if (rtl!=NULL) free_regionlist(rtl);
return cast_level;
}

View File

@ -951,7 +951,7 @@ fix_gates(void)
static int
fix_astralplane(void)
{
plane * astralplane = getplanebyname("Astralraum");
plane * astralplane = get_astralplane();
region * r;
region_list * rlist = NULL;
@ -960,7 +960,7 @@ fix_astralplane(void)
freset(astralplane, PFL_NOFEED);
set_ursprung(findfaction(MONSTER_FACTION), astralplane->id, 0, 0);
}
for (r=regions;r;r=r->next) {
for (r=regions;r;r=r->next) if (rplane(r)==astralplane) {
region * ra = r_standard_to_astral(r);
if (ra==NULL) continue;
if (r->terrain!=T_FIREWALL) continue;
@ -968,9 +968,10 @@ fix_astralplane(void)
if (ra->units!=NULL) {
add_regionlist(&rlist, ra);
}
log_printf("protecting firewall in %s by blocking astral space in %s.\n", regionname(r), regionname(ra));
terraform(ra, T_ASTRALB);
}
while (rlist) {
while (rlist!=NULL) {
region_list * rnew = rlist;
region * r = rnew->data;
direction_t dir;

View File

@ -5560,9 +5560,9 @@
<arg name="unit" type="unit"/>
<arg name="potion" type="resource"/>
</type>
<text locale="de">"$unit($unit) benutzt einen $resource($potion,1)."</text>
<text locale="fr">"$unit($unit) uses a $resource($potion,1)."</text>
<text locale="en">"$unit($unit) uses a $resource($potion,1)."</text>
<text locale="de">"$unit($unit) benutzt $resource($potion,1)."</text>
<text locale="fr">"$unit($unit) uses $resource($potion,1)."</text>
<text locale="en">"$unit($unit) uses $resource($potion,1)."</text>
</message>
<message name="pest" section="events">
<type>
@ -5931,5 +5931,53 @@
<text locale="en">"$unit($unit) in $region($region) creates a sculpture."</text>
</message>
<message name="spellfail_distance" section="error">
<type>
<arg name="command" type="order"/>
<arg name="region" type="region"/>
<arg name="unit" type="unit"/>
<arg name="target" type="unit"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - $unit($target) ist zu weit entfernt."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - $unit($target) is too far away."</text>
</message>
<message name="spellfail_block" section="error">
<type>
<arg name="command" type="order"/>
<arg name="region" type="region"/>
<arg name="unit" type="unit"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Wege aus dieser Region sind blockiert."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The connections from to this regions are blocked."</text>
</message>
<message name="astral_appear" section="events">
<type>
<arg name="unit" type="unit"/>
</type>
<text locale="de">"$unit($unit) erscheint plötzlich."</text>
<text locale="en">"$unit($unit) appears."</text>
</message>
<message name="astral_disappear" section="events">
<type>
<arg name="unit" type="unit"/>
</type>
<text locale="de">"$unit($unit) wird durchscheinend und verschwindet."</text>
<text locale="en">"$unit($unit) disappears."</text>
</message>
<message name="fail_toheavy" section="errors">
<type>
<arg name="command" type="order"/>
<arg name="region" type="region"/>
<arg name="unit" type="unit"/>
<arg name="target" type="unit"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - $unit($target) ist zu schwer."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - $unit($target) is too heavy."</text>
</message>
</messages>