From 153dcc0a55f5b44e6b08c2b0b1b247ad5fc076fb Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 21 Jan 2002 00:31:43 +0000 Subject: [PATCH] Sicherheitscheck in Kampfroutine Neue Prefixes Eis und Flammen --- src/common/kernel/battle.c | 2 +- src/common/kernel/race.c | 24 +++---- src/eressea/korrektur.c | 4 +- src/res/de/messages.xml | 120 ---------------------------------- src/res/de/strings.xml | 130 +++++++++++++++++++++++++++++++++++++ 5 files changed, 146 insertions(+), 134 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index 797db60d8..a66e40d63 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -1905,7 +1905,7 @@ attack(battle *b, troop ta, const att *a) ta.fighter->action_counter++; } - if (hits(ta, td, wp)) { + if (wp && hits(ta, td, wp)) { const char * d; if (wp == NULL) d = au->race->def_damage; else if (riding(ta)) d = wp->type->damage[1]; diff --git a/src/common/kernel/race.c b/src/common/kernel/race.c index 15222e268..ca5f03bc2 100644 --- a/src/common/kernel/race.c +++ b/src/common/kernel/race.c @@ -76,7 +76,7 @@ rc_new(const char * zName) } race * -rc_add(race * rc) +rc_add(race * rc) { rc->next = races; return races = rc; @@ -137,6 +137,8 @@ const char *race_prefixes[] = { "prefix_Frost", "prefix_Finster", "prefix_Duester", + "prefix_flame", + "prefix_ice", NULL }; @@ -160,13 +162,13 @@ static const char * oldracenames[MAXRACES] = { "irongolem", "stone golem", "shadowdemon", "shadowmaster", "mountainguard", "alp", "toad", "braineater", "peasant", - "wolf", "lynx", "tunnelworm", "eagle", "rat", "songdragon", "nymph", "unicorn", + "wolf", "lynx", "tunnelworm", "eagle", "rat", "songdragon", "nymph", "unicorn", "direwolf", "ghost", "imp", "dreamcat", "fairy", "owl", "hellcat", "tiger", "dolphin", "giant turtle", "kraken", "sea serpent", "shadow knight", "centaur", "skeleton", "skeleton lord", "zombie", "juju-zombie", "ghoul", "ghast", "museumghost", "gnome", - "template", + "template", "clone" }; @@ -324,7 +326,7 @@ boolean is_undead(const unit *u) boolean r_insectstalled(const region * r) { - if (rterrain(r)==T_GLACIER || rterrain(r)==T_ICEBERG_SLEEP + if (rterrain(r)==T_GLACIER || rterrain(r)==T_ICEBERG_SLEEP || rterrain(r)==T_ICEBERG) return true; @@ -342,7 +344,7 @@ racename(const locale *loc, const unit *u, const race * rc) { static char lbuf[80]; attrib *a, *a2; - + a = a_find(u->attribs, &at_group); if(a) { @@ -355,7 +357,7 @@ racename(const locale *loc, const unit *u, const race * rc) if(a2) { char s[32]; - + strcpy(lbuf, locale_string(loc, (char *)a2->data.v)); if(a) { strcpy(s, locale_string(loc, @@ -547,7 +549,7 @@ dragon_drops(const struct race * rc, int size) return itm; } -int +int rc_specialdamage(const race * ar, const race * dr, const struct weapon_type * wtype) { race_t art = old_race(ar); @@ -605,7 +607,7 @@ typedef struct xml_state { int nextattack; } xml_state; -static int +static int tagbegin(struct xml_stack * stack) { const xml_tag * tag = stack->tag; @@ -616,7 +618,7 @@ tagbegin(struct xml_stack * stack) if (strcmp(tag->name, "race")==0) { const char * zName = xml_value(tag, "name"); race * rc; - + state->nextattack = 0; state->nextfamiliar = 0; @@ -764,7 +766,7 @@ tagbegin(struct xml_stack * stack) return XML_OK; } -static int +static int tagend(struct xml_stack * stack) { const xml_tag * tag = stack->tag; @@ -813,7 +815,7 @@ register_races(void) register_function((pf_generic)drachen_name, "namedragon"); register_function((pf_generic)dracoid_name, "namedracoid"); register_function((pf_generic)shadow_name, "nameshadow"); - + /* aging functions */ register_function((pf_generic)age_undead, "ageundead"); register_function((pf_generic)age_illusion, "ageillusion"); diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 7ec704e19..0fe0ef676 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -2760,10 +2760,10 @@ heal_all(void) for(r=regions; r; r=r->next) { for(u=r->units;u;u=u->next) { int max_hp = unit_max_hp(u) * u->number; - if(u->hp < max_hp) { + if(u->hp < max_hp) { u->hp = max_hp; fset(u->faction, FL_DH); - } + } } } diff --git a/src/res/de/messages.xml b/src/res/de/messages.xml index 192a13e59..64636ad23 100644 --- a/src/res/de/messages.xml +++ b/src/res/de/messages.xml @@ -251,126 +251,6 @@ autumn - - Dunkel - dark - - - - Licht - light - - - - Klein - gully - - - - Hoch - high - - - - Hügel - hill - - - - Berg - mountain - - - - Wald - wood - - - - Sumpf - swamp - - - - Schnee - snow - - - - Sonnen - sun - - - - Mond - moon - - - - See - sea - - - - Tal - valley - - - - Schatten - shadow - - - - Höhlen - cave - - - - Blut - blood - - - - Wild - wild - - - - Chaos - chaos - - - - Nacht - night - - - - Nebel - mist - - - - Grau - grey - - - - Frost - cold - - - - Finster - gloom - - - - Düster - black - - Vorlage für den nächsten Zug: Template for the next turn: diff --git a/src/res/de/strings.xml b/src/res/de/strings.xml index bd8a2f3e5..06fcc69d7 100644 --- a/src/res/de/strings.xml +++ b/src/res/de/strings.xml @@ -5,6 +5,136 @@ + + Dunkel + dark + + + + Licht + light + + + + Flammen + flame + + + + Eis + ice + + + + Klein + gully + + + + Hoch + high + + + + Hügel + hill + + + + Berg + mountain + + + + Wald + wood + + + + Sumpf + swamp + + + + Schnee + snow + + + + Sonnen + sun + + + + Mond + moon + + + + See + sea + + + + Tal + valley + + + + Schatten + shadow + + + + Höhlen + cave + + + + Blut + blood + + + + Wild + wild + + + + Chaos + chaos + + + + Nacht + night + + + + Nebel + mist + + + + Grau + grey + + + + Frost + cold + + + + Finster + gloom + + + + Düster + black + + Küsten Nordwestküste