From 1789bc06e9aa50593aead336101e89092815b410 Mon Sep 17 00:00:00 2001 From: Steffen Mecke Date: Mon, 16 Nov 2015 18:36:14 +0100 Subject: [PATCH] monster faction may learn from experience --- src/kernel/unit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kernel/unit.c b/src/kernel/unit.c index 493a3a66f..339e5693a 100644 --- a/src/kernel/unit.c +++ b/src/kernel/unit.c @@ -27,6 +27,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "curse.h" #include "item.h" #include "move.h" +#include "monster.h" #include "order.h" #include "plane.h" #include "race.h" @@ -1945,7 +1946,7 @@ static double produceexp_chance(void) { void produceexp_ex(struct unit *u, skill_t sk, int n, bool (*learn)(unit *, skill_t, double)) { - if (n != 0 && playerrace(u_race(u))) { + if (n != 0 && (is_monsters(u->faction) || playerrace(u_race(u)))) { double chance = produceexp_chance(); if (chance > 0.0F) { learn(u, sk, (n * chance) / u->number);