From ac595313cfaa7a77fda9a72cee19e10ee468921d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 8 Jun 2008 09:00:35 +0000 Subject: [PATCH] fixes re-run 574 --- src/common/kernel/item.c | 3 +++ src/common/kernel/reports.c | 2 +- src/eressea/korrektur.c | 22 ++++++++++++++++++++++ src/res/eressea/items.xml | 3 +-- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/common/kernel/item.c b/src/common/kernel/item.c index b05708667..1260c10cf 100644 --- a/src/common/kernel/item.c +++ b/src/common/kernel/item.c @@ -387,6 +387,9 @@ static const char * it_aliases[][2] = { { "p1", "goliathwater" }, { "p5", "peasantblood" }, { "p8", "nestwarmth" }, + { "diamond", "adamantium" }, + { "diamondaxe", "adamantiumaxe" }, + { "diamondplate", "adamantiumplate" }, { NULL, NULL }, }; diff --git a/src/common/kernel/reports.c b/src/common/kernel/reports.c index f13ae29ef..255e935f0 100644 --- a/src/common/kernel/reports.c +++ b/src/common/kernel/reports.c @@ -359,7 +359,7 @@ report_resources(const seen_region * sr, resource_report * result, int size, con if (money) { if (n>=size) return -1; - report_resource(result+n, "rm_money", peasants, -1); + report_resource(result+n, "rm_money", money, -1); ++n; } if (peasants) { diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 802661665..722452bb9 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -376,6 +376,25 @@ growing_trees(void) return 0; } +static int fix_adamantium(void) +{ + faction * f; + for (f=factions;f;f=f->next) { + const struct item_type * itype; + int o = 1; + int p = (f->no % 5)?1:0; + int a = (f->no % 5)?0:1; + + itype = it_find("adamantium"); + i_change(&f->items, itype, o-i_get(f->items, itype)); + itype = it_find("adamantiumaxe"); + i_change(&f->items, itype, a-i_get(f->items, itype)); + itype = it_find("adamantiumplate"); + i_change(&f->items, itype, p-i_get(f->items, itype)); + } + return 0; +} + #include #include typedef struct gate_data { @@ -839,6 +858,7 @@ fix_heroes(void) } #endif + static void fix_groups(void) { @@ -894,6 +914,8 @@ korrektur(void) do_once("asfi", &fix_astral_firewalls); fix_astralplane(); fix_toads(); + do_once("admt", &fix_adamantium); + /* fix_heroes(); */ verify_owners(false); /* fix_herbtypes(); */ diff --git a/src/res/eressea/items.xml b/src/res/eressea/items.xml index a18cada18..a80402dc2 100644 --- a/src/res/eressea/items.xml +++ b/src/res/eressea/items.xml @@ -176,8 +176,7 @@ - - +