fix #4341 - jousting while trapped

This commit is contained in:
PatR
2025-09-01 13:35:05 -07:00
parent e880b08be3
commit e4f0d1a3e2
2 changed files with 8 additions and 0 deletions

View File

@@ -2129,6 +2129,9 @@ when game ended with 'force_invmenu' On, final disclosure of inventory would
contain spurious menu entry "? - (list likely candidates)"
avoid reporting "a gold pieces appears next to you" for mimic
don't try to split a pudding that got jousted into a hole and is off the map
mounted hero was able to deliver joust hits when trapped
timer sanity check for melting ice gave false complaint about non-ice for
frozen moat under open drawbridge
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository

View File

@@ -2072,6 +2072,11 @@ joust(struct monst *mon, /* target */
/* sanity check; lance must be wielded in order to joust */
if (obj != uwep && (obj != uswapwep || !u.twoweap))
return 0;
/* can't joust while trapped--not enough room to maneuver;
* TODO? if the steed is trapped in a pit, perhaps the hero ought to be
* able to joust against a monster that's in a conjoined pit */
if (u.utrap)
return 0;
/* if using two weapons, use worse of lance and two-weapon skills */
skill_rating = P_SKILL(weapon_type(obj)); /* lance skill */