Mehr englische Beschreibungen

Mehr Dinge aus settings.h heraus und in xml-files hinein
Sortierung von alliierten bleibt gleich wenn laden/speichern (kleinere diffs)
This commit is contained in:
Enno Rehling 2004-05-04 19:24:03 +00:00
parent 27cd78ab66
commit b18a812fa2
19 changed files with 449 additions and 481 deletions

View File

@ -103,6 +103,17 @@ int *month_season;
char *agename;
int seasons;
static const char*
MailitPath()
{
static const char * value = NULL;
if (value==NULL) {
value = get_param(global.parameters, "report.mailit");
}
return value;
}
int
read_datenames(const char *filename)
{
@ -1795,36 +1806,36 @@ enemies(FILE * F, const faction * f)
static void
guards(FILE * F, const region * r, const faction * see)
{ /* die Partei see sieht dies; wegen
* "unbekannte Partei", wenn man es selbst ist... */
* "unbekannte Partei", wenn man es selbst ist... */
faction* guardians[512];
faction* guardians[512];
int nextguard = 0;
int nextguard = 0;
unit *u;
int i;
unit *u;
int i;
boolean tarned = false;
/* Bewachung */
boolean tarned = false;
/* Bewachung */
for (u = r->units; u; u = u->next) {
if (getguard(u)) {
faction *f = u->faction;
faction *fv = visible_faction(see, u);
if (getguard(u)) {
faction *f = u->faction;
faction *fv = visible_faction(see, u);
if(fv != f && see != fv) {
f = fv;
}
if(fv != f && see != fv) {
f = fv;
}
if (f != see && fval(u, UFL_PARTEITARNUNG)) {
tarned=true;
} else {
for (i=0;i!=nextguard;++i) if (guardians[i]==f) break;
if (i==nextguard) {
guardians[nextguard++] = f;
}
}
}
if (f != see && fval(u, UFL_PARTEITARNUNG)) {
tarned=true;
} else {
for (i=0;i!=nextguard;++i) if (guardians[i]==f) break;
if (i==nextguard) {
guardians[nextguard++] = f;
}
}
}
}
if (nextguard || tarned) {
@ -1833,20 +1844,20 @@ guards(FILE * F, const region * r, const faction * see)
return;
}
for (i = 0; i!=nextguard+(tarned?1:0); ++i) {
if (i!=0) {
if (i == nextguard-(tarned?0:1))
scat(" und ");
else
scat(", ");
}
if (i<nextguard) scat(factionname(guardians[i]));
for (i = 0; i!=nextguard+(tarned?1:0); ++i) {
if (i!=0) {
if (i == nextguard-(tarned?0:1))
scat(" und ");
else
scat(", ");
}
if (i<nextguard) scat(factionname(guardians[i]));
else scat("unbekannten Einheiten");
else scat("unbekannten Einheiten");
}
scat(" bewacht.");
rnl(F);
rparagraph(F, buf, 0, 0);
scat(" bewacht.");
rnl(F);
rparagraph(F, buf, 0, 0);
}
static void
@ -2355,54 +2366,48 @@ report(FILE *F, faction * f, const faction_list * addresses,
FILE *
openbatch(void)
{
faction *f;
FILE * BAT = NULL;
faction *f;
FILE * BAT = NULL;
/* falls und mind. ein internet spieler gefunden wird, schreibe den
* header des batch files. ab nun kann BAT verwendet werden, um zu
* pruefen, ob netspieler vorhanden sind und ins mailit batch
* geschrieben werden darf. */
/* falls und mind. ein internet spieler gefunden wird, schreibe den
* header des batch files. ab nun kann BAT verwendet werden, um zu
* pruefen, ob netspieler vorhanden sind und ins mailit batch
* geschrieben werden darf. */
for (f = factions; f; f = f->next) {
for (f = factions; f; f = f->next) {
/* bei "internet:" verschicken wir die mail per batchfile. für
* unix kann man alles in EIN batchfile schreiben, als
* sogenanntes "herefile". Konnte der batchfile nicht geoeffnet
* werden, schreiben wir die reports einzeln. der BAT file wird
* nur gemacht, wenn es auch internet benutzer gibt. */
/* bei "internet:" verschicken wir die mail per batchfile. für
* unix kann man alles in EIN batchfile schreiben, als
* sogenanntes "herefile". Konnte der batchfile nicht geoeffnet
* werden, schreiben wir die reports einzeln. der BAT file wird
* nur gemacht, wenn es auch internet benutzer gibt. */
if (f->email) {
sprintf(buf, "%s/mailit", reportpath());
if ((BAT = fopen(buf, "w")) == NULL)
log_error(("mailit konnte nicht geöffnet werden!\n"));
else
fprintf(BAT,
"#!/bin/sh\n"
"\n"
"# MAILIT shell file, vom Eressea Host generiert\n"
"#\n"
"# Verwendung: nohup mailit &\n"
"#\n"
"\n"
"PATH=%s\n"
"\n"
"chmod 755 *.sh\n"
"\n"
,MAILITPATH);
break;
if (f->email) {
sprintf(buf, "%s/mailit", reportpath());
if ((BAT = fopen(buf, "w")) == NULL)
log_error(("mailit konnte nicht geöffnet werden!\n"));
else
fprintf(BAT,
"#!/bin/sh\n\n"
"# MAILIT shell file, vom Eressea Host generiert\n#\n"
"# Verwendung: nohup mailit &\n#\n\n"
"PATH=%s\n\n"
"chmod 755 *.sh\n"
"\n", MailitPath());
break;
}
}
return BAT;
}
}
return BAT;
}
void
closebatch(FILE * BAT)
{
if (BAT) {
fputs("\n", BAT);
fclose(BAT);
}
if (BAT) {
fputs("\n", BAT);
fclose(BAT);
}
}
@ -2690,7 +2695,7 @@ reports(void)
if (f->no > 0 && f->email && BAT) {
sprintf(buf, "%s/%s.sh", reportpath(), factionid(f));
shfp = fopen(buf, "w");
fprintf(shfp,"#!/bin/sh\n\nPATH=%s\n\n",MAILITPATH);
fprintf(shfp,"#!/bin/sh\n\nPATH=%s\n\n",MailitPath());
fprintf(shfp,"if [ $# -ge 1 ]; then\n");
fprintf(shfp,"\taddr=$1\n");
fprintf(shfp,"else\n");

View File

@ -53,7 +53,17 @@
#define TEACHNUMBER 10
/* ------------------------------------------------------------- */
static boolean
ExpensiveMigrants()
{
int value = -1;
if (value<0) {
const char * str = get_param(global.parameters, "study.expensivemigrants");
value = str?atoi(str):0;
}
return value;
}
static skill_t
getskill(const struct locale * lang)
{
@ -510,13 +520,11 @@ learn(void)
/* keine kostenpflichtigen Talente für Migranten. Vertraute sind
* keine Migranten, wird in is_migrant abgefangen. Vorsicht,
* studycost darf hier noch nicht durch Akademie erhöht sein */
#if MIGRANTS_CAN_LEARN_EXPENSIVE_SKILLS == 0
if (is_migrant(u) && studycost > 0){
if (studycost > 0 && !ExpensiveMigrants() && is_migrant(u)) {
sprintf(buf, "Migranten können keine kostenpflichtigen Talente lernen");
mistake(u, u->thisorder, buf, MSG_EVENT);
continue;
}
#endif
/* Akademie: */
{
struct building * b = inside_building(u);

View File

@ -2606,41 +2606,41 @@ print_fighters(battle * b, cvector * fighters)
static void
print_header(battle * b)
{
bfaction * bf;
void **fi;
cvector *fighters = &b->fighters;
boolean * seen = malloc(sizeof(boolean)*cv_size(&b->sides));
bfaction * bf;
void **fi;
cvector *fighters = &b->fighters;
boolean * seen = malloc(sizeof(boolean)*cv_size(&b->sides));
for (bf=b->factions;bf;bf=bf->next) {
faction * f = bf->faction;
const char * lastf = NULL;
boolean first = false;
for (bf=b->factions;bf;bf=bf->next) {
faction * f = bf->faction;
const char * lastf = NULL;
boolean first = false;
strcpy(buf, "Der Kampf wurde ausgelöst von ");
memset(seen, 0, sizeof(boolean)*cv_size(&b->sides));
strcpy(buf, "Der Kampf wurde ausgelöst von ");
memset(seen, 0, sizeof(boolean)*cv_size(&b->sides));
for (fi = fighters->begin; fi != fighters->end; ++fi) {
fighter *df = *fi;
if (!fval(df, FIG_ATTACKED)) continue;
if (!seen[df->side->index] ) {
if (first) strcat(buf, ", ");
if (lastf) {
strcat(buf, lastf);
first = true;
}
if (seematrix(f, df->side) == true)
lastf = sidename(df->side, false);
else
lastf = "einer unbekannten Partei";
seen[df->side->index] = true;
}
}
if (first) strcat(buf, " und ");
if (lastf) strcat(buf, lastf);
strcat(buf, ".");
fbattlerecord(b, f, buf);
}
free(seen);
for (fi = fighters->begin; fi != fighters->end; ++fi) {
fighter *df = *fi;
if (!fval(df, FIG_ATTACKED)) continue;
if (!seen[df->side->index] ) {
if (first) strcat(buf, ", ");
if (lastf) {
strcat(buf, lastf);
first = true;
}
if (seematrix(f, df->side) == true)
lastf = sidename(df->side, false);
else
lastf = "einer unbekannten Partei";
seen[df->side->index] = true;
}
}
if (first) strcat(buf, " und ");
if (lastf) strcat(buf, lastf);
strcat(buf, ".");
fbattlerecord(b, f, buf);
}
free(seen);
}
static void

View File

@ -67,7 +67,16 @@
* Laen, Mallorn}, UnterSilber, UnterSpezialTyp, UnterSpezial */
/* ------------------------------------------------------------- */
static boolean
CheckOverload()
{
static int value = -1;
if (value<0) {
const char * str = get_param(global.parameters, "rules.check_overload");
value = str?atoi(str):0;
}
return value;
}
static int
slipthru(const region * r, const unit * u, const building * b)
@ -1130,8 +1139,7 @@ entership(unit * u, ship * sh, const char * cmd, boolean lasttry)
if (lasttry) cmistake(u, cmd, 34, MSG_MOVE);
return false;
}
#ifdef CHECK_OVERLOAD_ON_ENTER
{
if (CheckOverload()) {
int sweight, scabins;
int mweight = shipcapacity(sh);
int mcabins = sh->type->cabins;
@ -1146,7 +1154,6 @@ entership(unit * u, ship * sh, const char * cmd, boolean lasttry)
}
}
}
#endif
leave(u->region, u);
u->ship = sh;

View File

@ -104,65 +104,63 @@ get_force(double power, int formel)
int
sp_kampfzauber(fighter * fi, int level, double power, spell * sp)
{
battle *b = fi->side->battle;
troop dt;
troop at;
/* Immer aus der ersten Reihe nehmen */
int minrow = FIGHT_ROW;
int maxrow = BEHIND_ROW-1;
int force, enemies;
int killed = 0;
const char *damage;
at.fighter = fi;
at.index = 0;
battle *b = fi->side->battle;
troop at, dt;
message * m;
/* Immer aus der ersten Reihe nehmen */
int minrow = FIGHT_ROW;
int maxrow = BEHIND_ROW-1;
int force, enemies;
int killed = 0;
const char *damage;
if (power <= 0) return 0;
if (power <= 0) return 0;
at.fighter = fi;
at.index = 0;
sprintf(buf, "%s zaubert %s", unitname(fi->unit),
spell_name(sp, default_locale));
switch(sp->id) {
/* lovar halbiert im Schnitt! */
case SPL_FIREBALL:
damage = spell_damage(0);
force = lovar(get_force(power,0));
break;
case SPL_HAGEL:
damage = spell_damage(2);
force = lovar(get_force(power,4));
break;
case SPL_METEORRAIN:
damage = spell_damage(1);
force = lovar(get_force(power,1));
break;
default:
damage = spell_damage(10);
force = lovar(get_force(power,10));
}
switch(sp->id) {
/* lovar halbiert im Schnitt! */
case SPL_FIREBALL:
damage = spell_damage(0);
force = lovar(get_force(power,0));
break;
case SPL_HAGEL:
damage = spell_damage(2);
force = lovar(get_force(power,4));
break;
case SPL_METEORRAIN:
damage = spell_damage(1);
force = lovar(get_force(power,1));
break;
default:
damage = spell_damage(10);
force = lovar(get_force(power,10));
}
sprintf(buf, "%s zaubert %s", unitname(fi->unit),
spell_name(sp, default_locale));
enemies = count_enemies(b, fi->side, minrow, maxrow);
if (!enemies) {
message * m = msg_message("battle::out_of_range", "mage spell", fi->unit, sp);
message_all(b, m);
msg_release(m);
return 0;
}
scat(":");
battlerecord(b, buf);
enemies = count_enemies(b, fi->side, minrow, maxrow);
if (enemies==0) {
m = msg_message("battle::out_of_range", "mage spell", fi->unit, sp);
message_all(b, m);
msg_release(m);
return 0;
}
while (force>0 && killed < enemies) {
dt = select_enemy(b, fi, minrow, maxrow);
assert(dt.fighter);
--force;
killed += terminate(dt, at, AT_COMBATSPELL, damage, false);
}
while (force>0 && killed < enemies) {
dt = select_enemy(b, fi, minrow, maxrow);
assert(dt.fighter);
--force;
killed += terminate(dt, at, AT_COMBATSPELL, damage, false);
}
sprintf(buf, "%d Personen %s getötet",
killed, killed == 1 ? "wurde" : "wurden");
m = msg_message("battle::combatspell", "mage spell dead",
fi->unit, sp, killed);
message_all(b, m);
msg_release(m);
scat(".");
battlerecord(b, buf);
return level;
return level;
}
/* Versteinern */

View File

@ -2824,12 +2824,9 @@ magic(void)
continue;
}
if (range > 1024) { /* (2^10) weiter als 10 Regionen entfernt */
sprintf(buf, "%s in %s: 'ZAUBER %s' Zu der Region %s kann keine "
"Verbindung hergestellt werden", unitname(u),
regionid(u->region),
spell_name(sp, u->faction->locale),
regionid(target_r));
addmessage(0, u->faction, buf, MSG_MAGIC, ML_MISTAKE);
ADDMSG(&u->faction->msgs, msg_message("spellfail::nolevel",
"mage region order target", u, u->region, so->s,
gc_add(strdup(regionid(target_r)))));
continue;
}
}
@ -2838,11 +2835,8 @@ magic(void)
int ilevel = eff_skill(u, SK_MAGIC, u->region);
if (ilevel!=level) {
level = ilevel;
sprintf(buf, "%s in %s: 'ZAUBER %s' Dieser Zauber kann nicht "
"mit Stufenangabe gezaubert werden.", unitname(u),
regionid(u->region),
spell_name(sp, u->faction->locale));
addmessage(0, u->faction, buf, MSG_MAGIC, ML_WARN);
ADDMSG(&u->faction->msgs, msg_message("spellfail::nolevel",
"mage region order", u, u->region, so->s));
}
}
/* Vertrautenmagie */

View File

@ -1498,31 +1498,32 @@ writeregion(FILE * F, const region * r)
wnl(F);
}
static void
static ally **
addally(const faction * f, ally ** sfp, int aid, int state)
{
struct faction * af = findfaction(aid);
ally * sf;
state &= ~HELP_OBSERVE;
struct faction * af = findfaction(aid);
ally * sf;
state &= ~HELP_OBSERVE;
#ifndef REGIONOWNERS
state &= ~HELP_TRAVEL;
state &= ~HELP_TRAVEL;
#endif
#ifdef ALLIANCES
# ifdef ALLIES_ONLY
if (af!=NULL && af->alliance!=f->alliance) state &= ~ALLIES_ONLY;;
if (af!=NULL && af->alliance!=f->alliance) state &= ~ALLIES_ONLY;;
# else
# endif
if (af!=NULL && af->alliance!=f->alliance) return;
if (af!=NULL && af->alliance!=f->alliance) return;
#endif
if (state==0) return;
sf = calloc(1, sizeof(ally));
sf->faction = af;
if (!sf->faction) ur_add((void*)aid, (void**)&sf->faction, resolve_faction);
sf->status = state;
sf->next = *sfp;
sf->faction = af;
if (!sf->faction) ur_add((void*)aid, (void**)&sf->faction, resolve_faction);
sf->status = state;
*sfp = sf;
while (*sfp) sfp=&(*sfp)->next;
*sfp = sf;
return &sf;
}
/** Reads a faction from a file.
@ -1647,7 +1648,7 @@ readfaction(FILE * F)
while (--p >= 0) {
int aid = rid(F);
int state = ri(F);
addally(f, sfp, aid, state);
sfp = addally(f, sfp, aid, state);
}
} else {
for (;;) {
@ -1656,7 +1657,7 @@ readfaction(FILE * F)
else {
int aid = atoi36(buf);
int state = ri(F);
addally(f, sfp, aid, state);
sfp = addally(f, sfp, aid, state);
}
}
}

View File

@ -470,7 +470,7 @@ report_effect(region * r, unit * mage, message * seen, message * unseen)
* ML_WARN ausgegeben werden. (stehen im Kopf der Auswertung unter
* Zauberwirkungen)
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': [hier die Fehlermeldung].",
sprintf(buf, "%s in %s: 'ZAUBER %s': [hier die Fehlermeldung].",
unitname(mage), regionid(mage->region), sa->strings[0]);
add_message(0, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -1018,14 +1018,14 @@ sp_blessstonecircle(castorder *co)
b = p->param[0]->data.b;
if(b->type != bt_find("stonecircle")) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': %s ist kein Steinkreis.",
sprintf(buf, "%s in %s: 'ZAUBER %s': %s ist kein Steinkreis.",
unitname(mage), regionid(mage->region), co->order, buildingname(b));
addmessage(0, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
return 0;
}
if(b->size < b->type->maxsize) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': %s muss vor der Weihe "
sprintf(buf, "%s in %s: 'ZAUBER %s': %s muss vor der Weihe "
"fertiggestellt sein.", unitname(mage), regionid(mage->region),
co->order, buildingname(b));
addmessage(0, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -4334,109 +4334,106 @@ sp_raisepeasantmob(castorder *co)
static int
sp_migranten(castorder *co)
{
unit *target;
strlist *S;
int kontaktiert = 0;
region *r = co->rt;
unit *mage = (unit *)co->magician;
int cast_level = co->level;
spellparameter *pa = co->par;
spell *sp = co->sp;
unit *target;
strlist *S;
int kontaktiert = 0;
region *r = co->rt;
unit *mage = (unit *)co->magician;
int cast_level = co->level;
spellparameter *pa = co->par;
spell *sp = co->sp;
/* wenn kein Ziel gefunden, Zauber abbrechen */
if(pa->param[0]->flag == TARGET_NOTFOUND) return 0;
/* wenn kein Ziel gefunden, Zauber abbrechen */
if(pa->param[0]->flag == TARGET_NOTFOUND) return 0;
target = pa->param[0]->data.u; /* Zieleinheit */
target = pa->param[0]->data.u; /* Zieleinheit */
/* Personen unserer Rasse können problemlos normal übergeben werden */
if (target->race == mage->faction->race){
/* u ist von unserer Art, das Ritual wäre verschwendete Aura. */
ADDMSG(&mage->faction->msgs, msg_message(
"sp_migranten_fail1", "unit region command target", mage,
mage->region, strdup(co->order), target));
}
/* Auf eigene Einheiten versucht zu zaubern? Garantiert Tippfehler */
if (target->faction == mage->faction){
cmistake(mage, strdup(co->order), 45, MSG_MAGIC);
}
/* Personen unserer Rasse können problemlos normal übergeben werden */
if (target->race == mage->faction->race){
/* u ist von unserer Art, das Ritual wäre verschwendete Aura. */
ADDMSG(&mage->faction->msgs, msg_message(
"sp_migranten_fail1", "unit region command target", mage,
mage->region, strdup(co->order), target));
}
/* Auf eigene Einheiten versucht zu zaubern? Garantiert Tippfehler */
if (target->faction == mage->faction){
cmistake(mage, strdup(co->order), 45, MSG_MAGIC);
}
/* Keine Monstereinheiten */
if (!playerrace(target->race)){
sprintf(buf, "%s kann nicht auf Monster gezaubert werden.",
spell_name(sp, mage->faction->locale));
addmessage(0, mage->faction, buf, MSG_EVENT, ML_WARN);
return 0;
}
/* niemand mit teurem Talent */
if (teure_talente(target)) {
sprintf(buf, "%s hat unaufkündbare Bindungen an seine alte Partei.",
unitname(target));
addmessage(0, mage->faction, buf, MSG_EVENT, ML_WARN);
return 0;
}
/* maximal Stufe Personen */
if (target->number > cast_level
|| target->number > max_spellpoints(r, mage))
{
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': So viele Personen übersteigen "
"meine Kräfte.", unitname(mage), regionid(mage->region),
spell_name(sp, mage->faction->locale));
addmessage(0, mage->faction, buf, MSG_MAGIC, ML_WARN);
}
/* Keine Monstereinheiten */
if (!playerrace(target->race)){
sprintf(buf, "%s kann nicht auf Monster gezaubert werden.",
spell_name(sp, mage->faction->locale));
addmessage(0, mage->faction, buf, MSG_EVENT, ML_WARN);
return 0;
}
/* niemand mit teurem Talent */
if (teure_talente(target)) {
sprintf(buf, "%s hat unaufkündbare Bindungen an seine alte Partei.",
unitname(target));
addmessage(0, mage->faction, buf, MSG_EVENT, ML_WARN);
return 0;
}
/* maximal Stufe Personen */
if (target->number > cast_level
|| target->number > max_spellpoints(r, mage))
{
sprintf(buf, "%s in %s: 'ZAUBER %s': So viele Personen übersteigen "
"meine Kräfte.", unitname(mage), regionid(mage->region),
spell_name(sp, mage->faction->locale));
addmessage(0, mage->faction, buf, MSG_MAGIC, ML_WARN);
}
/* Kontakt prüfen (aus alter Teleportroutine übernommen) */
{
/* Nun kommt etwas reichlich krankes, um den
* KONTAKTIERE-Befehl des Ziels zu überprüfen. */
/* Kontakt prüfen (aus alter Teleportroutine übernommen) */
{
/* Nun kommt etwas reichlich krankes, um den
* KONTAKTIERE-Befehl des Ziels zu überprüfen. */
for (S = target->orders; S; S = S->next) {
if (strncasecmp("KON", S->s, 3) == 0) {
char *c;
int kontakt = -1;
/* So weit, so gut. S->s ist also ein KONTAKTIERE. Nun gilt es,
* herauszufinden, wer kontaktiert wird. Das ist nicht trivial.
* Zuerst muß der Parameter herausoperiert werden. */
/* Leerzeichen finden */
for (S = target->orders; S; S = S->next) {
if (strncasecmp("KON", S->s, 3) == 0) {
char *c;
int kontakt = -1;
/* So weit, so gut. S->s ist also ein KONTAKTIERE. Nun gilt es,
* herauszufinden, wer kontaktiert wird. Das ist nicht trivial.
* Zuerst muß der Parameter herausoperiert werden. */
/* Leerzeichen finden */
for (c = S->s; *c != 0; c++) {
if (isspace((int)*c) != 0) {
break;
}
}
for (c = S->s; *c != 0; c++) {
if (isspace((int)*c) != 0) {
break;
}
}
/* Wenn ein Leerzeichen da ist, ist *c != 0 und zeigt auf das
* Leerzeichen. */
/* Wenn ein Leerzeichen da ist, ist *c != 0 und zeigt auf das
* Leerzeichen. */
if (*c == 0) {
continue;
}
kontakt = atoi36(c);
if (*c == 0) {
continue;
}
kontakt = atoi36(c);
if (kontakt == mage->no) {
kontaktiert = 1;
break;
}
}
}
}
if (kontakt == mage->no) {
kontaktiert = 1;
break;
}
}
}
}
if (kontaktiert == 0){
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Die Einheit %s hat keinen "
"Kontakt mit uns aufgenommen.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale)
, unitname(target));
addmessage(0, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
return 0;
}
u_setfaction(target,mage->faction);
set_string(&target->thisorder, "");
if (kontaktiert == 0) {
ADDMSG(&mage->faction->msgs, msg_message("spellfail::contact",
"mage region order target", mage, mage->region, strdup(co->order),
target));
return 0;
}
u_setfaction(target,mage->faction);
set_string(&target->thisorder, "");
/* Erfolg melden */
ADDMSG(&mage->faction->msgs, msg_message(
"sp_migranten", "unit region command target", mage,
mage->region, strdup(co->order), target));
/* Erfolg melden */
ADDMSG(&mage->faction->msgs, msg_message("sp_migranten",
"unit region command target", mage, mage->region, strdup(co->order), target));
return target->number;
return target->number;
}
/* ------------------------------------------------------------- */
@ -5824,7 +5821,7 @@ sp_enterastral(castorder *co)
ro = r;
break;
default:
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Dieser Zauber funktioniert "
sprintf(buf, "%s in %s: 'ZAUBER %s': Dieser Zauber funktioniert "
"nur in der materiellen Welt.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -5832,7 +5829,7 @@ sp_enterastral(castorder *co)
}
if(!rt) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Es kann hier kein Kontakt zur "
sprintf(buf, "%s in %s: 'ZAUBER %s': Es kann hier kein Kontakt zur "
"Astralwelt hergestellt werden.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -5841,7 +5838,7 @@ sp_enterastral(castorder *co)
if(is_cursed(rt->attribs, C_ASTRALBLOCK, 0) ||
is_cursed(ro->attribs, C_ASTRALBLOCK, 0)) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Es kann kein Kontakt zu "
sprintf(buf, "%s in %s: 'ZAUBER %s': Es kann kein Kontakt zu "
"dieser astralen Region hergestellt werden.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -5948,7 +5945,7 @@ sp_pullastral(castorder *co)
rl2 = rl2->next;
}
if(!rl2) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Es kann kein Kontakt zu "
sprintf(buf, "%s in %s: 'ZAUBER %s': Es kann kein Kontakt zu "
"dieser Region hergestellt werden.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -5958,7 +5955,7 @@ sp_pullastral(castorder *co)
free_regionlist(rl);
break;
default:
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Dieser Zauber funktioniert "
sprintf(buf, "%s in %s: 'ZAUBER %s': Dieser Zauber funktioniert "
"nur in der astralen Welt.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -5967,7 +5964,7 @@ sp_pullastral(castorder *co)
if(is_cursed(rt->attribs, C_ASTRALBLOCK, 0) ||
is_cursed(ro->attribs, C_ASTRALBLOCK, 0)) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Es kann kein Kontakt zu "
sprintf(buf, "%s in %s: 'ZAUBER %s': Es kann kein Kontakt zu "
"dieser Region hergestellt werden.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale));
addmessage(r, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -6623,7 +6620,7 @@ sp_permtransfer(castorder *co)
aura = pa->param[0]->data.i;
if(!is_mage(tu)) {
/* sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Einheit ist kein Magier."
/* sprintf(buf, "%s in %s: 'ZAUBER %s': Einheit ist kein Magier."
, unitname(mage), regionid(mage->region),sa->strings[0]); */
cmistake(mage, strdup(co->order), 214, MSG_MAGIC);
return 0;
@ -6669,7 +6666,7 @@ sp_movecastle(castorder *co)
dir = finddirection(pa->param[1]->data.s, mage->faction->locale);
if(dir == NODIRECTION) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Ungültige Richtung %s.",
sprintf(buf, "%s in %s: 'ZAUBER %s': Ungültige Richtung %s.",
unitname(mage), regionid(mage->region),
spell_name(sp, mage->faction->locale),
pa->param[1]->data.s);
@ -6678,7 +6675,7 @@ sp_movecastle(castorder *co)
}
if(b->size > (cast_level-12) * 250) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Der Elementar ist "
sprintf(buf, "%s in %s: 'ZAUBER %s': Der Elementar ist "
"zu klein, um das Gebäude zu tragen.", unitname(mage),
regionid(mage->region), spell_name(sp, mage->faction->locale));
addmessage(0, mage->faction, buf, MSG_MAGIC, ML_MISTAKE);
@ -6688,7 +6685,7 @@ sp_movecastle(castorder *co)
target_region = rconnect(r,dir);
if(!(terrain[target_region->terrain].flags & LAND_REGION)) {
sprintf(buf, "%s in %s: 'ZAUBER \"%s\"': Der Erdelementar "
sprintf(buf, "%s in %s: 'ZAUBER %s': Der Erdelementar "
"weigert sich, nach %s zu gehen.",
unitname(mage), regionid(mage->region),
spell_name(sp, mage->faction->locale),

View File

@ -39,13 +39,8 @@
#define ZEROFOKS_QUESTMASTER "eressea@zerofoks.net"
#define CHECK_OVERLOAD_ON_ENTER
#undef REGIONOWNERS
#undef DUNGEON_MODULE
#define MUSEUM_MODULE
#define ARENA_MODULE
#define WORMHOLE_MODULE
#define MAILITPATH "/usr/sbin:$HOME/eressea/bin:/bin:/usr/bin:/usr/local/bin"

View File

@ -35,5 +35,3 @@
#define PEASANTS_DO_NOT_STARVE 0
#define NEW_MIGRATION 1
#define ASTRAL_HUNGER
#define MAILITPATH "/usr/sbin:$HOME/tutorial/bin:/bin:/usr/bin:/usr/local/bin"

View File

@ -34,7 +34,6 @@
#define COMBAT_TURNS 5
#define PEASANTS_DO_NOT_STARVE 0
#define NEW_MIGRATION 1
#define MIGRANTS_CAN_LEARN_EXPENSIVE_SKILLS 1 /* vinyambar 3 only */
#if NEWATSROI == 1
#define ATSBONUS 2

View File

@ -1,38 +0,0 @@
/* vi: set ts=2:
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
| | Enno Rehling <enno@eressea-pbem.de>
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
| (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de>
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
+-------------------+ Stefan Reich <reich@halbling.de>
This program may not be used, modified or distributed
without prior permission by the authors of Eressea.
*/
/*
* Contains defines for the "classic" game (Vinyambar I) .
* Include this file from settings.h to make eressea work.
*/
#define ENTERTAINFRACTION 20
#define IMMUN_GEGEN_ANGRIFF 8
#define RESOURCE_CONVERSION 0
#define NEW_RESOURCEGROWTH 0
#define LARGE_CASTLES 0
#define GROWING_TREES 0
#define REDUCED_PEASANTGROWTH 0
#define RACE_ADJUSTMENTS 0
#define TEACHDIFFERENCE 1
#define PEASANT_ADJUSTMENT 0
#define GUARD_DISABLES_RECRUIT 0
#define GUARD_DISABLES_PRODUCTION 0
#define RESOURCE_QUANTITY 1.0
#define RECRUITFRACTION 20
#define CATAPULT_AMMUNITION 0
#define CHANGED_CROSSBOWS 0
#define NEWATSROI 0
#define COMBAT_TURNS 10
#define PEASANTS_DO_NOT_STARVE 0
#define NEW_MIGRATION 1
#define MAILITPATH "/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"

View File

@ -1,38 +0,0 @@
/* vi: set ts=2:
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
| | Enno Rehling <enno@eressea-pbem.de>
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
| (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de>
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
+-------------------+ Stefan Reich <reich@halbling.de>
This program may not be used, modified or distributed
without prior permission by the authors of Eressea.
*/
/*
* Contains defines for the "modern" vinyambar game.
* Include this file from settings.h to make eressea work.
*/
#define ENTERTAINFRACTION 20
#define IMMUN_GEGEN_ANGRIFF 8
#define RESOURCE_CONVERSION 1
#define NEW_RESOURCEGROWTH 1
#define LARGE_CASTLES 1
#define GROWING_TREES 1
#define REDUCED_PEASANTGROWTH 0
#define RACE_ADJUSTMENTS 0
#define TEACHDIFFERENCE 1
#define PEASANT_ADJUSTMENT 0
#define GUARD_DISABLES_RECRUIT 0
#define GUARD_DISABLES_PRODUCTION 0
#define RESOURCE_QUANTITY 1.0
#define RECRUITFRACTION 20
#define CATAPULT_AMMUNITION 0
#define CHANGED_CROSSBOWS 0
#define NEWATSROI 0
#define COMBAT_TURNS 10
#define PEASANTS_DO_NOT_STARVE 0
#define NEW_MIGRATION 1
#define MAILITPATH "/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"

View File

@ -34,7 +34,6 @@
#define COMBAT_TURNS 5
#define PEASANTS_DO_NOT_STARVE 0
#define NEW_MIGRATION 1
#define MIGRANTS_CAN_LEARN_EXPENSIVE_SKILLS 1 /* vinyambar 3 only */
#define ASTRAL_HUNGER
#if NEWATSROI == 1
@ -52,5 +51,3 @@
#define WDW_PHOENIX
#define WDW_PYRAMIDSPELL
#define NEW_STARTEQUIPMENT
#define MAILITPATH "/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"

View File

@ -26,7 +26,9 @@
<param name="GiveRestriction" value="3"/>
<param name="hunger.long" value="1"/>
<param name="database.gameid" value="0"/>
<param name="rules.check_overload" value="1"/>
<param name="firstturn" value="184"/>
<param name="report.mailit" value="/usr/sbin:$HOME/eressea/bin:/bin:/usr/bin:/usr/local/bin"/>
</game>
<xi:include href="eressea/de/strings.xml"/>
<xi:include href="eressea/en/strings.xml"/>

View File

@ -5762,6 +5762,15 @@
<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::combatspell" section="battle">
<type>
<arg name="mage" type="unit"/>
<arg name="spell" type="spell"/>
<arg name="dead" type="int"/>
</type>
<text locale="de">"$unit($mage) zaubert $spell($spell): $int($dead) $if($eq($dead,1),"Krieger wurde", "Krieger wurden") getötet."</text>
<text locale="en">"$unit($mage) casts $spell($spell): $int($dead) $if($eq($dead,1),"enemy was", "enemies were") killed."</text>
</message>
<message name="battle::army_report" section="battle">
<type>
<arg name="index" type="int"/>
@ -5773,5 +5782,34 @@
<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>
<message name="spellfail::nolevel" section="magic">
<type>
<arg name="mage" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
<text locale="de">"$unit($mage) in $region($region): '$order($command)' - Dieser Zauber kann nicht mit Stufenangabe gezaubert werden."</text>
<text locale="en">"$unit($mage) in $region($region): '$order($command)' - This spell cannot be cast with variable level."</text>
</message>
<message name="spellfail::nocontact" section="magic">
<type>
<arg name="mage" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="target" type="string"/>
</type>
<text locale="de">"$unit($mage) in $region($region): '$order($command)' - Zur Region $target kann kein Kontakt hergestellt werden."</text>
<text locale="en">"$unit($mage) in $region($region): '$order($command)' - The region $target could not be contacted."</text>
</message>
<message name="spellfail::contact" section="magic">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="target" type="unit"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Einheit $unit($target) hat keinen Kontakt mit uns aufgenommen."</text>
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The unit $unit($target) did not contact us."</text>
</message>
</messages>

View File

@ -1,44 +1,45 @@
<?xml version="1.0"?>
<eressea xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="messages.xml"/>
<xi:include href="messages.xml"/>
<comment>Localization</comment>
<xi:include href="de/strings.xml"/>
<xi:include href="en/strings.xml"/>
<xi:include file="fr/strings.xml"/>
<comment>Localization</comment>
<xi:include href="de/strings.xml"/>
<xi:include href="en/strings.xml"/>
<xi:include file="fr/strings.xml"/>
<xi:include href="races.xml"/>
<xi:include href="resources.xml"/>
<xi:include href="ships.xml"/>
<xi:include href="buildings.xml"/>
<xi:include href="races.xml"/>
<xi:include href="resources.xml"/>
<xi:include href="ships.xml"/>
<xi:include href="buildings.xml"/>
<game name="Tutorial" welcome="tutorial">
<comment>Game specific</comment>
<order name="EMAIL" disable="yes"></order>
<order name="MEINUNG" disable="yes"></order>
<order name="MAGIEGEBIET" disable="yes"></order>
<param name="entertain.base" value="0"></param>
<param name="entertain.perlevel" value="20"></param>
<param name="nmr.timeout" value="2"></param>
<param name="nmr.removenewbie" value="1"></param>
<param name="GiveRestriction" value="3"></param>
<param name="database.gameid" value="1"></param>
<param name="hunger.long" value="1"></param>
<param name="MaxAge" value="8"></param>
</game>
<xi:include file="tutorial/de/strings.xml"/>
<xi:include file="tutorial/en/strings.xml"/>
<xi:include file="eressea/races.xml"/>
<xi:include file="eressea/items.xml"/>
<xi:include file="eressea/dungeons.xml"/>
<strings>
<string name="mailto">
<text locale="en">tutorial@eressea.upb.de</text>
<text locale="de">tutorial@eressea.upb.de</text>
</string>
<string name="mailcmd">
<text locale="de">ERESSEA BEFEHLE</text>
<text locale="en">ERESSEA ORDERS</text>
</string>
</strings>
<game name="Tutorial" welcome="tutorial">
<comment>Game specific</comment>
<order name="EMAIL" disable="yes"></order>
<order name="MEINUNG" disable="yes"></order>
<order name="MAGIEGEBIET" disable="yes"></order>
<param name="entertain.base" value="0"></param>
<param name="entertain.perlevel" value="20"></param>
<param name="nmr.timeout" value="2"></param>
<param name="nmr.removenewbie" value="1"></param>
<param name="GiveRestriction" value="3"></param>
<param name="database.gameid" value="1"></param>
<param name="hunger.long" value="1"></param>
<param name="MaxAge" value="8"></param>
<param name="report.mailit" value="/usr/sbin:$HOME/eressea/bin:/bin:/usr/bin:/usr/local/bin"/>
</game>
<xi:include file="tutorial/de/strings.xml"/>
<xi:include file="tutorial/en/strings.xml"/>
<xi:include file="eressea/races.xml"/>
<xi:include file="eressea/items.xml"/>
<xi:include file="eressea/dungeons.xml"/>
<strings>
<string name="mailto">
<text locale="en">tutorial@eressea.upb.de</text>
<text locale="de">tutorial@eressea.upb.de</text>
</string>
<string name="mailcmd">
<text locale="de">ERESSEA BEFEHLE</text>
<text locale="en">ERESSEA ORDERS</text>
</string>
</strings>
</eressea>

View File

@ -1,36 +1,38 @@
<eressea>
<include file="messages.xml"></include>
<include file="messages.xml"></include>
<comment>Localization</comment>
<include file="de/strings.xml"></include>
<include file="en/strings.xml"></include>
<comment>Localization</comment>
<include file="de/strings.xml"></include>
<include file="en/strings.xml"></include>
<include file="races.xml"></include>
<include file="resources.xml"></include>
<include file="ships.xml"></include>
<include file="buildings.xml"></include>
<include file="races.xml"></include>
<include file="resources.xml"></include>
<include file="ships.xml"></include>
<include file="buildings.xml"></include>
<game name="Kreis der Macht" units="250" welcome="vinyambar">
<comment>Game specific</comment>
<order name="ARBEITEN" disable></order>
<order name="MEINUNG" disable></order>
<order name="MAGIEGEBIET" disable></order>
<param name="entertain.base" value="15"></param>
<param name="entertain.perlevel" value="5"></param>
<param name="nmr.timeout" value="5"></param>
<param name="nmr.removenewbie" value="0"></param>
<param name="GiveRestriction" value="0"></param>
<param name="database.gameid" value="3"></param>
<param name="hunger.long" value="0"></param>
</game>
<include file="vinyambar/de/strings.xml"></include>
<include file="vinyambar/stronghold.xml"></include>
<strings>
<string name="mailto">
<text>vinyambar@eressea.amber.kn-bremen.de</text>
</string>
<string name="mailcmd">
<text>VIN3 BEFEHLE</text>
</string>
</strings>
<game name="Kreis der Macht" units="250" welcome="vinyambar">
<comment>Game specific</comment>
<order name="ARBEITEN" disable></order>
<order name="MEINUNG" disable></order>
<order name="MAGIEGEBIET" disable></order>
<param name="entertain.base" value="15"></param>
<param name="entertain.perlevel" value="5"></param>
<param name="nmr.timeout" value="5"></param>
<param name="nmr.removenewbie" value="0"></param>
<param name="GiveRestriction" value="0"></param>
<param name="database.gameid" value="3"></param>
<param name="hunger.long" value="0"></param>
<param name="study.expensivemigrants" value="1"/>
<param name="report.mailit" value="/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"/>
</game>
<include file="vinyambar/de/strings.xml"></include>
<include file="vinyambar/stronghold.xml"></include>
<strings>
<string name="mailto">
<text>vinyambar@eressea.amber.kn-bremen.de</text>
</string>
<string name="mailcmd">
<text>VIN3 BEFEHLE</text>
</string>
</strings>
</eressea>

View File

@ -31,6 +31,8 @@
<param name="magic.regeneration" value="0.5"/>
<param name="magic.power" value="0.5"/>
<param name="resource.factor" value="0.25"/>
<param name="study.expensivemigrants" value="1"/>
<param name="report.mailit" value="/usr/sbin:$HOME/bin:/bin:/usr/bin:/usr/local/bin"/>
</game>
<xi:include href="vinyambar/wdw-strings.xml"/>