More strict checking of dishonourable attacks
Move the caitiff check into thitmonst, the code responsible for object hitting a monster, intead of checking the caitiff in multiple places before calling that. Previously there were some cases where caitiff was not checked, eg. samurai could fire arrows at a peaceful monster without the dishonourable behaviour check. Now you will get the check even if you miss with the projectile. This may need to be adjusted for throwing beneficial potions at monsters...
This commit is contained in:
@@ -1604,6 +1604,7 @@ when starting a new game as a monk, newsym(0,0) was being called (adjabil ->
|
||||
on the map yet)
|
||||
incorporate a fix to prevent segfault due to rolling boulder trap
|
||||
wands of digging generate less often lategame
|
||||
more strict checking of dishonourable attacks
|
||||
|
||||
|
||||
Fixes to 5.0.0-x General Problems Exposed Via git Repository
|
||||
|
||||
@@ -3508,7 +3508,6 @@ use_pole(struct obj *obj, boolean autohit)
|
||||
return ECMD_FAIL;
|
||||
}
|
||||
|
||||
check_caitiff(mtmp);
|
||||
gn.notonhead = (gb.bhitpos.x != mtmp->mx || gb.bhitpos.y != mtmp->my);
|
||||
|
||||
/* Snickersnee allows one free hit from a distance per turn */
|
||||
@@ -3847,7 +3846,6 @@ use_grapple(struct obj *obj)
|
||||
flags.confirm = FALSE;
|
||||
(void) attack_checks(mtmp, uwep);
|
||||
flags.confirm = save_confirm;
|
||||
check_caitiff(mtmp);
|
||||
(void) thitmonst(mtmp, uwep);
|
||||
return ECMD_TIME;
|
||||
}
|
||||
|
||||
@@ -2207,6 +2207,8 @@ thitmonst(
|
||||
|
||||
dieroll = rnd(20);
|
||||
|
||||
check_caitiff(mon);
|
||||
|
||||
if (obj->oclass == WEAPON_CLASS || is_weptool(obj)
|
||||
|| obj->oclass == GEM_CLASS) {
|
||||
if (hmode == HMON_KICKED) {
|
||||
|
||||
Reference in New Issue
Block a user