kleine Ändeurngen, damit der mapper kompiliert

This commit is contained in:
Enno Rehling 2002-02-03 02:37:46 +00:00
parent de1851d65b
commit d47f80df16
1 changed files with 34 additions and 0 deletions

View File

@ -19,11 +19,13 @@
/* kernel includes */ /* kernel includes */
#include <faction.h> #include <faction.h>
#include <item.h>
#include <plane.h> #include <plane.h>
#include <race.h> #include <race.h>
#include <region.h> #include <region.h>
#include <reports.h> #include <reports.h>
#include <study.h> #include <study.h>
#include <skill.h>
#include <unit.h> #include <unit.h>
/* util includes */ /* util includes */
@ -283,6 +285,38 @@ SeedPartei(void)
return goodregion(rc); 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 void
NeuePartei(region * r) NeuePartei(region * r)
{ {