From d47f80df16ce87de26d6a65c0c8a901f797dc156 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 3 Feb 2002 02:37:46 +0000 Subject: [PATCH] =?UTF-8?q?kleine=20=C3=84ndeurngen,=20damit=20der=20mappe?= =?UTF-8?q?r=20kompiliert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mapper/map_partei.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/mapper/map_partei.c b/src/mapper/map_partei.c index fd2ff6137..8dd04af57 100644 --- a/src/mapper/map_partei.c +++ b/src/mapper/map_partei.c @@ -19,11 +19,13 @@ /* kernel includes */ #include +#include #include #include #include #include #include +#include #include /* util includes */ @@ -283,6 +285,38 @@ SeedPartei(void) return goodregion(rc); } +static int +level(int days) +{ + int l = 0; + while (level_days(l)<=days) ++l; + return l-1; +} + +static void +give_latestart_bonus(region *r, unit *u, int b) +{ + int bsk = skill_level(level(b*30)); + change_skill(u, SK_OBSERVATION, bsk*u->number); + change_money(u, 200*b); + + { + unit *u2 = createunit(r, u->faction, 1, u->race); + change_skill(u2, SK_TACTICS, bsk * u2->number / 2); + u2->irace = u->irace; + fset(u2, FL_PARTEITARNUNG); + } + + { + unit *u2 = createunit(r, u->faction, 2*b, u->race); + change_skill(u2, SK_SPEAR, skill_level(3) * u2->number); + change_skill(u2, SK_TAXING, skill_level(3) * u2->number); + change_item(u2, I_SPEAR, u2->number); + u2->irace = u->irace; + fset(u2, FL_PARTEITARNUNG); + } +} + void NeuePartei(region * r) {