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++;
}
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];

View File

@ -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");

View File

@ -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);
}
}
}
}

View File

@ -251,126 +251,6 @@
<text locale="en">autumn</text>
</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">
<text locale="de">Vorlage für den nächsten Zug:</text>
<text locale="en">Template for the next turn:</text>

View File

@ -5,6 +5,136 @@
</comment>
<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>
<string name="Nordwestküste">
<text locale="de">Nordwestküste</text>