fix github issue #354 - stealarm() impossible
A thieving monster could be killed while the hero was busy taking off armor which needs multiple turns (normally a suit) and if that happened on the same turn as the take-off finished, the warning "stealarm(): dead monster stealing" was issued. Cited case was having the thief be killed by a stinking cloud but it could happen if the death was caused by a pet or by some other monster trying to attack the hero. If the thief died sooner, the situation was silently ignored. So this could have been fixed by just getting rid of the impossible() feedback. 'stealmid' and 'stealoid' should have been static in steal.c rather than global and as such should have been moved into 'struct g'. This moves them there and then takes advantage of having access to 'stealmid' outside of steal.c. That's just a minor optimization since m_detach() could call new thiefdead() unconditionally and the latter could check whether the dead monster matches 'stealmid'. Fixes #354
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.227 $ $NHDT-Date: 1590879610 2020/05/30 23:00:10 $
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.228 $ $NHDT-Date: 1591017415 2020/06/01 13:16:55 $
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
@@ -190,6 +190,8 @@ when hold_another_object fails while hero is swallowed, drop the item into
|
||||
change mkclass() to usually honor (always honor for L class) the hell-only and
|
||||
never-in-hell monster creation flags; no more achi-lich in the Castle
|
||||
(nor master lich there unless demilich gets a potion of gain level)
|
||||
thieving monster could be killed while hero was removing armor, triggering
|
||||
warning "stealarm(): dead monster stealing" when taking-off finished
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||
|
||||
Reference in New Issue
Block a user