Merge branch 'correct-regions-with-ball-travel' of https://github.com/copperwater/NetHack into NetHack-5.0

This commit is contained in:
nhmall
2026-06-19 10:17:40 -04:00
+8 -3
View File
@@ -808,7 +808,8 @@ drag_ball(coordxy x, coordxy y, int *bc_control,
miss(xname(uball), victim);
} /* now check again in case mon died */
if (!m_at(uchain->ox, uchain->oy)) {
if (!m_at(uchain->ox, uchain->oy)
&& in_out_region(uchain->ox, uchain->oy)) {
u.ux = uchain->ox;
u.uy = uchain->oy;
newsym(u.ux0, u.uy0);
@@ -820,6 +821,9 @@ drag_ball(coordxy x, coordxy y, int *bc_control,
*ballx = uchain->ox;
*bally = uchain->oy;
move_bc(0, *bc_control, *ballx, *bally, *chainx, *chainy);
/* weirdness: you were dragged back on account of the ball falling
* into the pit, but if you escape the pit, the ball is "on top of"
* the pit and does not hinder your movement further */
spoteffects(TRUE);
return FALSE;
}
@@ -932,10 +936,11 @@ drop_ball(coordxy x, coordxy y)
&& (is_pool(x, y)
|| ((t = t_at(x, y))
&& (is_pit(t->ttyp)
|| is_hole(t->ttyp))))) {
|| is_hole(t->ttyp))))
&& in_out_region(x, y)) {
u.ux = x;
u.uy = y;
} else {
} else if (in_out_region(x - u.dx, y - u.dy)) {
u.ux = x - u.dx;
u.uy = y - u.dy;
}