forked from github/server
Auf der Einheit liegen -3 Wirkungen Schaffenstrunk.
This commit is contained in:
parent
11f9e607ca
commit
c1b275dad9
|
@ -197,7 +197,7 @@ a_readeffect(attrib *a, FILE *f)
|
||||||
fscanf(f, "%s %d", zText, &power);
|
fscanf(f, "%s %d", zText, &power);
|
||||||
ptype = pt_find(zText);
|
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->type = ptype;
|
||||||
edata->value = power;
|
edata->value = power;
|
||||||
return AT_READ_OK;
|
return AT_READ_OK;
|
||||||
|
|
|
@ -546,8 +546,9 @@ build_road(region * r, unit * u, int size, direction_t d)
|
||||||
int dm = get_effect(u, oldpotiontype[P_DOMORE]);
|
int dm = get_effect(u, oldpotiontype[P_DOMORE]);
|
||||||
if (dm != 0) {
|
if (dm != 0) {
|
||||||
int sk = eff_skill(u, SK_ROAD_BUILDING, r);
|
int sk = eff_skill(u, SK_ROAD_BUILDING, r);
|
||||||
dm = (left - n + sk - 1) / sk;
|
int todo = (left - n + sk - 1) / sk;
|
||||||
dm = min(dm, u->number);
|
todo = min(todo, u->number);
|
||||||
|
dm = min(dm, todo);
|
||||||
change_effect(u, oldpotiontype[P_DOMORE], -dm);
|
change_effect(u, oldpotiontype[P_DOMORE], -dm);
|
||||||
n += dm * sk;
|
n += dm * sk;
|
||||||
} /* Auswirkung Schaffenstrunk */
|
} /* Auswirkung Schaffenstrunk */
|
||||||
|
|
Loading…
Reference in New Issue