forked from github/server
bug 2660 delayed canibalism
monsters now eat each other in randenc.
This commit is contained in:
parent
d0149f334f
commit
6d542327f9
|
@ -205,8 +205,13 @@ void monsters_desert(struct faction *monsters)
|
|||
unit *u;
|
||||
|
||||
for (u = r->units; u; u = u->next) {
|
||||
if (u->faction != monsters
|
||||
&& (u_race(u)->flags & RCF_DESERT)) {
|
||||
if (u->faction == monsters) {
|
||||
const struct race * rc = u_race(u);
|
||||
if (rc->splitsize < 10) {
|
||||
/* hermit-type monsters eat each other */
|
||||
monster_cannibalism(u);
|
||||
}
|
||||
} else if (u_race(u)->flags & RCF_DESERT) {
|
||||
if (fval(u, UFL_ISNEW))
|
||||
continue;
|
||||
if (rng_int() % 100 < 5) {
|
||||
|
@ -752,7 +757,8 @@ static order *plan_dragon(unit * u)
|
|||
return long_order;
|
||||
}
|
||||
|
||||
static void monster_cannibalism(unit *u) {
|
||||
void monster_cannibalism(unit *u)
|
||||
{
|
||||
unit *u2;
|
||||
|
||||
for (u2 = u->next; u2; u2 = u2->next) {
|
||||
|
@ -792,11 +798,6 @@ void plan_monsters(faction * f)
|
|||
}
|
||||
a_removeall(&u->attribs, &at_otherfaction);
|
||||
|
||||
if (rc->splitsize < 10) {
|
||||
/* hermit-type monsters eat each other */
|
||||
monster_cannibalism(u);
|
||||
}
|
||||
|
||||
if (skill_enabled(SK_PERCEPTION)) {
|
||||
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
|
||||
produceexp(u, SK_PERCEPTION, u->number);
|
||||
|
|
|
@ -15,7 +15,8 @@ extern "C" {
|
|||
|
||||
struct unit *spawn_seaserpent(struct region *r, struct faction *f);
|
||||
void spawn_dragons(void);
|
||||
void monsters_desert(struct faction *monsters);
|
||||
void monsters_desert(const struct faction *monsters);
|
||||
void monster_cannibalism(struct unit *u);
|
||||
|
||||
void monster_kills_peasants(struct unit *u);
|
||||
void make_zombie(struct unit * u);
|
||||
|
|
Loading…
Reference in New Issue