forked from github/server
Zauber "Ruf der Realität" benutzt jetzt Schemen statt standard_to_astral(), siehe Announce.
Einige Messages übersetzt
This commit is contained in:
parent
f9e95a266e
commit
16f28a3d99
|
@ -1119,8 +1119,8 @@ quit(void)
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
cmistake(u, S->s, 86, MSG_EVENT);
|
cmistake(u, S->s, 86, MSG_EVENT);
|
||||||
printf(" Warnung: STIRB mit falschem Passwort für Partei %s: %s\n",
|
log_warning(("STIRB mit falschem Passwort für Partei %s: %s\n",
|
||||||
factionid(u->faction), S->s);
|
factionid(u->faction), S->s));
|
||||||
}
|
}
|
||||||
} else if(igetkeyword(S->s, u->faction->locale) == K_RESTART && u->number > 0) {
|
} else if(igetkeyword(S->s, u->faction->locale) == K_RESTART && u->number > 0) {
|
||||||
const char *s_race, *s_pass;
|
const char *s_race, *s_pass;
|
||||||
|
@ -1155,8 +1155,8 @@ quit(void)
|
||||||
|
|
||||||
if (!checkpasswd(u->faction, s_pass, false)) {
|
if (!checkpasswd(u->faction, s_pass, false)) {
|
||||||
cmistake(u, S->s, 86, MSG_EVENT);
|
cmistake(u, S->s, 86, MSG_EVENT);
|
||||||
printf(" Warnung: NEUSTART mit falschem Passwort für Partei %s: %s\n",
|
log_warning(("NEUSTART mit falschem Passwort für Partei %s: %s\n",
|
||||||
factionid(u->faction), S->s);
|
factionid(u->faction), S->s));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
restart(u, frace);
|
restart(u, frace);
|
||||||
|
|
|
@ -421,11 +421,10 @@ destroy(region * r, unit * u, const char * cmd)
|
||||||
add_message(&u->faction->msgs, new_message(
|
add_message(&u->faction->msgs, new_message(
|
||||||
u->faction, "shipdestroy_partial%u:unit%r:region%h:ship", u, r, sh));
|
u->faction, "shipdestroy_partial%u:unit%r:region%h:ship", u, r, sh));
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
printf("* Fehler im Program! Die Einheit %s von %s\n"
|
log_error(("Die Einheit %s von %s war owner eines objects, war aber weder in einer Burg noch in einem Schiff.\n",
|
||||||
" (Spieler: %s) war owner eines objects,\n"
|
unitname(u), u->faction->name, u->faction->email));
|
||||||
" war aber weder in einer Burg noch in einem Schiff.\n",
|
}
|
||||||
unitname(u), u->faction->name, u->faction->email);
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Achtung: Nicht an ZERSTÖRE mit Punktangabe angepaßt! */
|
/* Achtung: Nicht an ZERSTÖRE mit Punktangabe angepaßt! */
|
||||||
|
|
|
@ -2842,11 +2842,11 @@ movewhere(region * r, const unit *u)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!rconnect(r, d)) {
|
if (!rconnect(r, d)) {
|
||||||
#if USE_CREATION
|
#ifdef USE_CREATION
|
||||||
makeblock(r->x + delta_x[d], r->y + delta_y[d], 1);
|
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,
|
"(%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
|
#else
|
||||||
add_message(&u->faction->msgs,
|
add_message(&u->faction->msgs,
|
||||||
msg_message("moveblocked", "unit direction", u, d));
|
msg_message("moveblocked", "unit direction", u, d));
|
||||||
|
@ -2856,9 +2856,9 @@ movewhere(region * r, const unit *u)
|
||||||
r2 = rconnect(r, d);
|
r2 = rconnect(r, d);
|
||||||
|
|
||||||
if (!r2) {
|
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,
|
"(%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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2872,7 +2872,7 @@ movewhere(region * r, const unit *u)
|
||||||
* auch schon alle existieren. Dies erleichtert das Umherschauen bei
|
* auch schon alle existieren. Dies erleichtert das Umherschauen bei
|
||||||
* den Reports! */
|
* den Reports! */
|
||||||
|
|
||||||
#if USE_CREATION
|
#ifdef USE_CREATION
|
||||||
for (d = 0; d != MAXDIRECTIONS; d++)
|
for (d = 0; d != MAXDIRECTIONS; d++)
|
||||||
if (!rconnect(r2, d))
|
if (!rconnect(r2, d))
|
||||||
makeblock(r2->x + delta_x[d], r2->y + delta_y[d], 1);
|
makeblock(r2->x + delta_x[d], r2->y + delta_y[d], 1);
|
||||||
|
|
|
@ -676,9 +676,6 @@ ship_in_storm(unit *cap, region *next_point)
|
||||||
if(i) fset(cap, UFL_STORM);
|
if(i) fset(cap, UFL_STORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define USE_CREATION 0
|
|
||||||
/* ------------------------------------------------------------- */
|
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
present(region * r, unit * u)
|
present(region * r, unit * u)
|
||||||
{
|
{
|
||||||
|
|
|
@ -253,7 +253,7 @@ rds(FILE * F, char **ds)
|
||||||
if (s - buffer > DISPLAYSIZE) {
|
if (s - buffer > DISPLAYSIZE) {
|
||||||
assert(s <= buffer + DISPLAYSIZE + 1);
|
assert(s <= buffer + DISPLAYSIZE + 1);
|
||||||
*s = 0;
|
*s = 0;
|
||||||
printf("\nDer String %s wurde nicht terminiert.\n", s);
|
log_error(("\nDer String %s wurde nicht terminiert.\n", s));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
rc(F);
|
rc(F);
|
||||||
|
@ -665,7 +665,7 @@ readorders(const char *filename)
|
||||||
|
|
||||||
fclose(F);
|
fclose(F);
|
||||||
puts("\n");
|
puts("\n");
|
||||||
printf(" %d Befehlsdateien gelesen\n", nfactions);
|
log_printf(" %d Befehlsdateien gelesen\n", nfactions);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
@ -1237,12 +1237,7 @@ writeunit(FILE * F, const unit * u)
|
||||||
wnl(F);
|
wnl(F);
|
||||||
|
|
||||||
assert(u->number >= 0);
|
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);
|
assert(u->race);
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i=0;i!=u->skill_size;++i) {
|
for (i=0;i!=u->skill_size;++i) {
|
||||||
skill * sv = u->skills+i;
|
skill * sv = u->skills+i;
|
||||||
|
@ -1741,16 +1736,8 @@ readgame(const char * filename, int backup)
|
||||||
if (backup) create_backup(buf);
|
if (backup) create_backup(buf);
|
||||||
F = cfopen(buf, "r");
|
F = cfopen(buf, "r");
|
||||||
if (F==NULL) {
|
if (F==NULL) {
|
||||||
printf("Keine Spieldaten gefunden.\n");
|
log_error(("Keine Spieldaten gefunden.\n"));
|
||||||
#if 0
|
|
||||||
printf("Neues Spiel (j/n)? ");
|
|
||||||
if (tolower(getchar()) != 'j') {
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
return creategame();
|
|
||||||
#else
|
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rc(F);
|
rc(F);
|
||||||
|
@ -1774,9 +1761,7 @@ readgame(const char * filename, int backup)
|
||||||
++basearg;
|
++basearg;
|
||||||
}
|
}
|
||||||
if (strcmp(basearg, basefile)!=0) {
|
if (strcmp(basearg, basefile)!=0) {
|
||||||
printf("WARNING: xmlfile mismatch:\n");
|
log_warning(("xmlfile mismatch: datafile contains %s, argument/default is %s\n", basefile, basearg));
|
||||||
printf("WARNING: datafile contains %s\n", basefile);
|
|
||||||
printf("WARNING: argument/default is %s\n", basearg);
|
|
||||||
printf("WARNING: any key to continue, Ctrl-C to stop\n");
|
printf("WARNING: any key to continue, Ctrl-C to stop\n");
|
||||||
getchar();
|
getchar();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1798,90 +1798,73 @@ sp_great_drought(castorder *co)
|
||||||
static int
|
static int
|
||||||
sp_treewalkenter(castorder *co)
|
sp_treewalkenter(castorder *co)
|
||||||
{
|
{
|
||||||
region *r = co->rt;
|
region *r = co->rt;
|
||||||
unit *mage = (unit *)co->magician;
|
unit *mage = (unit *)co->magician;
|
||||||
spellparameter *pa = co->par;
|
spellparameter *pa = co->par;
|
||||||
double power = co->force;
|
double power = co->force;
|
||||||
int cast_level = co->level;
|
int cast_level = co->level;
|
||||||
region *rt;
|
region *rt;
|
||||||
unit *u, *u2;
|
int remaining_cap;
|
||||||
int remaining_cap;
|
int n;
|
||||||
int n;
|
int erfolg = 0;
|
||||||
int erfolg = 0 ;
|
|
||||||
|
|
||||||
if (getplane(r) != 0) {
|
if (getplane(r) != 0) {
|
||||||
cmistake(mage, strdup(co->order), 190, MSG_MAGIC);
|
cmistake(mage, strdup(co->order), 190, MSG_MAGIC);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!r_isforest(r)) {
|
if (!r_isforest(r)) {
|
||||||
cmistake(mage, strdup(co->order), 191, MSG_MAGIC);
|
cmistake(mage, strdup(co->order), 191, MSG_MAGIC);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
rt = r_standard_to_astral(r);
|
rt = r_standard_to_astral(r);
|
||||||
if(!rt || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
if(!rt || is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
||||||
cmistake(mage, strdup(co->order), 192, MSG_MAGIC);
|
cmistake(mage, strdup(co->order), 192, MSG_MAGIC);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(rt != NULL);
|
assert(rt != NULL);
|
||||||
|
|
||||||
remaining_cap = (int)(power * 500);
|
remaining_cap = (int)(power * 500);
|
||||||
|
|
||||||
/* fuer jede Einheit */
|
/* fuer jede Einheit */
|
||||||
for (n = 0; n < pa->length; n++) {
|
for (n = 0; n < pa->length; n++) {
|
||||||
if(pa->param[n]->flag == TARGET_RESISTS
|
unit * u = pa->param[n]->data.u;
|
||||||
|| pa->param[n]->flag == TARGET_NOTFOUND)
|
spllprm * param = pa->param[n];
|
||||||
continue;
|
|
||||||
|
|
||||||
u = pa->param[n]->data.u;
|
if (param->flag & (TARGET_RESISTS|TARGET_NOTFOUND)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(!ucontact(u, mage)) {
|
if (!ucontact(u, mage)) {
|
||||||
cmistake(mage, strdup(co->order), 73, MSG_MAGIC);
|
cmistake(mage, strdup(co->order), 73, MSG_MAGIC);
|
||||||
} else {
|
} else {
|
||||||
int w = weight(u);
|
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 {
|
|
||||||
remaining_cap = remaining_cap - w;
|
|
||||||
move_unit(u, rt, NULL);
|
|
||||||
erfolg = cast_level;
|
|
||||||
|
|
||||||
/* Meldungen in der Ausgangsregion */
|
if (!can_survive(u, rt)) {
|
||||||
|
cmistake(mage, strdup(co->order), 231, MSG_MAGIC);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (u2 = r->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
|
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;
|
||||||
|
|
||||||
for(u2 = r->units; u2; u2 = u2->next ) {
|
/* Meldungen in der Ausgangsregion */
|
||||||
if(!fval(u2->faction, FL_DH)) {
|
ADDMSG(&r->msgs, msg_message("astral_disappear", "unit", u));
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Meldungen in der Zielregion */
|
/* Meldungen in der Zielregion */
|
||||||
|
ADDMSG(&rt->msgs, msg_message("astral_appear", "unit", u));
|
||||||
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)) {
|
return erfolg;
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return erfolg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
@ -3601,7 +3584,7 @@ sp_chaossuction(castorder *co)
|
||||||
unit *mage = (unit *)co->magician;
|
unit *mage = (unit *)co->magician;
|
||||||
int cast_level = co->level;
|
int cast_level = co->level;
|
||||||
|
|
||||||
if(getplane(r)) {
|
if (getplane(r)!=get_normalplane()) {
|
||||||
/* Der Zauber funktioniert nur in der materiellen Welt. */
|
/* Der Zauber funktioniert nur in der materiellen Welt. */
|
||||||
cmistake(mage, strdup(co->order), 190, MSG_MAGIC);
|
cmistake(mage, strdup(co->order), 190, MSG_MAGIC);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3609,7 +3592,7 @@ sp_chaossuction(castorder *co)
|
||||||
|
|
||||||
rt = r_standard_to_astral(r);
|
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.*/
|
/* Hier gibt es keine Verbindung zur astralen Welt.*/
|
||||||
cmistake(mage, strdup(co->order), 216, MSG_MAGIC);
|
cmistake(mage, strdup(co->order), 216, MSG_MAGIC);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -5795,8 +5778,7 @@ sp_resist_magic_bonus(castorder *co)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
/* "ZAUBERE [STUFE n] \"Astraler Weg\" [<Ziel-X> <Ziel-Y>]
|
/* "ZAUBERE [STUFE n] \"Astraler Weg\" <Einheit-Nr> [<Einheit-Nr> ...]",
|
||||||
* <Einheit-Nr> [<Einheit-Nr> ...]",
|
|
||||||
*
|
*
|
||||||
* Parameter:
|
* Parameter:
|
||||||
* pa->param[0]->data.s
|
* pa->param[0]->data.s
|
||||||
|
@ -6165,115 +6147,101 @@ sp_leaveastral(castorder *co)
|
||||||
int
|
int
|
||||||
sp_fetchastral(castorder *co)
|
sp_fetchastral(castorder *co)
|
||||||
{
|
{
|
||||||
region *rt, *ro;
|
int n;
|
||||||
unit *u, *u2;
|
unit *mage = (unit *)co->magician;
|
||||||
int remaining_cap;
|
int cast_level = co->level;
|
||||||
int n, w;
|
spellparameter *pa = co->par;
|
||||||
region *r = co->rt;
|
double power = co->force;
|
||||||
unit *mage = (unit *)co->magician;
|
int remaining_cap = (int)((power-3) * 1500);
|
||||||
int cast_level = co->level;
|
region_list * rtl = NULL;
|
||||||
double power = co->force;
|
region * rt = co->rt;
|
||||||
spellparameter *pa = co->par;
|
region * ro = NULL;
|
||||||
|
|
||||||
switch(getplaneid(r)) {
|
if (rplane(rt)!=get_normalplane()) {
|
||||||
case 0:
|
ADDMSG(&mage->faction->msgs, msg_message("error190",
|
||||||
rt = r;
|
"command region unit", co->order, rt, mage));
|
||||||
ro = r_standard_to_astral(r);
|
return 0;
|
||||||
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);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!ro
|
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
||||||
|| is_cursed(ro->attribs, C_ASTRALBLOCK, 0)
|
ADDMSG(&mage->faction->msgs, msg_message("spellfail_distance",
|
||||||
|| is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
"command region unit", co->order, rt, mage));
|
||||||
sprintf(buf, "Die Wege aus dieser astralen Region sind blockiert.");
|
return 0;
|
||||||
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
|
}
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
remaining_cap = (int)((power-3) * 1500);
|
/* für jede Einheit in der Kommandozeile */
|
||||||
|
for (n=0; n!=pa->length; ++n) {
|
||||||
|
unit * u = pa->param[n]->data.u;
|
||||||
|
int w;
|
||||||
|
|
||||||
/* für jede Einheit in der Kommandozeile */
|
if (pa->param[n]->flag & TARGET_NOTFOUND) continue;
|
||||||
for (n = 0; n < pa->length; n++) {
|
|
||||||
|
|
||||||
if(pa->param[n]->flag == TARGET_NOTFOUND) continue;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
u = pa->param[n]->data.u;
|
if (is_cursed(rt->attribs, C_ASTRALBLOCK, 0)) {
|
||||||
|
ADDMSG(&mage->faction->msgs, msg_message("spellfail_distance",
|
||||||
if (ro != u->region) {
|
"command region unit", co->order, ro, mage));
|
||||||
sprintf(buf, "%s ist zu weit von %s entfernt.",
|
|
||||||
unitname(u), unitname(mage));
|
|
||||||
addmessage(r, mage->faction, buf, MSG_EVENT, ML_MISTAKE);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ucontact(u, mage)) {
|
if (!can_survive(u, rt)) {
|
||||||
if (power > 12 && !pa->param[n]->flag == TARGET_RESISTS && can_survive(u, rt)) {
|
cmistake(mage, strdup(co->order), 231, MSG_MAGIC);
|
||||||
sprintf(buf, "%s hat uns nicht kontaktiert, widersteht dem "
|
continue;
|
||||||
"Zauber jedoch nicht.", unitname(u));
|
}
|
||||||
addmessage(r, 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);
|
|
||||||
} else {
|
|
||||||
sprintf(buf, "%s hat uns nicht kontaktiert und widersteht dem "
|
|
||||||
"Zauber.", unitname(u));
|
|
||||||
addmessage(r, 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);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
w = weight(u);
|
w = weight(u);
|
||||||
if(!can_survive(u, rt)) {
|
if (remaining_cap - w < 0) {
|
||||||
cmistake(mage, strdup(co->order), 231, MSG_MAGIC);
|
ADDMSG(&mage->faction->msgs, msg_message("fail_tooheavy",
|
||||||
} else if(remaining_cap - w < 0) {
|
"command region unit target", co->order, ro, mage, u));
|
||||||
addmessage(r, mage->faction, "Die Einheit ist zu schwer.",
|
continue;
|
||||||
MSG_MAGIC, ML_MISTAKE);
|
}
|
||||||
} else {
|
|
||||||
remaining_cap = remaining_cap - w;
|
|
||||||
move_unit(u, rt, NULL);
|
|
||||||
|
|
||||||
/* Meldungen in der Ausgangsregion */
|
if (!ucontact(u, mage)) {
|
||||||
|
if (power>12 && !(pa->param[n]->flag & TARGET_RESISTS)) {
|
||||||
|
sprintf(buf, "%s hat uns nicht kontaktiert, widersteht dem "
|
||||||
|
"Zauber jedoch nicht.", unitname(u));
|
||||||
|
addmessage(rt, mage->faction, buf, MSG_MAGIC, ML_INFO);
|
||||||
|
sprintf(buf, "%s wird von %s in eine andere Welt geschleudert.",
|
||||||
|
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(rt, mage->faction, buf, MSG_MAGIC, ML_WARN);
|
||||||
|
sprintf(buf, "%s versucht, %s in eine andere Welt zu schleudern.",
|
||||||
|
unitname(mage), unitname(u));
|
||||||
|
addmessage(ro, u->faction, buf, MSG_EVENT, ML_WARN);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (u2 = ro->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
|
remaining_cap -= w;
|
||||||
for(u2 = ro->units; u2; u2 = u2->next ) {
|
move_unit(u, rt, NULL);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Meldungen in der Zielregion */
|
/* Meldungen in der Ausgangsregion */
|
||||||
|
ADDMSG(&ro->msgs, msg_message("astral_disappear", "unit", u));
|
||||||
|
|
||||||
for (u2 = rt->units; u2; u2 = u2->next) freset(u2->faction, FL_DH);
|
/* Meldungen in der Zielregion */
|
||||||
for (u2 = rt->units; u2; u2 = u2->next ) {
|
ADDMSG(&rt->msgs, msg_message("astral_appear", "unit", u));
|
||||||
if(!fval(u2->faction, FL_DH)) {
|
}
|
||||||
fset(u2->faction, FL_DH);
|
if (rtl!=NULL) free_regionlist(rtl);
|
||||||
if(cansee(u2->faction, rt, u, 0)) {
|
return cast_level;
|
||||||
sprintf(buf, "%s erscheint plötzlich.", unitname(u));
|
|
||||||
addmessage(rt, u2->faction, buf, MSG_EVENT, ML_INFO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cast_level;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SHOWASTRAL_NOT_BORKED
|
#ifdef SHOWASTRAL_NOT_BORKED
|
||||||
|
|
|
@ -951,16 +951,16 @@ fix_gates(void)
|
||||||
static int
|
static int
|
||||||
fix_astralplane(void)
|
fix_astralplane(void)
|
||||||
{
|
{
|
||||||
plane * astralplane = getplanebyname("Astralraum");
|
plane * astralplane = get_astralplane();
|
||||||
region * r;
|
region * r;
|
||||||
region_list * rlist = NULL;
|
region_list * rlist = NULL;
|
||||||
|
|
||||||
if (astralplane) {
|
if (astralplane) {
|
||||||
freset(astralplane, PFL_NOCOORDS);
|
freset(astralplane, PFL_NOCOORDS);
|
||||||
freset(astralplane, PFL_NOFEED);
|
freset(astralplane, PFL_NOFEED);
|
||||||
set_ursprung(findfaction(MONSTER_FACTION), astralplane->id, 0, 0);
|
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);
|
region * ra = r_standard_to_astral(r);
|
||||||
if (ra==NULL) continue;
|
if (ra==NULL) continue;
|
||||||
if (r->terrain!=T_FIREWALL) continue;
|
if (r->terrain!=T_FIREWALL) continue;
|
||||||
|
@ -968,9 +968,10 @@ fix_astralplane(void)
|
||||||
if (ra->units!=NULL) {
|
if (ra->units!=NULL) {
|
||||||
add_regionlist(&rlist, ra);
|
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);
|
terraform(ra, T_ASTRALB);
|
||||||
}
|
}
|
||||||
while (rlist) {
|
while (rlist!=NULL) {
|
||||||
region_list * rnew = rlist;
|
region_list * rnew = rlist;
|
||||||
region * r = rnew->data;
|
region * r = rnew->data;
|
||||||
direction_t dir;
|
direction_t dir;
|
||||||
|
@ -999,7 +1000,7 @@ fix_astralplane(void)
|
||||||
}
|
}
|
||||||
free(rnew);
|
free(rnew);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -5560,9 +5560,9 @@
|
||||||
<arg name="unit" type="unit"/>
|
<arg name="unit" type="unit"/>
|
||||||
<arg name="potion" type="resource"/>
|
<arg name="potion" type="resource"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) benutzt einen $resource($potion,1)."</text>
|
<text locale="de">"$unit($unit) benutzt $resource($potion,1)."</text>
|
||||||
<text locale="fr">"$unit($unit) uses a $resource($potion,1)."</text>
|
<text locale="fr">"$unit($unit) uses $resource($potion,1)."</text>
|
||||||
<text locale="en">"$unit($unit) uses a $resource($potion,1)."</text>
|
<text locale="en">"$unit($unit) uses $resource($potion,1)."</text>
|
||||||
</message>
|
</message>
|
||||||
<message name="pest" section="events">
|
<message name="pest" section="events">
|
||||||
<type>
|
<type>
|
||||||
|
@ -5931,5 +5931,53 @@
|
||||||
<text locale="en">"$unit($unit) in $region($region) creates a sculpture."</text>
|
<text locale="en">"$unit($unit) in $region($region) creates a sculpture."</text>
|
||||||
</message>
|
</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>
|
</messages>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue