U234, buglist, and related iron ball bugs
Several bug reports have been filed regarding the use of attached iron balls to move in ways that are otherwise disallowed: moving diagonally from a doorway, moving through boulders, squeezing through small openings, passing over traps and diagonally between boulders on sokoban levels. Modified bhit to deal with this. All these cases now cause the iron ball to stop if appropriate for your form, level of burden, and so on. Since both boulders and iron balls are big, boulders now always stop thrown iron balls, even if not attached. Since iron balls don't cause any damage as they pull you along, I didn't add any damage for the new "jerks to a halt" cases.
This commit is contained in:
@@ -120,6 +120,8 @@ refine cmdassist handling for grid bugs
|
||||
when casting force bolt spell while engulfed go ahead and use the engulfers
|
||||
name in the hit message rather than "it"
|
||||
a fog cloud shouldn't pummel you with debris
|
||||
do not let an attached iron ball drag the hero through a location that the hero
|
||||
could not move normally
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
26
src/zap.c
26
src/zap.c
@@ -2782,6 +2782,32 @@ struct obj *obj; /* object tossed/used */
|
||||
break; /* physical objects fall onto sink */
|
||||
#endif
|
||||
}
|
||||
/* limit range of ball so hero won't make an invalid move */
|
||||
if (weapon == THROWN_WEAPON && range > 0 &&
|
||||
obj->otyp == HEAVY_IRON_BALL) {
|
||||
struct obj *bobj;
|
||||
struct trap *t;
|
||||
if ((bobj = sobj_at(BOULDER, x, y)) != 0) {
|
||||
if (cansee(x,y))
|
||||
pline("%s hits %s.",
|
||||
The(distant_name(obj, xname)), an(xname(bobj)));
|
||||
range = 0;
|
||||
} else if (obj == uball) {
|
||||
if (!test_move(x - ddx, y - ddy, ddx, ddy, TEST_MOVE)) {
|
||||
/* nb: it didn't hit anything directly */
|
||||
if (cansee(x,y))
|
||||
pline("%s jerks to an abrupt halt.",
|
||||
The(distant_name(obj, xname))); /* lame */
|
||||
range = 0;
|
||||
} else if (In_sokoban(&u.uz) && (t = t_at(x, y)) != 0 &&
|
||||
(t->ttyp == PIT || t->ttyp == SPIKED_PIT ||
|
||||
t->ttyp == HOLE || t->ttyp == TRAPDOOR)) {
|
||||
/* hero falls into the trap, so ball stops */
|
||||
range = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* thrown/kicked missile has moved away from its starting spot */
|
||||
point_blank = FALSE; /* affects passing through iron bars */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user