Seaserpents are cannibals.

This commit is contained in:
Enno Rehling 2019-07-28 18:41:26 +02:00
parent 3d57d2b77f
commit 7bb17225c9
2 changed files with 19 additions and 2 deletions

2
clibs

@ -1 +1 @@
Subproject commit 1854780fe3073e491775836c22f709668b1fff62 Subproject commit 6965050165efdae89305a13bff06283229f143f4

View File

@ -730,6 +730,17 @@ static order *plan_dragon(unit * u)
return long_order; return long_order;
} }
static void monster_cannibalism(unit *u) {
unit *u2;
for (u2 = u->next; u2; u2 = u2->next) {
if (u2->_race == u->_race) {
stats_count("monsters.cannibalism", u2->number);
u2->number = 0;
}
}
}
void plan_monsters(faction * f) void plan_monsters(faction * f)
{ {
region *r; region *r;
@ -748,14 +759,20 @@ void plan_monsters(faction * f)
bool can_move = true; bool can_move = true;
/* Ab hier nur noch Befehle fuer NPC-Einheiten. */ /* Ab hier nur noch Befehle fuer NPC-Einheiten. */
if (u->faction!=f) if (u->faction != f || u->number <= 0) {
continue; continue;
}
/* Parteitarnung von Monstern ist doof: */ /* Parteitarnung von Monstern ist doof: */
if (fval(u, UFL_ANON_FACTION)) { if (fval(u, UFL_ANON_FACTION)) {
u->flags &= ~UFL_ANON_FACTION; u->flags &= ~UFL_ANON_FACTION;
} }
if (rc->splitsize < 10) {
/* hermit-type monsters eat each other */
monster_cannibalism(u);
}
if (skill_enabled(SK_PERCEPTION)) { if (skill_enabled(SK_PERCEPTION)) {
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */ /* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
produceexp(u, SK_PERCEPTION, u->number); produceexp(u, SK_PERCEPTION, u->number);