- no longer asserting on hp<number, but hotfixing and error.

- bugfix zero-quest
- bugfix potion-names
This commit is contained in:
Enno Rehling 2003-03-14 21:03:15 +00:00
parent b16fba0cbb
commit c2273a50a5
5 changed files with 19 additions and 9 deletions

View File

@ -2126,7 +2126,7 @@ report(FILE *F, faction * f, const faction_list * addresses,
for (a=a_find(f->attribs, &at_showitem);a;a=a->nexttype) {
const potion_type * ptype = resource2potion(((const item_type*)a->data.v)->rtype);
const char * description = NULL;
const char * pname = ptype->resourcename(ptype->itype->rtype, 0);
const char * pname = resourcename(ptype->itype->rtype, 0);
requirement * m;
if (ptype==NULL) continue;
m = ptype->itype->construction->materials;
@ -2149,7 +2149,7 @@ report(FILE *F, faction * f, const faction_list * addresses,
}
centre(F, buf, true);
rnl(F);
description = LOC(mkname("potion", pname));
description = LOC(f->locale, mkname("potion", pname));
if (description==pname) description = ptype->text;
centre(F, description, true);
}

View File

@ -2482,7 +2482,11 @@ aftermath(battle * b)
* for each of them, a peasant will die as well */
is += dead;
}
assert(du->hp >= du->number || !"unit has less hitpoints than people");
if (du->hp < du->number) {
log_error(("%s has less hitpoints (%u) than people (%u)\n",
itoa36(du->no), du->hp, du->number));
du->hp=du->no;
}
} next(df);
} next(s);
dead_peasants = min(rpeasants(r), (is*BATTLE_KILLS_PEASANTS)/100);

View File

@ -422,7 +422,12 @@ rt_find(const char * name)
return rtype;
}
static const char * it_aliases[2][2] = { { "Runenschwert", "runesword" }, { NULL, NULL } };
static const char * it_aliases[][2] = {
{ "Runenschwert", "runesword" },
{ "p12", "truthpotion" },
{ "p1", "goliathwater" },
{ NULL, NULL },
};
static const char *
it_alias(const char * zname)
{
@ -1382,7 +1387,7 @@ static translate_t translation[] = {
{ "Weihrauch", "incense", "incense_p", "incense", "incense_p" },
{ "Bihänder", "greatsword", "greatsword_p", "greatsword", "greatsword_p" },
{ "Laen", "laen", "laen_p", "laen", "laen_p" },
{ "Goliathwasser", "p1", "p1_p", NULL, NULL },
{ "Goliathwasser", "goliathwater", "goliathwater_p", NULL, NULL },
{ "Wasser des Lebens", "p2", "p2_p", NULL, NULL },
{ "Bauernblut", "p5", "p5_p", NULL, NULL },
{ "Gehirnschmalz", "p6", "p6_p", NULL, NULL },

View File

@ -1816,12 +1816,13 @@ zero_quest(void)
{
const char * name = "Sergint Saiquent";
plane * p = getplanebyname(name);
#ifdef ZEROFOKS_QUESTE /* "gregorjochmann@gmx.de" */
if (p==NULL {
#ifdef ZEROFOKS_QUESTMASTER /* "gregorjochmann@gmx.de" */
if (p==NULL) {
region * center;
p = gm_addplane(4, 0, name);
center = findregion(p->minx+(p->maxx-p->minx)/2, p->miny+(p->maxy-p->miny)/2);
gm_addfaction(ZEROFOKS_QUESTMASTER, p, center);
return 0;
}
#endif
if (p!=NULL) {

View File

@ -1459,7 +1459,7 @@
<string name="p0">
<text locale="de">Siebenmeilentee</text>
</string>
<string name="p1">
<string name="goliathwater">
<text locale="de">Goliathwasser</text>
</string>
<string name="p2">
@ -1505,7 +1505,7 @@
<string name="p0_p">
<text locale="de">Siebenmeilentees</text>
</string>
<string name="goliathwater">
<string name="goliathwater_p">
<text locale="de">Goliathwasser</text>
</string>
<string name="p2_p">