fix issue #949 - dropping welded iron ball
If punished and the attached iron ball was both cursed and wielded, falling while going down stairs would drop it instead of leaving it welded to hero's hand. ( Didn't happen for iron ball that wasn't chained to hero's leg.) I thought that this was going to be a one or two line fix but ball and chain stuff is never that simple. Fixes #949
This commit is contained in:
@@ -22,7 +22,7 @@ static struct breadcrumbs bcpbreadcrumbs = {0}, bcubreadcrumbs = {0};
|
||||
void
|
||||
ballrelease(boolean showmsg)
|
||||
{
|
||||
if (carried(uball)) {
|
||||
if (carried(uball) && !welded(uball)) {
|
||||
if (showmsg)
|
||||
pline("Startled, you drop the iron ball.");
|
||||
if (uwep == uball)
|
||||
@@ -44,6 +44,9 @@ ballfall(void)
|
||||
{
|
||||
boolean gets_hit;
|
||||
|
||||
if (uball && carried(uball) && welded(uball))
|
||||
return;
|
||||
|
||||
gets_hit = (((uball->ox != u.ux) || (uball->oy != u.uy))
|
||||
&& ((uwep == uball) ? FALSE : (boolean) rn2(5)));
|
||||
ballrelease(TRUE);
|
||||
@@ -996,7 +999,7 @@ drag_down(void)
|
||||
*/
|
||||
forward = carried(uball) && (uwep == uball || !uwep || !rn2(3));
|
||||
|
||||
if (carried(uball))
|
||||
if (carried(uball) && !welded(uball))
|
||||
You("lose your grip on the iron ball.");
|
||||
|
||||
cls(); /* previous level is still displayed although you
|
||||
|
||||
Reference in New Issue
Block a user