first changes from hg_eressea transferred

This commit is contained in:
Enno Rehling 2010-02-20 18:55:42 +00:00
parent ee8183f585
commit 14a1cb1acc
5 changed files with 14 additions and 12 deletions

View File

@ -53,8 +53,6 @@
#include "terrain.h"
#include "unit.h"
#include <spells/regioncurse.h>
/* util includes */
#include <util/attrib.h>
#include <util/base36.h>
@ -2727,6 +2725,15 @@ int rule_auto_taxation(void)
return rule_taxation;
}
int rule_blessed_harvest(void)
{
static int rule = -1;
if (rule<0) {
rule = get_param_int(global.parameters, "rules.magic.blessed_harvest", HARVEST_WORK);
}
return rule;
}
static int
default_wage(const region *r, const faction * f, const race * rc, int in_turn)
{

View File

@ -255,6 +255,7 @@ int cmp_current_owner(const struct building * b, const struct building * bother)
int rule_auto_taxation(void);
int rule_region_owners(void);
int rule_stealth_faction(void);
int rule_blessed_harvest(void);
extern int count_all(const struct faction * f);
extern int count_migrants (const struct faction * f);

View File

@ -900,8 +900,12 @@ move_unit(unit * u, region * r, unit ** ulist)
fset(u, UFL_MOVED);
if (u->ship || u->building) {
/* can_leave must be checked in travel_i */
#ifndef NDEBUG
boolean result = leave(u, false);
assert(result);
#else
leave(u, false);
#endif
}
translist(&u->region->units, ulist, u);
} else {

View File

@ -203,15 +203,6 @@ static struct curse_type ct_blessedharvest = {
cinfo_simple
};
int rule_blessed_harvest(void)
{
static int rule = -1;
if (rule<0) {
rule = get_param_int(global.parameters, "rules.magic.blessed_harvest", HARVEST_WORK);
}
return rule;
}
static struct curse_type ct_drought = {
"drought",
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ),

View File

@ -24,7 +24,6 @@ extern void register_regioncurse(void);
#define HARVEST_WORK 0x00
#define HARVEST_TAXES 0x01
int rule_blessed_harvest(void);
#ifdef __cplusplus
}