- race and tactics costs need fixing

This commit is contained in:
Enno Rehling 2009-07-08 11:42:25 +00:00
parent 1b2dcd4a65
commit 627947194e
3 changed files with 9 additions and 5 deletions

View File

@ -1762,7 +1762,7 @@ create_potion(unit * u, const potion_type * ptype, int want)
static void
create_item(unit * u, const item_type * itype, int want)
{
if (fval(itype->rtype, RTF_LIMITED)) {
if (itype->construction && fval(itype->rtype, RTF_LIMITED)) {
#if GUARD_DISABLES_PRODUCTION == 1
if(is_guarded(u->region, u, GUARD_PRODUCE)) {
cmistake(u, u->thisorder, 70, MSG_EVENT);

View File

@ -107,12 +107,16 @@ magic_lowskill(unit *u)
int
study_cost(unit *u, skill_t sk)
{
static int cost = 0;
static int cost[MAXSKILLS];
int stufe, k = 50;
if (cost==0) {
cost = get_param_int(global.parameters, "skills.cost", 200);
if (cost[sk]==0) {
char buffer[256];
sprintf(buffer, "skills.cost.%s", skillnames[sk]);
cost[sk] = get_param_int(global.parameters, buffer, -1);
}
if (cost[sk]>=0) return cost[sk];
switch (sk) {
case SK_SPY:
return 100;

View File

@ -123,7 +123,7 @@
<param name="magic.power" value="0.5"/>
<param name="resource.factor" value="0.25"/>
<param name="skills.cost" value="500"/>
<param name="skills.cost.tactics" value="500"/>
<param name="entertain.base" value="0"/>
<param name="entertain.perlevel" value="20"/>
<param name="nmr.timeout" value="5"/>