Sicherheitscheck in Kampfroutine

Neue Prefixes Eis und Flammen
This commit is contained in:
Enno Rehling 2002-01-21 00:31:43 +00:00
parent e64d9a8221
commit 153dcc0a55
5 changed files with 146 additions and 134 deletions

View file

@ -1905,7 +1905,7 @@ attack(battle *b, troop ta, const att *a)
ta.fighter->action_counter++; ta.fighter->action_counter++;
} }
if (hits(ta, td, wp)) { if (wp && hits(ta, td, wp)) {
const char * d; const char * d;
if (wp == NULL) d = au->race->def_damage; if (wp == NULL) d = au->race->def_damage;
else if (riding(ta)) d = wp->type->damage[1]; else if (riding(ta)) d = wp->type->damage[1];

View file

@ -76,7 +76,7 @@ rc_new(const char * zName)
} }
race * race *
rc_add(race * rc) rc_add(race * rc)
{ {
rc->next = races; rc->next = races;
return races = rc; return races = rc;
@ -137,6 +137,8 @@ const char *race_prefixes[] = {
"prefix_Frost", "prefix_Frost",
"prefix_Finster", "prefix_Finster",
"prefix_Duester", "prefix_Duester",
"prefix_flame",
"prefix_ice",
NULL NULL
}; };
@ -160,13 +162,13 @@ static const char * oldracenames[MAXRACES] = {
"irongolem", "stone golem", "shadowdemon", "shadowmaster", "mountainguard", "alp", "irongolem", "stone golem", "shadowdemon", "shadowmaster", "mountainguard", "alp",
"toad", "toad",
"braineater", "peasant", "braineater", "peasant",
"wolf", "lynx", "tunnelworm", "eagle", "rat", "songdragon", "nymph", "unicorn", "wolf", "lynx", "tunnelworm", "eagle", "rat", "songdragon", "nymph", "unicorn",
"direwolf", "ghost", "direwolf", "ghost",
"imp", "dreamcat", "fairy", "owl", "hellcat", "tiger", "dolphin", "giant turtle", "kraken", "sea serpent", "imp", "dreamcat", "fairy", "owl", "hellcat", "tiger", "dolphin", "giant turtle", "kraken", "sea serpent",
"shadow knight", "shadow knight",
"centaur", "centaur",
"skeleton", "skeleton lord", "zombie", "juju-zombie", "ghoul", "ghast", "museumghost", "gnome", "skeleton", "skeleton lord", "zombie", "juju-zombie", "ghoul", "ghast", "museumghost", "gnome",
"template", "template",
"clone" "clone"
}; };
@ -324,7 +326,7 @@ boolean is_undead(const unit *u)
boolean boolean
r_insectstalled(const region * r) 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) || rterrain(r)==T_ICEBERG)
return true; return true;
@ -342,7 +344,7 @@ racename(const locale *loc, const unit *u, const race * rc)
{ {
static char lbuf[80]; static char lbuf[80];
attrib *a, *a2; attrib *a, *a2;
a = a_find(u->attribs, &at_group); a = a_find(u->attribs, &at_group);
if(a) { if(a) {
@ -355,7 +357,7 @@ racename(const locale *loc, const unit *u, const race * rc)
if(a2) { if(a2) {
char s[32]; char s[32];
strcpy(lbuf, locale_string(loc, (char *)a2->data.v)); strcpy(lbuf, locale_string(loc, (char *)a2->data.v));
if(a) { if(a) {
strcpy(s, locale_string(loc, strcpy(s, locale_string(loc,
@ -547,7 +549,7 @@ dragon_drops(const struct race * rc, int size)
return itm; return itm;
} }
int int
rc_specialdamage(const race * ar, const race * dr, const struct weapon_type * wtype) rc_specialdamage(const race * ar, const race * dr, const struct weapon_type * wtype)
{ {
race_t art = old_race(ar); race_t art = old_race(ar);
@ -605,7 +607,7 @@ typedef struct xml_state {
int nextattack; int nextattack;
} xml_state; } xml_state;
static int static int
tagbegin(struct xml_stack * stack) tagbegin(struct xml_stack * stack)
{ {
const xml_tag * tag = stack->tag; const xml_tag * tag = stack->tag;
@ -616,7 +618,7 @@ tagbegin(struct xml_stack * stack)
if (strcmp(tag->name, "race")==0) { if (strcmp(tag->name, "race")==0) {
const char * zName = xml_value(tag, "name"); const char * zName = xml_value(tag, "name");
race * rc; race * rc;
state->nextattack = 0; state->nextattack = 0;
state->nextfamiliar = 0; state->nextfamiliar = 0;
@ -764,7 +766,7 @@ tagbegin(struct xml_stack * stack)
return XML_OK; return XML_OK;
} }
static int static int
tagend(struct xml_stack * stack) tagend(struct xml_stack * stack)
{ {
const xml_tag * tag = stack->tag; const xml_tag * tag = stack->tag;
@ -813,7 +815,7 @@ register_races(void)
register_function((pf_generic)drachen_name, "namedragon"); register_function((pf_generic)drachen_name, "namedragon");
register_function((pf_generic)dracoid_name, "namedracoid"); register_function((pf_generic)dracoid_name, "namedracoid");
register_function((pf_generic)shadow_name, "nameshadow"); register_function((pf_generic)shadow_name, "nameshadow");
/* aging functions */ /* aging functions */
register_function((pf_generic)age_undead, "ageundead"); register_function((pf_generic)age_undead, "ageundead");
register_function((pf_generic)age_illusion, "ageillusion"); register_function((pf_generic)age_illusion, "ageillusion");

View file

@ -2760,10 +2760,10 @@ heal_all(void)
for(r=regions; r; r=r->next) { for(r=regions; r; r=r->next) {
for(u=r->units;u;u=u->next) { for(u=r->units;u;u=u->next) {
int max_hp = unit_max_hp(u) * u->number; int max_hp = unit_max_hp(u) * u->number;
if(u->hp < max_hp) { if(u->hp < max_hp) {
u->hp = max_hp; u->hp = max_hp;
fset(u->faction, FL_DH); fset(u->faction, FL_DH);
} }
} }
} }

View file

@ -251,126 +251,6 @@
<text locale="en">autumn</text> <text locale="en">autumn</text>
</message> </message>
<message name="prefix_Dunkel">
<text locale="de">Dunkel</text>
<text locale="en">dark </text>
</message>
<message name="prefix_Licht">
<text locale="de">Licht</text>
<text locale="en">light </text>
</message>
<message name="prefix_Klein">
<text locale="de">Klein</text>
<text locale="en">gully </text>
</message>
<message name="prefix_Hoch">
<text locale="de">Hoch</text>
<text locale="en">high </text>
</message>
<message name="prefix_Huegel">
<text locale="de">Hügel</text>
<text locale="en">hill </text>
</message>
<message name="prefix_Berg">
<text locale="de">Berg</text>
<text locale="en">mountain </text>
</message>
<message name="prefix_Wald">
<text locale="de">Wald</text>
<text locale="en">wood </text>
</message>
<message name="prefix_Sumpf">
<text locale="de">Sumpf</text>
<text locale="en">swamp </text>
</message>
<message name="prefix_Schnee">
<text locale="de">Schnee</text>
<text locale="en">snow </text>
</message>
<message name="prefix_Sonnen">
<text locale="de">Sonnen</text>
<text locale="en">sun </text>
</message>
<message name="prefix_Mond">
<text locale="de">Mond</text>
<text locale="en">moon </text>
</message>
<message name="prefix_See">
<text locale="de">See</text>
<text locale="en">sea </text>
</message>
<message name="prefix_Tal">
<text locale="de">Tal</text>
<text locale="en">valley </text>
</message>
<message name="prefix_Schatten">
<text locale="de">Schatten</text>
<text locale="en">shadow </text>
</message>
<message name="prefix_Hoehlen">
<text locale="de">Höhlen</text>
<text locale="en">cave </text>
</message>
<message name="prefix_Blut">
<text locale="de">Blut</text>
<text locale="en">blood </text>
</message>
<message name="prefix_Wild">
<text locale="de">Wild</text>
<text locale="en">wild </text>
</message>
<message name="prefix_Chaos">
<text locale="de">Chaos</text>
<text locale="en">chaos </text>
</message>
<message name="prefix_Nacht">
<text locale="de">Nacht</text>
<text locale="en">night </text>
</message>
<message name="prefix_Nebel">
<text locale="de">Nebel</text>
<text locale="en">mist </text>
</message>
<message name="prefix_Grau">
<text locale="de">Grau</text>
<text locale="en">grey </text>
</message>
<message name="prefix_Frost">
<text locale="de">Frost</text>
<text locale="en">cold </text>
</message>
<message name="prefix_Finster">
<text locale="de">Finster</text>
<text locale="en">gloom </text>
</message>
<message name="prefix_Duester">
<text locale="de">Düster</text>
<text locale="en">black </text>
</message>
<message name="nr_template"> <message name="nr_template">
<text locale="de">Vorlage für den nächsten Zug:</text> <text locale="de">Vorlage für den nächsten Zug:</text>
<text locale="en">Template for the next turn:</text> <text locale="en">Template for the next turn:</text>

View file

@ -5,6 +5,136 @@
</comment> </comment>
<strings> <strings>
<string name="prefix_Dunkel">
<text locale="de">Dunkel</text>
<text locale="en">dark </text>
</string>
<string name="prefix_Licht">
<text locale="de">Licht</text>
<text locale="en">light </text>
</string>
<string name="prefix_flame">
<text locale="de">Flammen</text>
<text locale="en">flame</text>
</string>
<string name="prefix_ice">
<text locale="de">Eis</text>
<text locale="en">ice</text>
</string>
<string name="prefix_Klein">
<text locale="de">Klein</text>
<text locale="en">gully </text>
</string>
<string name="prefix_Hoch">
<text locale="de">Hoch</text>
<text locale="en">high </text>
</string>
<string name="prefix_Huegel">
<text locale="de">Hügel</text>
<text locale="en">hill </text>
</string>
<string name="prefix_Berg">
<text locale="de">Berg</text>
<text locale="en">mountain </text>
</string>
<string name="prefix_Wald">
<text locale="de">Wald</text>
<text locale="en">wood </text>
</string>
<string name="prefix_Sumpf">
<text locale="de">Sumpf</text>
<text locale="en">swamp </text>
</string>
<string name="prefix_Schnee">
<text locale="de">Schnee</text>
<text locale="en">snow </text>
</string>
<string name="prefix_Sonnen">
<text locale="de">Sonnen</text>
<text locale="en">sun </text>
</string>
<string name="prefix_Mond">
<text locale="de">Mond</text>
<text locale="en">moon </text>
</string>
<string name="prefix_See">
<text locale="de">See</text>
<text locale="en">sea </text>
</string>
<string name="prefix_Tal">
<text locale="de">Tal</text>
<text locale="en">valley </text>
</string>
<string name="prefix_Schatten">
<text locale="de">Schatten</text>
<text locale="en">shadow </text>
</string>
<string name="prefix_Hoehlen">
<text locale="de">Höhlen</text>
<text locale="en">cave </text>
</string>
<string name="prefix_Blut">
<text locale="de">Blut</text>
<text locale="en">blood </text>
</string>
<string name="prefix_Wild">
<text locale="de">Wild</text>
<text locale="en">wild </text>
</string>
<string name="prefix_Chaos">
<text locale="de">Chaos</text>
<text locale="en">chaos </text>
</string>
<string name="prefix_Nacht">
<text locale="de">Nacht</text>
<text locale="en">night </text>
</string>
<string name="prefix_Nebel">
<text locale="de">Nebel</text>
<text locale="en">mist </text>
</string>
<string name="prefix_Grau">
<text locale="de">Grau</text>
<text locale="en">grey </text>
</string>
<string name="prefix_Frost">
<text locale="de">Frost</text>
<text locale="en">cold </text>
</string>
<string name="prefix_Finster">
<text locale="de">Finster</text>
<text locale="en">gloom </text>
</string>
<string name="prefix_Duester">
<text locale="de">Düster</text>
<text locale="en">black </text>
</string>
<comment>Küsten</comment> <comment>Küsten</comment>
<string name="Nordwestküste"> <string name="Nordwestküste">
<text locale="de">Nordwestküste</text> <text locale="de">Nordwestküste</text>