R919 - applying lances
Fixes 2 bugs: 1) an impossible() could occur if you applied a lance against a long worm because the code uses thitmonst to do the hitting, but didn't set bhitpos, which is required before calling thitmonst. Add the missing assignment. 2) applying a lance would never mark a knight as a caitiff. Added a new check_caitiff function and called it from the 2 existing checks and in the lance code.
This commit is contained in:
@@ -2367,6 +2367,8 @@ use_pole (obj)
|
||||
if ((mtmp = m_at(cc.x, cc.y)) != (struct monst *)0) {
|
||||
int oldhp = mtmp->mhp;
|
||||
|
||||
bhitpos = cc;
|
||||
check_caitiff(mtmp);
|
||||
(void) thitmonst(mtmp, uwep);
|
||||
/* check the monster's HP because thitmonst() doesn't return
|
||||
* an indication of whether it hit. Not perfect (what if it's a
|
||||
|
||||
Reference in New Issue
Block a user