forked from github/server
"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:
parent
c4abd05ea4
commit
39ada16f6c
|
@ -102,7 +102,7 @@ use_potion(unit * u, const item_type * itype, int amount, struct order *ord)
|
||||||
|
|
||||||
if (ptype==oldpotiontype[P_LIFE]) {
|
if (ptype==oldpotiontype[P_LIFE]) {
|
||||||
region * r = u->region;
|
region * r = u->region;
|
||||||
int holz = 0, x;
|
int holz = 0;
|
||||||
|
|
||||||
/* für die Aufforstung von Mallornwäldern braucht man Mallorn */
|
/* für die Aufforstung von Mallornwäldern braucht man Mallorn */
|
||||||
if (fval(r, RF_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);
|
GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, 10*amount);
|
||||||
}
|
}
|
||||||
if (r->land==0) holz=0;
|
if (r->land==0) holz=0;
|
||||||
x = holz/10;
|
if (holz<10*amount) {
|
||||||
|
int x = holz/10;
|
||||||
if (holz%10) ++x;
|
if (holz%10) ++x;
|
||||||
if (x<holz) holz = x;
|
if (x<amount) amount = x;
|
||||||
|
}
|
||||||
rsettrees(r, 1, rtrees(r, 1) + holz);
|
rsettrees(r, 1, rtrees(r, 1) + holz);
|
||||||
ADDMSG(&u->faction->msgs, msg_message("growtree_effect",
|
ADDMSG(&u->faction->msgs, msg_message("growtree_effect",
|
||||||
"mage amount", u, holz));
|
"mage amount", u, holz));
|
||||||
|
|
Loading…
Reference in New Issue