From a0fe319b4b15902d120193412d5f495afd7a4935 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 10 Feb 2002 07:53:54 +0000 Subject: [PATCH] =?UTF-8?q?*=20crashbug=20im=20prefix-fix=20*=20falscher?= =?UTF-8?q?=20namespace=20f=C3=BCr=20damage-anzeige=20*=20falsche=20Urspr?= =?UTF-8?q?=C3=BCnge=20in=20Eternath=20*=20Mistelzweige,=20mehrere=20aauf?= =?UTF-8?q?=20einmal=20benutzbar.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/gamecode/creation.c | 18 ------------------ src/common/gamecode/creport.c | 2 +- src/common/gamecode/economy.c | 10 +++++----- src/common/kernel/item.c | 6 ++++-- src/common/kernel/reports.c | 15 +++++---------- src/common/kernel/spell.c | 2 +- src/eressea/korrektur.c | 23 +++++++++++++++++++++++ src/eressea/main.c | 4 ++-- src/res/de/strings.xml | 13 +++++++------ 9 files changed, 48 insertions(+), 45 deletions(-) diff --git a/src/common/gamecode/creation.c b/src/common/gamecode/creation.c index 4e9f148f2..60f74ce95 100644 --- a/src/common/gamecode/creation.c +++ b/src/common/gamecode/creation.c @@ -52,22 +52,6 @@ #include #include -/* eine insel pro 9x9 feld. das erste feld von (0,0) bis (8,8) */ - -/* Ozean und Grasland wird automatisch generiert (ein Ozean, darin eine Insel - * aus Grasland). Jedes Seed generiert ein Feld des entsprechenden terrains, - * und max. 3 angrenzende Felder. Details in der Funktion SEED und TRANSMUTE in - * REGIONS.C */ - -/* ------------------------------------------------------------- */ - -/* OCEAN, PLAIN, FOREST, SWAMP, DESERT, HIGHLAND, MOUNTAIN, GLACIER, - * MAXTERRAINS */ - -/* ------------------------------------------------------------- */ - -/* ------------------------------------------------------------- */ - void createmonsters(void) { @@ -91,8 +75,6 @@ createmonsters(void) /* ------------------------------------------------------------- */ - - void listnames(void) { diff --git a/src/common/gamecode/creport.c b/src/common/gamecode/creport.c index 928d05f31..c198a212f 100644 --- a/src/common/gamecode/creport.c +++ b/src/common/gamecode/creport.c @@ -556,7 +556,7 @@ cr_output_unit(FILE * F, const region * r, ap = a_find(u->faction->attribs, &at_raceprefix); } if (ap) { - const char * name = (const char*)a->data.v; + const char * name = (const char*)ap->data.v; fprintf(F, "\"%s\";typprefix\n", add_translation(name, LOC(f->locale, name))); } fprintf(F, "%d;Partei\n", u->faction->no); diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index 68d77cdf5..c029ebfa2 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -1825,7 +1825,7 @@ create_item(unit * u, const item_type * itype, int want) } } -void +static void make(region * r, unit * u) { char *s; @@ -2512,7 +2512,7 @@ plant(region *r, unit *u, int raw) } #if GROWING_TREES -void +static void planttrees(region *r, unit *u, int raw) { int n, i, skill, planted = 0; @@ -2558,8 +2558,8 @@ planttrees(region *r, unit *u, int raw) produceexp(u, SK_HERBALISM, u->number); new_use_pooled(u, itype->rtype, GET_DEFAULT, n); - add_message(&u->faction->msgs, new_message(u->faction, - "plant%u:unit%r:region%i:amount%X:herb", u, r, planted, itype->rtype)); + ADDMSG(&u->faction->msgs, msg_message("plant", + "unit region amount herb", u, r, planted, itype->rtype)); } #endif @@ -2759,7 +2759,7 @@ rough_amount(int a, int m) return "sehr viele"; } -void +static void research(region *r, unit *u) { char *s; diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index 60e41996c..fdc41a5c8 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -1919,12 +1919,14 @@ use_bloodpotion(struct unit *u, const struct potion_type *ptype, const char *cmd static int use_mistletoe(struct unit * user, const struct item_type * itype, const char * cmd) { - if (user->number!=1) { + int mtoes = new_get_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK); + + if (user->number>mtoes) { ADDMSG(&user->faction->msgs, msg_message("use_singleperson", "unit item region command", user, itype, user->region, cmd)); return -1; } - new_use_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, 1); + new_use_pooled(user, itype->rtype, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, user->number); a_add(&user->attribs, make_fleechance((float)1.0)); ADDMSG(&user->faction->msgs, msg_message("use_item", "unit item", user, itype)); diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index aba143b8b..f8b6e1620 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -117,16 +117,11 @@ hp_status(const unit * u) { double p = (double) ((double) u->hp / (double) (u->number * unit_max_hp(u))); - if (p > 2.00) - return "dmg_critical"; - if (p > 1.50) - return "dmg_heavily"; - if (p < 0.50) - return "dmg_badly"; - if (p < 0.75) - return "dmg_wounded"; - if (p < 0.99) - return "dmg_exhausted"; + if (p > 2.00) return mkname("damage", "critical"); + if (p > 1.50) return mkname("damage", "heavily"); + if (p < 0.50) return mkname("damage", "badly"); + if (p < 0.75) return mkname("damage", "wounded"); + if (p < 0.99) return mkname("damage", "exhausted"); return NULL; } diff --git a/src/common/kernel/spell.c b/src/common/kernel/spell.c index 7a6096373..f3a8f431b 100644 --- a/src/common/kernel/spell.c +++ b/src/common/kernel/spell.c @@ -6916,7 +6916,7 @@ sp_destroy_curse(castorder *co) switch(obj){ case SPP_REGION: ap = &r->attribs; - set_string(&ts, regionid(r)); + set_string(&ts, regionname(r, mage->faction)); break; case SPP_UNIT: diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 7edb9ab6b..7d0cc0d78 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -2665,6 +2665,28 @@ convert_skills(void) } #endif +static int +fix_questcoors(void) +{ + plane * p = getplanebyid (59034966); + if (p) { + faction * f; + region * eternath = findregion(-8750, 3631); + if (eternath) for (f=factions;f;f=f->next) { + ursprung * u = f->ursprung; + while (u) { + if (u->id == p->id) { + u->x = eternath->x; + u->y = eternath->y; + break; + } + u=u->next; + } + } + } + return 0; +} + void korrektur(void) { @@ -2715,6 +2737,7 @@ korrektur(void) do_once("idlo", fix_idleout()); do_once("szip", set_zip()); do_once("heal", heal_all()); + do_once("fqco", fix_questcoors()); /* seems something fishy is going on, do this just * to be on the safe side: diff --git a/src/eressea/main.c b/src/eressea/main.c index 049a0138e..c6b7a8962 100644 --- a/src/eressea/main.c +++ b/src/eressea/main.c @@ -583,8 +583,8 @@ main(int argc, char *argv[]) kernel_init(); game_init(); #if defined(BETA_CODE) && 0 - xml_writeships(); - /* xml_writeitems("items.xml"); */ + /* xml_writeships(); */ + xml_writeitems("items.xml"); return 0; #endif diff --git a/src/res/de/strings.xml b/src/res/de/strings.xml index 4f157487b..bca336294 100644 --- a/src/res/de/strings.xml +++ b/src/res/de/strings.xml @@ -3153,26 +3153,27 @@ dwarf - + + + sehr stark critically wounded - + stark heavily wounded - + schwer verwundet badly wounded - + verwundet wounded - + erschöpft exhausted -