fix [part of] #H2554 - hunger when declining to attack peaceful monst
Reported last December by <email deleted>, attempting to move
into a peaceful monster's position and then declining to attack at the
confirmation prompt uses no time, as expected, but does burn nutrition
the same as if you carried out the attack. A player could abuse that to
make room to eat an intrinisic-conferring corpse before it rots away.
This fixes that, and also makes attacking a monster via applying a polearm
and via kicking burn the same extra nutrition as ordinary attack. I didn't
add it for attacking via throwing.
He/she also reported that kicking at a peaceful monster and declining
to attack at the prompt wakes up nearby monsters even though no actual kick
ultimately takes place. I can confirm that, but this does not fix it.
This commit is contained in:
@@ -2649,6 +2649,7 @@ use_pole(obj)
|
||||
bhitpos = cc;
|
||||
if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != (struct monst *)0) {
|
||||
if (attack_checks(mtmp, uwep)) return res;
|
||||
if (overexertion()) return 1; /* burn nutrition; maybe pass out */
|
||||
check_caitiff(mtmp);
|
||||
notonhead = (bhitpos.x != mtmp->mx || bhitpos.y != mtmp->my);
|
||||
(void) thitmonst(mtmp, uwep);
|
||||
|
||||
Reference in New Issue
Block a user