From 41819ed5d6e886e72e117df08804dc5dad789f32 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 30 Dec 2001 10:07:11 +0000 Subject: [PATCH] =?UTF-8?q?santa=20beschenkt=20keine=20ringtr=C3=A4ger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/modules/xmas.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/modules/xmas.c b/src/common/modules/xmas.c index fd20f99da..48186e872 100644 --- a/src/common/modules/xmas.c +++ b/src/common/modules/xmas.c @@ -19,6 +19,7 @@ #include #include #include +#include #include /* util includes */ @@ -28,6 +29,8 @@ void santa_comes_to_town(region * r, unit * santa, void (*action)(unit*)) { faction * f; + const item_type * roi = it_find("roi"); + assert(roi); fset(santa, FL_TRAVELTHRU); for (f = factions;f;f=f->next) { @@ -35,7 +38,7 @@ santa_comes_to_town(region * r, unit * santa, void (*action)(unit*)) unit * senior = f->units; if (!playerrace(f->race)) continue; for (u = f->units; u; u=u->nextF) { - if (senior->age < u->age || effstealth(senior) > effstealth(u)) senior = u; + if (senior->age < u->age || effstealth(senior) > effstealth(u) || i_get(senior->items, roi)) senior = u; } if (!senior) continue;