forked from github/server
loot refactoring and a small armor/shield fix.
This commit is contained in:
parent
f55ab5f752
commit
a28cbc647a
2 changed files with 4 additions and 13 deletions
15
src/battle.c
15
src/battle.c
|
@ -1059,8 +1059,8 @@ terminate(troop dt, troop at, int type, const char *damage, bool missile)
|
||||||
int hp;
|
int hp;
|
||||||
|
|
||||||
int ar = 0, an, am;
|
int ar = 0, an, am;
|
||||||
const armor_type *armor = select_armor(dt, true);
|
const armor_type *armor = select_armor(dt, false);
|
||||||
const armor_type *shield = select_armor(dt, false);
|
const armor_type *shield = select_armor(dt, true);
|
||||||
|
|
||||||
const weapon_type *dwtype = NULL;
|
const weapon_type *dwtype = NULL;
|
||||||
const weapon_type *awtype = NULL;
|
const weapon_type *awtype = NULL;
|
||||||
|
@ -2554,16 +2554,7 @@ static void loot_items(fighter * corpse)
|
||||||
mustloot ? loot : loot_quota(corpse->unit, fig->unit, itm->type,
|
mustloot ? loot : loot_quota(corpse->unit, fig->unit, itm->type,
|
||||||
loot);
|
loot);
|
||||||
if (trueloot > 0) {
|
if (trueloot > 0) {
|
||||||
item *l = fig->loot;
|
i_change(&fig->loot, itm->type, trueloot);
|
||||||
while (l && l->type != itm->type)
|
|
||||||
l = l->next;
|
|
||||||
if (!l) {
|
|
||||||
l = calloc(sizeof(item), 1);
|
|
||||||
l->next = fig->loot;
|
|
||||||
fig->loot = l;
|
|
||||||
l->type = itm->type;
|
|
||||||
}
|
|
||||||
l->number += trueloot;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1418,7 +1418,7 @@ static void durchreisende(FILE * F, const region * r, const faction * f)
|
||||||
if (cansee_durchgezogen(f, r, u, 0)) {
|
if (cansee_durchgezogen(f, r, u, 0)) {
|
||||||
++counter;
|
++counter;
|
||||||
if (u->ship != NULL) {
|
if (u->ship != NULL) {
|
||||||
#ifdef GERMAN_FLUFF_DISABLED
|
#ifdef GERMAN_FLUFF_ENABLED
|
||||||
if (counter == 1) {
|
if (counter == 1) {
|
||||||
bytes = (int)strlcpy(bufp, "Die ", size);
|
bytes = (int)strlcpy(bufp, "Die ", size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue