"WdL erschafft nur 1 Schoessling pro Trank"

Reparatur des vorangegangenen WdL-fixes. Es sollte nicht die
Holzmenge, sondern die Trankmenge reduziert werden.
This commit is contained in:
Enno Rehling 2006-07-30 12:25:36 +00:00
parent c4abd05ea4
commit 39ada16f6c
1 changed files with 59 additions and 57 deletions

View File

@ -102,7 +102,7 @@ use_potion(unit * u, const item_type * itype, int amount, struct order *ord)
if (ptype==oldpotiontype[P_LIFE]) {
region * r = u->region;
int holz = 0, x;
int holz = 0;
/* für die Aufforstung von Mallornwäldern braucht man Mallorn */
if (fval(r, RF_MALLORN)) {
@ -113,9 +113,11 @@ use_potion(unit * u, const item_type * itype, int amount, struct order *ord)
GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, 10*amount);
}
if (r->land==0) holz=0;
x = holz/10;
if (holz<10*amount) {
int x = holz/10;
if (holz%10) ++x;
if (x<holz) holz = x;
if (x<amount) amount = x;
}
rsettrees(r, 1, rtrees(r, 1) + holz);
ADDMSG(&u->faction->msgs, msg_message("growtree_effect",
"mage amount", u, holz));