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
118 KiB
118 KiB