Skip to content

Commit ad042cf

Browse files
Fix: reactivate offhand weapon intrinsics when catching a returning weapon
When catching Mjollnir/Xiuhcoatl/boomerangs/etc., make sure granted extrinsics/artifact light/etc. from the offhand weapon are also reinstated.
1 parent 5408f2e commit ad042cf

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3381,3 +3381,4 @@ The following changes to date are:
33813381
- Fix: monster casting summon minion against another monster
33823382
- Fix: spec_applies didn't consider if target was underwater
33833383
- Fix: monster priests shouldn't wield edged weapons either
3384+
- Fix: reactivate offhand weapon intrinsics when catching a returning weapon

src/dothrow.c

+15-4
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,11 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
14191419
if (obj->owornmask & W_QUIVER) /* in case addinv() autoquivered */
14201420
setuqwep((struct obj *) 0);
14211421
setuwep(obj);
1422-
u.twoweap = twoweap;
1422+
if (twoweap) {
1423+
u.twoweap = 1;
1424+
setuswapwep(uswapwep);
1425+
update_inventory();
1426+
}
14231427
if (artifact_light(obj) && !obj->lamplit) {
14241428
begin_burn(obj, FALSE);
14251429
if (!Blind)
@@ -1450,8 +1454,11 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
14501454
(void) encumber_msg();
14511455
if (wep_mask && !(obj->owornmask & wep_mask)) {
14521456
setworn(obj, wep_mask);
1453-
/* moot; can no longer two-weapon with missile(s) */
1454-
u.twoweap = twoweap;
1457+
if (twoweap) {
1458+
u.twoweap = 1;
1459+
setuswapwep(uswapwep);
1460+
update_inventory();
1461+
}
14551462
}
14561463
clear_thrownobj = TRUE;
14571464
goto throwit_return;
@@ -1635,7 +1642,11 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
16351642
if (obj->owornmask & W_QUIVER)
16361643
setuqwep((struct obj *) 0);
16371644
setuwep(obj);
1638-
u.twoweap = twoweap;
1645+
if (twoweap) {
1646+
u.twoweap = 1;
1647+
setuswapwep(uswapwep);
1648+
update_inventory();
1649+
}
16391650
retouch_object(&obj, !uarmg, TRUE);
16401651
if (artifact_light(obj) && !obj->lamplit) {
16411652
begin_burn(obj, FALSE);

0 commit comments

Comments
 (0)