From 9472aeacd070c32f31830c07c59222b1e4053ed8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 6 Oct 2002 07:38:03 +0000 Subject: [PATCH] postfix astralraumgeld --- src/eressea/korrektur.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 68c45d663..a8592de33 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -2938,11 +2938,33 @@ korrektur(void) #endif } +int +astral_penger(void) +{ + plane * astralplane = getplanebyname("Astralraum"); + region * r; + const item_type * itype = it_find("money"); + assert(itype); + for (r=regions;r;r=r->next) { + unit * u; + if (rplane(r)!=astralplane) continue; + for (u=r->units;u;u=u->next) freset(u->faction, FL_DH); + for (u=r->units;u;u=u->next) { + if (u->faction->no==MONSTER_FACTION) continue; + if (!fval(u->faction, FL_DH)) { + fset(u->faction, FL_DH); + i_change(&u->items, itype, 300); + } + } + } + return 0; +} void korrektur_end(void) { /* fix_balsamfiasko(); */ + do_once("peng", astral_penger()); #ifdef XMAS2001 do_once("2001", xmas2001()); #endif