- Monster brauchen keinen Unterhalt mehr.

This commit is contained in:
Christian Schlittchen 2002-10-06 09:16:34 +00:00
parent 7ef041446e
commit e4d411a093
4 changed files with 14 additions and 7 deletions

View File

@ -143,12 +143,6 @@ checkorders(void)
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static boolean
is_monstrous(unit * u)
{
return (boolean) (u->faction->no == MONSTER_FACTION || !playerrace(u->race));
}
static void static void
get_food(region *r) get_food(region *r)
{ {

View File

@ -2579,7 +2579,11 @@ int
lifestyle(const unit * u) lifestyle(const unit * u)
{ {
static plane * astralspace = NULL; static plane * astralspace = NULL;
int need = u->number * u->race->maintenance; int need;
if(is_monstrous(u)) return 0;
need = u->number * u->race->maintenance;
if (!astralspace) { if (!astralspace) {
astralspace = getplanebyname("Astralraum"); astralspace = getplanebyname("Astralraum");

View File

@ -1048,3 +1048,10 @@ invisible(const unit *u)
return get_item(u, I_RING_OF_INVISIBILITY) return get_item(u, I_RING_OF_INVISIBILITY)
+ 100 * get_item(u, I_SPHERE_OF_INVISIBILITY); + 100 * get_item(u, I_SPHERE_OF_INVISIBILITY);
} }
boolean
is_monstrous(const unit * u)
{
return (boolean) (u->faction->no == MONSTER_FACTION || !playerrace(u->race));
}

View File

@ -154,4 +154,6 @@ extern boolean learn_skill(struct unit * u, skill_t sk, double chance);
extern int invisible(const unit *u); extern int invisible(const unit *u);
extern boolean is_monstrous(const unit * u);
#endif #endif