Merge branch 'correct-regions-with-ball-travel' of https://github.com/copperwater/NetHack into NetHack-5.0
This commit is contained in:
+8
-3
@@ -808,7 +808,8 @@ drag_ball(coordxy x, coordxy y, int *bc_control,
|
|||||||
miss(xname(uball), victim);
|
miss(xname(uball), victim);
|
||||||
|
|
||||||
} /* now check again in case mon died */
|
} /* 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.ux = uchain->ox;
|
||||||
u.uy = uchain->oy;
|
u.uy = uchain->oy;
|
||||||
newsym(u.ux0, u.uy0);
|
newsym(u.ux0, u.uy0);
|
||||||
@@ -820,6 +821,9 @@ drag_ball(coordxy x, coordxy y, int *bc_control,
|
|||||||
*ballx = uchain->ox;
|
*ballx = uchain->ox;
|
||||||
*bally = uchain->oy;
|
*bally = uchain->oy;
|
||||||
move_bc(0, *bc_control, *ballx, *bally, *chainx, *chainy);
|
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);
|
spoteffects(TRUE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -932,10 +936,11 @@ drop_ball(coordxy x, coordxy y)
|
|||||||
&& (is_pool(x, y)
|
&& (is_pool(x, y)
|
||||||
|| ((t = t_at(x, y))
|
|| ((t = t_at(x, y))
|
||||||
&& (is_pit(t->ttyp)
|
&& (is_pit(t->ttyp)
|
||||||
|| is_hole(t->ttyp))))) {
|
|| is_hole(t->ttyp))))
|
||||||
|
&& in_out_region(x, y)) {
|
||||||
u.ux = x;
|
u.ux = x;
|
||||||
u.uy = y;
|
u.uy = y;
|
||||||
} else {
|
} else if (in_out_region(x - u.dx, y - u.dy)) {
|
||||||
u.ux = x - u.dx;
|
u.ux = x - u.dx;
|
||||||
u.uy = y - u.dy;
|
u.uy = y - u.dy;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user