"road anstatt straße im cr"
This commit is contained in:
Enno Rehling 2007-12-18 19:58:17 +00:00
parent ef77f0ad2b
commit e780097a3b
6 changed files with 489 additions and 418 deletions

View File

@ -1116,9 +1116,9 @@ cr_borders(seen_region ** seen, const region * r, const faction * f, int seemode
}
}
if (cs) {
const char * bname = b->type->__name; /* bug 1326 - I hate this */
const char * bname = b->type->name(b, r, f, 0); /* bug 1326 - I hate this */
fprintf(F, "GRENZE %d\n", ++g);
fprintf(F, "\"%s\";typ\n", LOC(default_locale, bname));
fprintf(F, "\"%s\";typ\n", LOC(default_locale, mkname("border", bname)));
fprintf(F, "%d;richtung\n", d);
if (!b->type->transparent(b, f)) fputs("1;opaque\n", F);
/* hack: */

View File

@ -840,7 +840,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
const char *tname;
struct edge {
struct edge * next;
char * name;
const char * name;
boolean transparent;
boolean block;
boolean exist[MAXDIRECTIONS];
@ -868,10 +868,10 @@ describe(FILE * F, const region * r, int partial, faction * f)
b = b->next;
continue;
}
while (e && (e->transparent != transparent || strcmp(name,e->name))) e = e->next;
while (e && (e->transparent != transparent || strcmp(name, e->name))) e = e->next;
if (!e) {
e = calloc(sizeof(struct edge), 1);
e->name = strdup(name);
e->name = name;
e->transparent = transparent;
e->next = edges;
edges = e;
@ -989,7 +989,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
bytes = (int)strlcpy(bufp, LOC(f->locale, resourcename(oldresourcetype[R_SILVER], rmoney(r)!=1)), size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
}
/* Pferde */
/* horses */
if (rhorses(r)) {
bytes = snprintf(bufp, size, ", %d ", rhorses(r));
@ -1152,7 +1152,7 @@ describe(FILE * F, const region * r, int partial, faction * f)
if (!e->transparent) bytes = (int)strlcpy(bufp, " versperrt ", size);
else bytes = (int)strlcpy(bufp, " befindet sich ", size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, e->name, size);
bytes = (int)strlcpy(bufp, LOC(f->locale, mkname("border", e->name)), size);
if (wrptr(&bufp, &size, bytes)!=0) WARN_STATIC_BUFFER();
if (!e->transparent) bytes = (int)strlcpy(bufp, " die Sicht.", size);
else bytes = (int)strlcpy(bufp, ".", size);
@ -1163,7 +1163,6 @@ describe(FILE * F, const region * r, int partial, faction * f)
if (edges) {
while (edges) {
e = edges->next;
free(edges->name);
free(edges);
edges = e;
}

View File

@ -1,7 +1,7 @@
/* vi: set ts=2:
*
*
* Eressea PB(E)M host Copyright (C) 1998-2003
* Eressea PB(E)M host Copyright (C) 1998-2003
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
* Henning Peters (faroul@beyond.kn-bremen.de)
@ -41,10 +41,10 @@ border_type * bordertypes;
void
free_borders(void)
{
int i;
for (i=0;i!=BMAXHASH;++i) {
borders[i] = NULL;
}
int i;
for (i=0;i!=BMAXHASH;++i) {
borders[i] = NULL;
}
}
border *
@ -144,11 +144,11 @@ erase_border(border * b)
void
register_bordertype(border_type * type)
{
border_type ** btp = &bordertypes;
border_type ** btp = &bordertypes;
while (*btp && *btp!=type) btp = &(*btp)->next;
if (*btp) return;
*btp = type;
while (*btp && *btp!=type) btp = &(*btp)->next;
if (*btp) return;
*btp = type;
}
@ -217,17 +217,17 @@ boolean b_uinvisible(const border * b, const unit * u) { unused(u); unused(b); r
static int
a_agecountdown(attrib * a)
{
a->data.i = max(a->data.i-1, 0);
return a->data.i;
a->data.i = max(a->data.i-1, 0);
return a->data.i;
}
attrib_type at_countdown = {
"countdown",
DEFAULT_INIT,
DEFAULT_FINALIZE,
a_agecountdown,
a_writeint,
a_readint
"countdown",
DEFAULT_INIT,
DEFAULT_FINALIZE,
a_agecountdown,
a_writeint,
a_readint
};
void
@ -278,97 +278,96 @@ age_borders(void)
static const char *
b_namewall(const border * b, const region * r, const struct faction * f, int gflags)
{
unused(f);
unused(r);
unused(b);
if (gflags & GF_ARTICLE) return "eine Wand";
return "Wand";
unused(f);
unused(r);
unused(b);
if (gflags & GF_ARTICLE) return "a_wall";
return "wall";
}
border_type bt_wall = {
"wall", VAR_INT,
b_opaque,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockall, /* block */
b_namewall, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
"wall", VAR_INT,
b_opaque,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockall, /* block */
b_namewall, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
};
border_type bt_noway = {
"noway", VAR_INT,
b_transparent,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockall, /* block */
NULL, /* name */
b_rinvisible, /* rvisible */
b_finvisible, /* fvisible */
b_uinvisible, /* uvisible */
"noway", VAR_INT,
b_transparent,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockall, /* block */
NULL, /* name */
b_rinvisible, /* rvisible */
b_finvisible, /* fvisible */
b_uinvisible, /* uvisible */
};
static const char *
b_namefogwall(const border * b, const region * r, const struct faction * f, int gflags)
{
unused(f);
unused(b);
unused(r);
if (gflags & GF_ARTICLE) return "eine Nebelwand";
return "Nebelwand";
unused(f);
unused(b);
unused(r);
if (gflags & GF_ARTICLE) return "a_fogwall";
return "fogwall";
}
static boolean
b_blockfogwall(const border * b, const unit * u, const region * r)
{
unused(b);
unused(r);
if (!u) return true;
return (boolean)(effskill(u, SK_OBSERVATION) > 4); /* Das ist die alte Nebelwand */
unused(b);
unused(r);
if (!u) return true;
return (boolean)(effskill(u, SK_OBSERVATION) > 4); /* Das ist die alte Nebelwand */
}
border_type bt_fogwall = {
"fogwall", VAR_INT,
b_transparent, /* transparent */
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockfogwall, /* block */
b_namefogwall, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
"fogwall", VAR_INT,
b_transparent, /* transparent */
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockfogwall, /* block */
b_namefogwall, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
};
static const char *
b_nameillusionwall(const border * b, const region * r, const struct faction * f, int gflags)
{
/* TODO: UNICODE: f->locale bestimmt die Sprache */
int fno = b->data.i;
unused(b);
unused(r);
if (gflags & GF_ARTICLE) return (f && fno==f->subscription)?"eine Illusionswand":"eine Wand";
return (f && fno==f->no)?"Illusionswand":"Wand";
int fno = b->data.i;
unused(b);
unused(r);
if (gflags & GF_ARTICLE) return (f && fno==f->subscription)?"an_illusionwall":"a_wall";
return (f && fno==f->no)?"illusionwall":"wall";
}
border_type bt_illusionwall = {
"illusionwall", VAR_INT,
b_opaque,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blocknone, /* block */
b_nameillusionwall, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
"illusionwall", VAR_INT,
b_opaque,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blocknone, /* block */
b_nameillusionwall, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
};
/***
@ -376,45 +375,44 @@ border_type bt_illusionwall = {
***/
boolean b_blockquestportal(const border * b, const unit * u, const region * r) {
if(b->data.i > 0) return true;
return false;
if(b->data.i > 0) return true;
return false;
}
static const char *
b_namequestportal(const border * b, const region * r, const struct faction * f, int gflags)
{
/* TODO: UNICODE: f->locale bestimmt die Sprache */
int lock = b->data.i;
unused(b);
unused(r);
int lock = b->data.i;
unused(b);
unused(r);
if (gflags & GF_ARTICLE) {
if(lock > 0) {
return "ein gewaltiges verschlossenes Tor";
} else {
return "ein gewaltiges offenes Tor";
}
} else {
if(lock > 0) {
return "gewaltiges verschlossenes Tor";
} else {
return "gewaltiges offenes Tor";
}
}
if (gflags & GF_ARTICLE) {
if(lock > 0) {
return "a_gate_locked";
} else {
return "a_gate_open";
}
} else {
if(lock > 0) {
return "gate_locked";
} else {
return "gate_open";
}
}
}
border_type bt_questportal = {
"questportal", VAR_INT,
b_opaque,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockquestportal, /* block */
b_namequestportal, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
"questportal", VAR_INT,
b_opaque,
NULL, /* init */
NULL, /* destroy */
b_read, /* read */
b_write, /* write */
b_blockquestportal, /* block */
b_namequestportal, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */
};
/***
@ -430,32 +428,32 @@ b_nameroad(const border * b, const region * r, const struct faction * f, int gfl
unused(f);
if (gflags & GF_ARTICLE) {
if (!(gflags & GF_DETAILED)) return LOC(f->locale, "nr_a_road");
if (!(gflags & GF_DETAILED)) return "a_road";
else if (r->terrain->max_road<=local) {
int remote = (r2==b->from)?b->data.sa[0]:b->data.sa[1];
if (r2->terrain->max_road<=remote) {
return LOC(f->locale, "nr_a_road");
return "a_road";
} else {
return LOC(f->locale, "nr_an_incomplete_road");
return "an_incomplete_road";
}
} else {
int percent = max(1, 100*local/r->terrain->max_road);
if (local) {
snprintf(buffer, sizeof(buffer), LOC(f->locale, "nr_road_percent"), percent);
snprintf(buffer, sizeof(buffer), "a_road_percent", percent);
} else {
return LOC(f->locale, "nr_a_road_connection");
return "a_road_connection";
}
}
}
else if (gflags & GF_PLURAL) return LOC(f->locale, "nr_roads");
else return LOC(f->locale, "nr_road");
else if (gflags & GF_PLURAL) return "roads";
else return "road";
return buffer;
}
static void
b_readroad(border * b, FILE *f)
{
fscanf(f, "%hd %hd ", &b->data.sa[0], &b->data.sa[1]);
fscanf(f, "%hd %hd ", &b->data.sa[0], &b->data.sa[1]);
}
static void
@ -467,8 +465,8 @@ b_writeroad(const border * b, FILE *f)
static boolean
b_validroad(const border * b)
{
if (b->data.sa[0]==SHRT_MAX) return false;
return true;
if (b->data.sa[0]==SHRT_MAX) return false;
return true;
}
static boolean
@ -486,18 +484,18 @@ b_rvisibleroad(const border * b, const region * r)
}
border_type bt_road = {
"road", VAR_INT,
b_transparent,
NULL, /* init */
NULL, /* destroy */
b_readroad, /* read */
b_writeroad, /* write */
b_blocknone, /* block */
b_nameroad, /* name */
b_rvisibleroad, /* rvisible */
b_finvisible, /* fvisible */
b_uinvisible, /* uvisible */
b_validroad /* valid */
"road", VAR_INT,
b_transparent,
NULL, /* init */
NULL, /* destroy */
b_readroad, /* read */
b_writeroad, /* write */
b_blocknone, /* block */
b_nameroad, /* name */
b_rvisibleroad, /* rvisible */
b_finvisible, /* fvisible */
b_uinvisible, /* uvisible */
b_validroad /* valid */
};
void

View File

@ -1,7 +1,7 @@
/* vi: set ts=2:
*
*
* Eressea PB(E)M host Copyright (C) 1998-2003
* Eressea PB(E)M host Copyright (C) 1998-2003
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
* Henning Peters (faroul@beyond.kn-bremen.de)
@ -80,39 +80,39 @@ static region * start_region[6];
static region *
arena_region(int magic)
{
return tower_region[magic];
return tower_region[magic];
}
static building *
arena_tower(int magic)
{
return arena_region(magic)->buildings;
return arena_region(magic)->buildings;
}
static int
leave_fail(unit * u)
{
ADDMSG(&u->faction->msgs, msg_message("arena_leave_fail", "unit", u));
return 1;
return 1;
}
static int
leave_arena(struct unit * u, const struct item_type * itype, int amount, order * ord)
{
if (!u->building && leave_fail(u)) return -1;
if (u->building!=arena_tower(u->faction->magiegebiet) && leave_fail(u)) return -1;
unused(amount);
unused(ord);
unused(itype);
assert(!"not implemented");
return 0;
if (!u->building && leave_fail(u)) return -1;
if (u->building!=arena_tower(u->faction->magiegebiet) && leave_fail(u)) return -1;
unused(amount);
unused(ord);
unused(itype);
assert(!"not implemented");
return 0;
}
static int
enter_fail(unit * u)
{
ADDMSG(&u->faction->msgs, msg_message("arena_enter_fail", "region unit", u->region, u));
return 1;
return 1;
}
static int
@ -136,16 +136,16 @@ enter_arena(unit * u, const item_type * itype, int amount, order * ord)
assert(!"not implemented");
/*
for (res=0;res!=MAXRESOURCES;++res) if (res!=R_SILVER && res!=R_ARENA_GATE && (is_item(res) || is_herb(res) || is_potion(res))) {
int x = get_resource(u, res);
if (x) {
if (u2) {
change_resource(u2, res, x);
change_resource(u, res, -x);
}
else if (enter_fail(u)) return -1;
}
}
for (res=0;res!=MAXRESOURCES;++res) if (res!=R_SILVER && res!=R_ARENA_GATE && (is_item(res) || is_herb(res) || is_potion(res))) {
int x = get_resource(u, res);
if (x) {
if (u2) {
change_resource(u2, res, x);
change_resource(u, res, -x);
}
else if (enter_fail(u)) return -1;
}
}
*/
if (get_money(u) > fee) {
if (u2) change_money(u2, get_money(u) - fee);
@ -167,25 +167,25 @@ enter_arena(unit * u, const item_type * itype, int amount, order * ord)
static int
use_wand_of_tears(unit * user, const struct item_type * itype, int amount, order * ord)
{
int i;
unused(ord);
for (i=0;i!=amount;++i) {
unit * u;
for (u=user->region->units;u;u=u->next) {
if (u->faction != user->faction) {
int i;
int i;
unused(ord);
for (i=0;i!=amount;++i) {
unit * u;
for (u=user->region->units;u;u=u->next) {
if (u->faction != user->faction) {
int i;
for (i=0;i!=u->skill_size;++i) {
if (rng_int()%3) reduce_skill(u, u->skills+i, 1);
}
ADDMSG(&u->faction->msgs, msg_message("wand_of_tears_effect",
"unit", u));
}
}
}
ADDMSG(&user->region->msgs, msg_message("wand_of_tears_usage",
"unit", user));
return 0;
for (i=0;i!=u->skill_size;++i) {
if (rng_int()%3) reduce_skill(u, u->skills+i, 1);
}
ADDMSG(&u->faction->msgs, msg_message("wand_of_tears_effect",
"unit", u));
}
}
}
ADDMSG(&user->region->msgs, msg_message("wand_of_tears_usage",
"unit", user));
return 0;
}
/**
@ -193,70 +193,70 @@ use_wand_of_tears(unit * user, const struct item_type * itype, int amount, order
static int
age_hurting(attrib * a) {
building * b = (building *)a->data.v;
unit * u;
int active = 0;
if (b==NULL) return 0;
for (u=b->region->units;u;u=u->next) {
if (u->building==b) {
if (u->faction->magiegebiet==M_CHAOS) {
active ++;
ADDMSG(&b->region->msgs, msg_message("praytoigjarjuk", "unit", u));
}
}
}
if (active) for (u=b->region->units;u;u=u->next) if (playerrace(u->faction->race)) {
int i;
if (u->faction->magiegebiet!=M_CHAOS) {
for (i=0;i!=active;++i) u->hp = (u->hp+1) / 2; /* make them suffer, but not die */
ADDMSG(&b->region->msgs, msg_message("cryinpain", "unit", u));
}
}
return 1;
building * b = (building *)a->data.v;
unit * u;
int active = 0;
if (b==NULL) return 0;
for (u=b->region->units;u;u=u->next) {
if (u->building==b) {
if (u->faction->magiegebiet==M_CHAOS) {
active ++;
ADDMSG(&b->region->msgs, msg_message("praytoigjarjuk", "unit", u));
}
}
}
if (active) for (u=b->region->units;u;u=u->next) if (playerrace(u->faction->race)) {
int i;
if (u->faction->magiegebiet!=M_CHAOS) {
for (i=0;i!=active;++i) u->hp = (u->hp+1) / 2; /* make them suffer, but not die */
ADDMSG(&b->region->msgs, msg_message("cryinpain", "unit", u));
}
}
return 1;
}
static void
write_hurting(const attrib * a, FILE * F) {
building * b = a->data.v;
fprintf(F, "%d ", b->no);
building * b = a->data.v;
fprintf(F, "%d ", b->no);
}
static int
read_hurting(attrib * a, FILE * F) {
int i;
fscanf(F, "%d", &i);
a->data.v = (void*)findbuilding(i);
if (a->data.v==NULL) {
log_error(("temple of pain is broken\n"));
return AT_READ_FAIL;
}
return AT_READ_OK;
int i;
fscanf(F, "%d", &i);
a->data.v = (void*)findbuilding(i);
if (a->data.v==NULL) {
log_error(("temple of pain is broken\n"));
return AT_READ_FAIL;
}
return AT_READ_OK;
}
static attrib_type at_hurting = {
"hurting", NULL, NULL, age_hurting, write_hurting, read_hurting
"hurting", NULL, NULL, age_hurting, write_hurting, read_hurting
};
#ifdef ARENA_CREATION
static void
make_temple(region * r)
{
const building_type * btype = bt_find("temple");
building * b;
const building_type * btype = bt_find("temple");
building * b;
if (btype==NULL) {
log_error(("could not find buildingtype 'temple'\n"));
return;
}
b = r->buildings;
while (b!=NULL && b->type!=btype) b = b->next;
if (b!=NULL) return; /* gibt schon einen */
while (b!=NULL && b->type!=btype) b = b->next;
if (b!=NULL) return; /* gibt schon einen */
b = new_building(btype, r, NULL);
b->size = btype->maxsize;
b->name = strdup("Igjarjuk's Tempel der Schreie");
b->display = strdup("Ein Schrein aus spitzen Knochen und lodernden Flammen, gewidmet dem Wyrm der Wyrme");
a_add(&b->attribs, a_new(&at_hurting))->data.v=b;
b = new_building(btype, r, NULL);
b->size = btype->maxsize;
b->name = strdup("Igjarjuk's Tempel der Schreie");
b->display = strdup("Ein Schrein aus spitzen Knochen und lodernden Flammen, gewidmet dem Wyrm der Wyrme");
a_add(&b->attribs, a_new(&at_hurting))->data.v=b;
}
#endif
@ -267,39 +267,39 @@ make_temple(region * r)
static void
tower_init(void)
{
int i, first = newarena;
int i, first = newarena;
item_type * it_demonseye = it_find("demonseye");
item_type * it_griphonwing = it_find("griphonwing");
assert(it_griphonwing && it_demonseye);
for (i=0;i!=6;++i) {
region * r = tower_region[i] = findregion(arena_center->x+delta_x[i]*3, arena_center->y+delta_y[i]*3);
for (i=0;i!=6;++i) {
region * r = tower_region[i] = findregion(arena_center->x+delta_x[i]*3, arena_center->y+delta_y[i]*3);
if (r) {
start_region[i] = findregion(arena_center->x+delta_x[i]*2, arena_center->y+delta_y[i]*2);
if (rterrain(r)!=T_DESERT) terraform(r, T_DESERT);
if (!r->buildings) {
building * b = new_building(bt_find("castle"), r, NULL);
b->size = 10;
start_region[i] = findregion(arena_center->x+delta_x[i]*2, arena_center->y+delta_y[i]*2);
if (rterrain(r)!=T_DESERT) terraform(r, T_DESERT);
if (!r->buildings) {
building * b = new_building(bt_find("castle"), r, NULL);
b->size = 10;
if (i!=0) {
sprintf(buf, "Turm des %s",
LOC(default_locale, mkname("school", magietypen[i])));
}
else sprintf(buf, "Turm der Ahnungslosen");
set_string(&b->name, buf);
}
}
}
if (first && !arena_center->buildings) {
building * b = new_building(bt_find("castle"), arena_center, NULL);
attrib * a;
item * items;
else sprintf(buf, "Turm der Ahnungslosen");
set_string(&b->name, buf);
}
}
}
if (first && !arena_center->buildings) {
building * b = new_building(bt_find("castle"), arena_center, NULL);
attrib * a;
item * items;
i_add(&items, i_new(it_griphonwing, 1));
i_add(&items, i_new(it_demonseye, 1));
a = a_add(&b->attribs, make_giveitem(b, items));
i_add(&items, i_new(it_griphonwing, 1));
i_add(&items, i_new(it_demonseye, 1));
a = a_add(&b->attribs, make_giveitem(b, items));
b->size = 10;
set_string(&b->name, "Höhle des Greifen");
}
b->size = 10;
set_string(&b->name, "Höhle des Greifen");
}
}
#endif
@ -307,49 +307,49 @@ tower_init(void)
static void
guardian_faction(plane * pl, int id)
{
region * r;
faction * f = findfaction(id);
region * r;
faction * f = findfaction(id);
if (!f) {
f = calloc(1, sizeof(faction));
f->banner = strdup("Sie dienen dem großen Wyrm");
f->passw = strdup(itoa36(rng_int()));
f->override = strdup(itoa36(rng_int()));
if (!f) {
f = calloc(1, sizeof(faction));
f->banner = strdup("Sie dienen dem grossen Wyrm");
f->passw = strdup(itoa36(rng_int()));
f->override = strdup(itoa36(rng_int()));
set_email(&f->email, "igjarjuk@eressea.de");
f->name = strdup("Igjarjuks Kundschafter");
f->race = new_race[RC_ILLUSION];
f->age = turn;
f->locale = find_locale("de");
f->options = want(O_COMPRESS) | want(O_REPORT) | want(O_COMPUTER) | want(O_ADRESSEN) | want(O_DEBUG);
f->name = strdup("Igjarjuks Kundschafter");
f->race = new_race[RC_ILLUSION];
f->age = turn;
f->locale = find_locale("de");
f->options = want(O_COMPRESS) | want(O_REPORT) | want(O_COMPUTER) | want(O_ADRESSEN) | want(O_DEBUG);
f->no = id;
addlist(&factions, f);
f->no = id;
addlist(&factions, f);
fhash(f);
}
if (f->race != new_race[RC_ILLUSION]) {
assert(!"guardian id vergeben");
exit(0);
}
f->lastorders = turn;
f->alive = true;
for (r=regions;r;r=r->next) if (getplane(r)==pl && rterrain(r)!=T_FIREWALL)
{
unit * u;
freset(r, RF_ENCOUNTER);
for (u=r->units;u;u=u->next) {
if (u->faction==f) break;
}
if (u) continue;
u = createunit(r, f, 1, new_race[RC_GOBLIN]);
set_string(&u->name, "Igjarjuks Auge");
set_item(u, I_RING_OF_INVISIBILITY, 1);
set_order(&u->thisorder, NULL);
}
if (f->race != new_race[RC_ILLUSION]) {
assert(!"guardian id vergeben");
exit(0);
}
f->lastorders = turn;
f->alive = true;
for (r=regions;r;r=r->next) if (getplane(r)==pl && rterrain(r)!=T_FIREWALL)
{
unit * u;
freset(r, RF_ENCOUNTER);
for (u=r->units;u;u=u->next) {
if (u->faction==f) break;
}
if (u) continue;
u = createunit(r, f, 1, new_race[RC_GOBLIN]);
set_string(&u->name, "Igjarjuks Auge");
set_item(u, I_RING_OF_INVISIBILITY, 1);
set_order(&u->thisorder, NULL);
#ifdef LASTORDER
set_order(&u->lastorder, NULL);
set_order(&u->lastorder, NULL);
#endif
fset(u, UFL_PARTEITARNUNG);
set_money(u, 1000);
}
fset(u, UFL_PARTEITARNUNG);
set_money(u, 1000);
}
}
#endif
@ -359,13 +359,13 @@ guardian_faction(plane * pl, int id)
static void
block_create(short x1, short y1, char terrain)
{
short x, y;
for (x=0;x!=BLOCKSIZE;++x) {
for (y=0;y!=BLOCKSIZE;++y) {
region * r = new_region(x1 + x, y1 + y);
terraform(r, terrain);
}
}
short x, y;
for (x=0;x!=BLOCKSIZE;++x) {
for (y=0;y!=BLOCKSIZE;++y) {
region * r = new_region(x1 + x, y1 + y);
terraform(r, terrain);
}
}
}
#endif
@ -374,76 +374,76 @@ block_create(short x1, short y1, char terrain)
static int
caldera_handle(trigger * t, void * data)
{
/* call an event handler on caldera.
* data.v -> ( variant event, int timer )
*/
building *b = (building *)t->data.v;
if (b!=NULL) {
unit ** up = &b->region->units;
while (*up) {
unit * u = *up;
if (u->building==b) {
/* call an event handler on caldera.
* data.v -> ( variant event, int timer )
*/
building *b = (building *)t->data.v;
if (b!=NULL) {
unit ** up = &b->region->units;
while (*up) {
unit * u = *up;
if (u->building==b) {
message * msg;
if (u->items) {
item ** ip = &u->items;
if (u->items) {
item ** ip = &u->items;
msg = msg_message("caldera_handle_1", "unit items", u, u->items);
while (*ip) {
item * i = *ip;
i_remove(ip, i);
if (*ip==i) ip=&i->next;
}
while (*ip) {
item * i = *ip;
i_remove(ip, i);
if (*ip==i) ip=&i->next;
}
} else {
msg = msg_message("caldera_handle_0", "unit", u);
}
add_message(&u->region->msgs, msg);
set_number(u, 0);
}
if (*up==u) up = &u->next;
}
add_message(&u->region->msgs, msg);
set_number(u, 0);
}
if (*up==u) up = &u->next;
}
} else {
log_error(("could not perform caldera::handle()\n"));
log_error(("could not perform caldera::handle()\n"));
}
unused(data);
return 0;
unused(data);
return 0;
}
static void
caldera_write(const trigger * t, FILE * F)
{
building *b = (building *)t->data.v;
fprintf(F, "%s ", itoa36(b->no));
building *b = (building *)t->data.v;
fprintf(F, "%s ", itoa36(b->no));
}
static int
caldera_read(trigger * t, FILE * F)
{
char zText[128];
variant var;
char zText[128];
variant var;
fscanf(F, "%s", zText);
var.i = atoi36(zText);
t->data.v = findbuilding(var.i);
if (t->data.v==NULL) ur_add(var, &t->data.v, resolve_building);
fscanf(F, "%s", zText);
var.i = atoi36(zText);
t->data.v = findbuilding(var.i);
if (t->data.v==NULL) ur_add(var, &t->data.v, resolve_building);
return AT_READ_OK;
return AT_READ_OK;
}
struct trigger_type tt_caldera = {
"caldera",
NULL,
NULL,
caldera_handle,
caldera_write,
caldera_read
"caldera",
NULL,
NULL,
caldera_handle,
caldera_write,
caldera_read
};
#ifdef ARENA_CREATION
static trigger *
trigger_caldera(building * b)
{
trigger * t = t_new(&tt_caldera);
t->data.v = b;
return t;
trigger * t = t_new(&tt_caldera);
t->data.v = b;
return t;
}
#endif
@ -451,17 +451,17 @@ trigger_caldera(building * b)
static void
init_volcano(void)
{
building * b;
region * r = arena_center;
assert(arena_center);
if (rterrain(r)!=T_DESERT) return; /* been done before */
terraform(arena_center, T_VOLCANO_SMOKING);
b = new_building(bt_find("caldera"), r, NULL);
b->size = 1;
b->name = strdup("Igjarjuk's Schlund");
b->display = strdup("Feurige Lava fließt aus dem Krater des großen Vulkans. Alles wird von ihr verschlungen.");
add_trigger(&b->attribs, "timer", trigger_caldera(b));
tt_register(&tt_caldera);
building * b;
region * r = arena_center;
assert(arena_center);
if (rterrain(r)!=T_DESERT) return; /* been done before */
terraform(arena_center, T_VOLCANO_SMOKING);
b = new_building(bt_find("caldera"), r, NULL);
b->size = 1;
b->name = strdup("Igjarjuk's Schlund");
b->display = strdup("Feurige Lava fließt aus dem Krater des großen Vulkans. Alles wird von ihr verschlungen.");
add_trigger(&b->attribs, "timer", trigger_caldera(b));
tt_register(&tt_caldera);
}
#endif
#endif
@ -470,50 +470,50 @@ init_volcano(void)
void
create_arena(void)
{
short x;
arena_id = hashstring("arena");
arena = getplanebyid(arena_id);
if (arena!=NULL) return;
score(); /* ist wichtig, damit alle Parteien einen score haben, wenn sie durchs Tor wollen. */
guardian_faction(arena, 999);
if (arena) arena_center = findregion(plane_center_x(arena), plane_center_y(arena));
if (!arena_center) {
newarena = 1;
arena = create_new_plane(arena_id, "Arena", -10000, -10000, 0, BLOCKSIZE-1, PFL_LOWSTEALING | PFL_NORECRUITS | PFL_NOALLIANCES);
block_create(arena->minx, arena->miny, T_OCEAN);
arena_center = findregion(plane_center_x(arena), plane_center_y(arena));
for (x=0;x!=BLOCKSIZE;++x) {
short y;
for (y=0;y!=BLOCKSIZE;++y) {
region * r = findregion(arena->minx+x, arena->miny+y);
freset(r, RF_ENCOUNTER);
r->planep = arena;
switch (distance(r, arena_center)) {
case 4:
terraform(r, T_FIREWALL);
break;
case 0:
terraform(r, T_GLACIER);
break;
case 1:
terraform(r, T_SWAMP);
break;
case 2:
terraform(r, T_MOUNTAIN);
break;
}
}
}
}
make_temple(arena_center);
short x;
arena_id = hashstring("arena");
arena = getplanebyid(arena_id);
if (arena!=NULL) return;
score(); /* ist wichtig, damit alle Parteien einen score haben, wenn sie durchs Tor wollen. */
guardian_faction(arena, 999);
if (arena) arena_center = findregion(plane_center_x(arena), plane_center_y(arena));
if (!arena_center) {
newarena = 1;
arena = create_new_plane(arena_id, "Arena", -10000, -10000, 0, BLOCKSIZE-1, PFL_LOWSTEALING | PFL_NORECRUITS | PFL_NOALLIANCES);
block_create(arena->minx, arena->miny, T_OCEAN);
arena_center = findregion(plane_center_x(arena), plane_center_y(arena));
for (x=0;x!=BLOCKSIZE;++x) {
short y;
for (y=0;y!=BLOCKSIZE;++y) {
region * r = findregion(arena->minx+x, arena->miny+y);
freset(r, RF_ENCOUNTER);
r->planep = arena;
switch (distance(r, arena_center)) {
case 4:
terraform(r, T_FIREWALL);
break;
case 0:
terraform(r, T_GLACIER);
break;
case 1:
terraform(r, T_SWAMP);
break;
case 2:
terraform(r, T_MOUNTAIN);
break;
}
}
}
}
make_temple(arena_center);
#ifdef CENTRAL_VOLCANO
init_volcano();
init_volcano();
#else
if (arena_center->terrain!=T_DESERT) terraform(arena_center, T_DESERT);
if (arena_center->terrain!=T_DESERT) terraform(arena_center, T_DESERT);
#endif
rsetmoney(arena_center, 0);
rsetpeasants(arena_center, 0);
tower_init();
rsetmoney(arena_center, 0);
rsetpeasants(arena_center, 0);
tower_init();
}
#endif
void

View File

@ -545,7 +545,7 @@ sp_summon_familiar(castorder *co)
int dh, dh1, bytes;
direction_t d;
message * msg;
char zText[NAMESIZE], * bufp = zText;
char zText[1024], * bufp = zText;
size_t size = sizeof(zText) - 1;
if (get_familiar(mage) != NULL ) {
@ -2808,15 +2808,15 @@ resolve_buddy(variant data)
static const char *
fire_name(const border * b, const region * r, const faction * f, int gflags)
b_namefirewall(const border * b, const region * r, const faction * f, int gflags)
{
unused(f);
unused(r);
unused(b);
if (gflags & GF_ARTICLE)
return "eine Feuerwand";
return "a_firewall";
else
return "Feuerwand";
return "firewall";
}
static void
@ -2881,7 +2881,7 @@ border_type bt_firewall = {
wall_read, /* read */
wall_write, /* write */
b_blocknone, /* block */
fire_name, /* name */
b_namefirewall, /* name */
b_rvisible, /* rvisible */
b_finvisible, /* fvisible */
b_uinvisible, /* uvisible */
@ -2955,15 +2955,15 @@ sp_firewall(castorder *co)
/* ------------------------------------------------------------- */
static const char *
wisps_name(const border * b, const region * r, const faction * f, int gflags)
b_namewisps(const border * b, const region * r, const faction * f, int gflags)
{
unused(f);
unused(r);
unused(b);
if (gflags & GF_ARTICLE)
return "eine Gruppe von Irrlichtern";
return "a_wisps";
else
return "Irrlichter";
return "wisps";
}
typedef struct wisps_data {
@ -3009,7 +3009,7 @@ border_type bt_wisps = {
wall_read, /* read */
wall_write, /* write */
b_blocknone, /* block */
wisps_name, /* name */
b_namewisps, /* name */
b_rvisible, /* rvisible */
b_fvisible, /* fvisible */
b_uvisible, /* uvisible */

View File

@ -19,6 +19,7 @@
<text locale="de">Wabernde grüne Schwaden treiben durch den Nebel und
verdichten sich zu einer unheimlichen Kreatur, die nur aus einem langen
Ruderschwanz und einem riesigen runden Maul zu bestehen scheint.</text>
<text locale="en">Wobbling green vapours drift through the mists to form an eldritch creature that seems to be entirely made up of huge jaws and a long tail.</text>
</string>
<namespace name="raceinfo">
<string name="no_info">
@ -7442,41 +7443,114 @@
<text locale="en">Owner</text>
</string>
<string name="nr_a_road">
<text locale="de">eine Straße</text>
<text locale="en">a road</text>
</string>
<namespace name="border">
<string name="a_road">
<text locale="de">eine Straße</text>
<text locale="en">a road</text>
</string>
<string name="nr_roads">
<text locale="de">Straßen</text>
<text locale="en">roads</text>
</string>
<string name="roads">
<text locale="de">Straßen</text>
<text locale="en">roads</text>
</string>
<string name="nr_road">
<text locale="de">Straße</text>
<text locale="en">road</text>
</string>
<string name="road">
<text locale="de">Straße</text>
<text locale="en">road</text>
</string>
<string name="nr_road_percent">
<text locale="de">eine zu %d%% vollendete Straße</text>
<text locale="en">a road that is %d%% complete</text>
</string>
<string name="a_road_percent">
<text locale="de">eine zu %d%% vollendete Straße</text>
<text locale="en">a road that is %d%% complete</text>
</string>
<string name="nr_a_road_connection">
<text locale="de">ein Straßenanschluß</text>
<text locale="en">a connection to another road</text>
</string>
<string name="a_road_connection">
<text locale="de">ein Straßenanschluß</text>
<text locale="en">a connection to another road</text>
</string>
<string name="an_incomplete_road">
<text locale="de">eine unvollständige Straße</text>
<text locale="en">an incomplete road</text>
</string>
<string name="wall">
<text locale="de">Wand</text>
<text locale="en">wall</text>
</string>
<string name="a_wall">
<text locale="de">eine Wand</text>
<text locale="en">a wall</text>
</string>
<string name="firewall">
<text locale="de">Feuerwand</text>
<text locale="en">firewall</text>
</string>
<string name="a_firewall">
<text locale="de">eine Feuerwand</text>
<text locale="en">a firewall</text>
</string>
<string name="fogwall">
<text locale="de">Nebelwand</text>
<text locale="en">wall of fog</text>
</string>
<string name="a_fogwall">
<text locale="de">eine Nebelwand</text>
<text locale="en">a wall of fog</text>
</string>
<string name="wisps">
<text locale="de">Irrlichter</text>
<text locale="en">wisps</text>
</string>
<string name="a_wisps">
<text locale="de">eine Gruppe von Irrlichtern</text>
<text locale="en">a cloud of wisps</text>
</string>
<string name="gate_open">
<text locale="de">gewaltiges offenes Tor</text>
<text locale="en">massive open door</text>
</string>
<string name="a_gate_open">
<text locale="de">ein gewaltiges offenes Tor</text>
<text locale="en">a massive open door</text>
</string>
<string name="gate_closed">
<text locale="de">gewaltiges geschlossenes Tor</text>
<text locale="en">massive locked door</text>
</string>
<string name="a_gate_closed">
<text locale="de">ein gewaltiges geschlossenes Tor</text>
<text locale="en">a massive locked door</text>
</string>
<string name="illusionwall">
<text locale="de">Illusionswand</text>
<text locale="en">illusionary wall</text>
</string>
<string name="an_illusionwall">
<text locale="de">eine Illusionswand</text>
<text locale="en">an illusionary wall</text>
</string>
</namespace>
<string name="nr_reduced_production">
<text locale="de">Die Region ist verwüstet, der Boden karg.</text>
<text locale="en">The region is ravaged, the ground infertile.</text>
</string>
<string name="nr_an_incomplete_road">
<text locale="de">eine unvollständige Straße</text>
<text locale="en">an incomplete road</text>
</string>
<string name="par_unit">
<text locale="de">Einheit-Nr</text>
<text locale="en">unitid</text>