forked from github/server
- Monster brauchen keinen Unterhalt mehr.
This commit is contained in:
parent
7ef041446e
commit
e4d411a093
|
@ -143,12 +143,6 @@ checkorders(void)
|
|||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
static boolean
|
||||
is_monstrous(unit * u)
|
||||
{
|
||||
return (boolean) (u->faction->no == MONSTER_FACTION || !playerrace(u->race));
|
||||
}
|
||||
|
||||
static void
|
||||
get_food(region *r)
|
||||
{
|
||||
|
|
|
@ -2579,7 +2579,11 @@ int
|
|||
lifestyle(const unit * u)
|
||||
{
|
||||
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) {
|
||||
astralspace = getplanebyname("Astralraum");
|
||||
|
|
|
@ -1048,3 +1048,10 @@ invisible(const unit *u)
|
|||
return get_item(u, I_RING_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));
|
||||
}
|
||||
|
||||
|
|
|
@ -154,4 +154,6 @@ extern boolean learn_skill(struct unit * u, skill_t sk, double chance);
|
|||
|
||||
extern int invisible(const unit *u);
|
||||
|
||||
extern boolean is_monstrous(const unit * u);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue