- Fix Trollbelt

This commit is contained in:
Christian Schlittchen 2004-11-07 09:01:22 +00:00
parent 34e88074cc
commit c2f3c6ce80
3 changed files with 7 additions and 2 deletions

View File

@ -359,7 +359,8 @@ extern void plagues(struct region * r, boolean ismagic);
/* Man gibt in einer Taverne mehr Geld aus! */
#define BAGCAPACITY 20000 /* soviel paßt in einen Bag of Holding */
#define STRENGTHCAPACITY 50000 /* zusätzliche Tragkraft beim Kraftzauber */
#define STRENGTHCAPACITY 50000 /* zusätzliche Tragkraft beim Kraftzauber (deprecated) */
#define STRENGTHMULTIPLIER 50 /* multiplier for trollbelt */
typedef struct ursprung {
struct ursprung *next;

View File

@ -1495,6 +1495,10 @@ init_olditems(void)
itype->capacity = BAGCAPACITY;
break;
case I_TROLLBELT:
/* This is wrong. according to the item description it multiplies
* the strength of the wearer by a factor of
* 50 (STRENGTHMULTIPLIER), not add a fixed 50000 */
/* only used in battle.c for items of type ITF_ANIMAL */
itype->capacity = STRENGTHCAPACITY;
break;
default:

View File

@ -274,7 +274,7 @@ walkingcapacity(const struct unit * u)
n += min(personen, tmp) * (HORSECAPACITY - personcapacity(u));
/* change_effect wird in ageing gemacht */
tmp = get_item(u, I_TROLLBELT);
n += min(personen, tmp) * STRENGTHCAPACITY;
n += min(personen, tmp) * (STRENGTHMULTIPLIER-1) * personcapacity(u);
return n;
}