Skip to content

Commit

Permalink
Fix: Giantslayer strength bonus not taken into account whilst twoweap…
Browse files Browse the repository at this point in the history
…oning.

The player would still receive 25 strength when wielding Giantslayer in
either the primary or offhand while twoweaponing, but the maximum weight
restriction was not negated like it would be if wearing gauntlets of
power. So, adjust the check away from objects, and have it check the
players actual strength.

Snuck in a grammar fix as well.
  • Loading branch information
k21971 committed Jul 10, 2024
1 parent 7ceb1d5 commit 283d40a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions doc/evilhack-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3541,4 +3541,5 @@ The following changes to date are:
another monster)
- Fix: make autoall_menu apply to the 'D' drop menu as well as the loot menu
- Fix: Your dagger also slips from your hand (but a knife was wielded)
- Fix: Giantslayer strength bonus not taken into account whilst twoweaponing

5 changes: 2 additions & 3 deletions src/uhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,7 @@ register struct monst *mtmp;
break;
}

if ((uarmg && uarmg->otyp == GAUNTLETS_OF_POWER)
|| (uarmg && uarmg->oartifact == ART_HAND_OF_VECNA)
if (ACURR(A_STR) == STR19(25)
|| maybe_polyd(is_giant(youmonst.data), Race_if(PM_GIANT)))
maxweight = 200;

Expand All @@ -527,7 +526,7 @@ register struct monst *mtmp;
xname(uswapwep), uswapwep->quan == 1 ? "s" : "",
rn2(2) ? "unwieldy" : "cumbersome");
if (!rn2(10))
Your("%s %s too heavy to effectively fight offhand with.",
Your("%s %s too heavy to fight offhand with effectively.",
xname(uswapwep), uswapwep->quan == 1 ? "is" : "are");
}

Expand Down
3 changes: 1 addition & 2 deletions src/weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,8 +2054,7 @@ struct obj *weapon;
}

/* basically no restrictions if you're a giant, or have giant strength */
if ((uarmg && uarmg->otyp == GAUNTLETS_OF_POWER)
|| (uarmg && uarmg->oartifact == ART_HAND_OF_VECNA)
if (ACURR(A_STR) == STR19(25)
|| maybe_polyd(is_giant(youmonst.data), Race_if(PM_GIANT)))
maxweight = 200;

Expand Down

0 comments on commit 283d40a

Please sign in to comment.