forked from github/server
- Munitionsverbraucht beim Belagern
This commit is contained in:
parent
6c3a576edb
commit
f530f30cb7
|
@ -215,7 +215,7 @@ attack_catapult(const troop * at, int * casualties, int row)
|
|||
assert(af->person[at->index].reload==0);
|
||||
|
||||
#if CATAPULT_AMMUNITION
|
||||
if(new_get_pooled(au, &rt_catapultammo, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK|GET_POOLED_RESERVE|GET_POOLED_FORCE) <= 0) {
|
||||
if(new_get_pooled(au, &rt_catapultammo, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK) <= 0) {
|
||||
/* No ammo. Use other weapon if available. */
|
||||
return true;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ attack_catapult(const troop * at, int * casualties, int row)
|
|||
n = min(CATAPULT_ATTACKS, count_enemies(b, af->side, FS_ENEMY, minrow, maxrow));
|
||||
|
||||
#if CATAPULT_AMMUNITION
|
||||
new_use_pooled(au, &rt_catapultammo, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK|GET_POOLED_RESERVE|GET_POOLED_FORCE, 1);
|
||||
new_use_pooled(au, &rt_catapultammo, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, 1);
|
||||
#endif
|
||||
|
||||
while (--n >= 0) {
|
||||
|
|
|
@ -197,7 +197,8 @@ siege(region * r, unit * u)
|
|||
}
|
||||
/* schaden durch katapulte */
|
||||
|
||||
d = min(u->number, get_item(u, I_CATAPULT));
|
||||
d = min(u->number,
|
||||
min(new_get_pooled(u, &rt_catapultammo, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK), get_item(u, I_CATAPULT)));
|
||||
if (eff_skill(u, SK_CATAPULT, r) >= 1) {
|
||||
katapultiere = d;
|
||||
d *= eff_skill(u, SK_CATAPULT, r);
|
||||
|
@ -205,7 +206,6 @@ siege(region * r, unit * u)
|
|||
d = 0;
|
||||
}
|
||||
|
||||
|
||||
if ((bewaffnete = armedmen(u)) == 0 && d == 0) {
|
||||
/* abbruch, falls unbewaffnet oder unfaehig, katapulte zu benutzen */
|
||||
cmistake(u, findorder(u, u->thisorder), 80, MSG_EVENT);
|
||||
|
@ -232,6 +232,7 @@ siege(region * r, unit * u)
|
|||
/* meldung, schaden anrichten */
|
||||
if (d && !(is_cursed(b->attribs, C_MAGICSTONE, 0))) {
|
||||
b->size -= d;
|
||||
new_use_pooled(au, &rt_catapultammo, GET_SLACK|GET_RESERVE|GET_POOLED_SLACK, d);
|
||||
d = 100 * d / b->size;
|
||||
} else d = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue