Feature: friedliebende Rassen (ungenutzt)

Zauber Bergwaechter nur in Berg/Gletscher
This commit is contained in:
Enno Rehling 2007-02-19 18:01:37 +00:00
parent 8439981256
commit 90c0cc9a64
5 changed files with 19 additions and 7 deletions

View File

@ -3665,13 +3665,16 @@ init_battle(region * r, battle **bp)
continue; continue;
} }
if ((u->race->battle_flags&BF_CANATTACK) == 0) {
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "race_no_attack", "race", u->race));
continue;
}
/** /**
** Fehlerbehandlung Angreifer ** Fehlerbehandlung Angreifer
**/ **/
#ifdef DELAYED_OFFENSE #ifdef DELAYED_OFFENSE
if (get_moved(&u->attribs) && !guarded_by(r, u->faction)) { if (get_moved(&u->attribs) && !guarded_by(r, u->faction)) {
add_message(&u->faction->msgs, ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "no_attack_after_advance", ""));
msg_message("no_attack_after_advance", "unit region command", u, u->region, ord));
} }
#endif #endif
if (LongHunger(u)) { if (LongHunger(u)) {

View File

@ -156,6 +156,7 @@ extern int rc_specialdamage(const race *, const race *, const struct weapon_type
#define BF_RES_CUT (1<<3) /* Halber Schaden durch CUT */ #define BF_RES_CUT (1<<3) /* Halber Schaden durch CUT */
#define BF_RES_BASH (1<<4) /* Halber Schaden durch BASH */ #define BF_RES_BASH (1<<4) /* Halber Schaden durch BASH */
#define BF_INV_NONMAGIC (1<<5) /* Immun gegen nichtmagischen Schaden */ #define BF_INV_NONMAGIC (1<<5) /* Immun gegen nichtmagischen Schaden */
#define BF_CANATTACK (1<<6) /* Kann keine ATTACKIERE Befehle ausfuehren */
extern int unit_old_max_hp(struct unit * u); extern int unit_old_max_hp(struct unit * u);
extern const char * racename(const struct locale *lang, const struct unit *u, const race * rc); extern const char * racename(const struct locale *lang, const struct unit *u, const race * rc);

View File

@ -1446,6 +1446,7 @@ parse_races(xmlDocPtr doc)
if (xml_bvalue(node, "resistbash", false)) rc->battle_flags |= BF_RES_BASH; if (xml_bvalue(node, "resistbash", false)) rc->battle_flags |= BF_RES_BASH;
if (xml_bvalue(node, "resistcut", false)) rc->battle_flags |= BF_RES_CUT; if (xml_bvalue(node, "resistcut", false)) rc->battle_flags |= BF_RES_CUT;
if (xml_bvalue(node, "resistpierce", false)) rc->battle_flags |= BF_RES_PIERCE; if (xml_bvalue(node, "resistpierce", false)) rc->battle_flags |= BF_RES_PIERCE;
if (xml_bvalue(node, "canattack", true)) rc->battle_flags |= BF_CANATTACK;
/* reading eressea/races/race/ai */ /* reading eressea/races/race/ai */
xpath->node = node; xpath->node = node;

View File

@ -2234,14 +2234,10 @@ sp_ironkeeper(castorder *co)
unit *mage = co->magician.u; unit *mage = co->magician.u;
int cast_level = co->level; int cast_level = co->level;
/* this does not make sense anymore, iron and laen can appear
* in any region */
/*
if (rterrain(r) != T_MOUNTAIN && rterrain(r) != T_GLACIER) { if (rterrain(r) != T_MOUNTAIN && rterrain(r) != T_GLACIER) {
report_failure(mage, co->order); report_failure(mage, co->order);
return 0; return 0;
} }
*/
keeper = create_unit(r, mage->faction, 1, new_race[RC_IRONKEEPER], 0, "Bergwächter", mage); keeper = create_unit(r, mage->faction, 1, new_race[RC_IRONKEEPER], 0, "Bergwächter", mage);

View File

@ -6018,6 +6018,17 @@
<text locale="fr">"'$order($command)' - $unit($unit) marched into $region($region) during the last turn and is too exhausted to attack."</text> <text locale="fr">"'$order($command)' - $unit($unit) marched into $region($region) during the last turn and is too exhausted to attack."</text>
<text locale="en">"'$order($command)' - $unit($unit) marched into $region($region) during the last turn and is too exhausted to attack."</text> <text locale="en">"'$order($command)' - $unit($unit) marched into $region($region) during the last turn and is too exhausted to attack."</text>
</message> </message>
<message name="race_no_attack" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
<arg name="race" type="race"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - $race($race,0) sind friedliebend und attackieren niemand."</text>
<text locale="fr">"'$order($command)' - $race($race,0) are peace-loving and will not attack anyone."</text>
<text locale="en">"'$order($command)' - $race($race,0) are peace-loving and will not attack anyone."</text>
</message>
<message name="skill_needed" section="production"> <message name="skill_needed" section="production">
<type> <type>
<arg name="unit" type="unit"/> <arg name="unit" type="unit"/>