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);
|
||||
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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue