Auf der Einheit liegen -3 Wirkungen Schaffenstrunk.
This commit is contained in:
Enno Rehling 2005-09-08 18:38:14 +00:00
parent 11f9e607ca
commit c1b275dad9
2 changed files with 4 additions and 3 deletions

View File

@ -197,7 +197,7 @@ a_readeffect(attrib *a, FILE *f)
fscanf(f, "%s %d", zText, &power);
ptype = pt_find(zText);
}
if (ptype==NULL || power==0) return AT_READ_FAIL;
if (ptype==NULL || power<=0) return AT_READ_FAIL;
edata->type = ptype;
edata->value = power;
return AT_READ_OK;

View File

@ -546,8 +546,9 @@ build_road(region * r, unit * u, int size, direction_t d)
int dm = get_effect(u, oldpotiontype[P_DOMORE]);
if (dm != 0) {
int sk = eff_skill(u, SK_ROAD_BUILDING, r);
dm = (left - n + sk - 1) / sk;
dm = min(dm, u->number);
int todo = (left - n + sk - 1) / sk;
todo = min(todo, u->number);
dm = min(dm, todo);
change_effect(u, oldpotiontype[P_DOMORE], -dm);
n += dm * sk;
} /* Auswirkung Schaffenstrunk */