and even more boulders...
Revise the m<dir>-toward-boulder handling to let a hero who would be able to squeese into the boulder's spot if it was blocked from being pushed to do the squeeze without any pushing. Unlike the previous changes, this might have an impact on play. It allows squeezing under then stepping past an unblocked boulder that's in a corridor in order to be able to push it back the other direction where maybe there's more room to maneuver it out of the way.
This commit is contained in:
+2
-1
@@ -640,7 +640,8 @@ blessed scroll of remove curse read while confused blesses or curses any
|
|||||||
object traversal would process items on the floor at hero's spot
|
object traversal would process items on the floor at hero's spot
|
||||||
instead of the rest of inventory
|
instead of the rest of inventory
|
||||||
can now use m<dir> to try to move to an adjacent boulder's spot without
|
can now use m<dir> to try to move to an adjacent boulder's spot without
|
||||||
pushing it; hero poly'd into a giant will succeed, others will fail
|
pushing it; hero poly'd into a giant or a tiny creature or carrying so
|
||||||
|
little as to be able to squeeze there will succeed, others will fail
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
+21
-12
@@ -94,6 +94,8 @@ revive_nasty(int x, int y, const char *msg)
|
|||||||
return revived;
|
return revived;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define squeezeablylightinvent() (!g.invent || inv_weight() <= -850)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
moverock(void)
|
moverock(void)
|
||||||
{
|
{
|
||||||
@@ -124,11 +126,14 @@ moverock(void)
|
|||||||
ry = u.uy + 2 * u.dy;
|
ry = u.uy + 2 * u.dy;
|
||||||
nomul(0);
|
nomul(0);
|
||||||
|
|
||||||
/* using m<dir> towards an adjacent boulder steps over/onto it
|
/* using m<dir> towards an adjacent boulder steps over/onto it if
|
||||||
if poly'd into a giant but is a no-op in other circumstances
|
poly'd into a giant or squeezes under/beside it if small/light
|
||||||
unless the move attempt reveals an unseen boulder or lack of
|
enough but is a no-op in other circumstances unless move attempt
|
||||||
remembered, unseen monster */
|
reveals an unseen boulder or lack of remembered, unseen monster */
|
||||||
if (g.context.nopick) {
|
if (g.context.nopick) {
|
||||||
|
int oldglyph = glyph_at(sx, sy); /* before feel_location() */
|
||||||
|
|
||||||
|
feel_location(sx, sy); /* same for all 3 if/else-if/else cases */
|
||||||
if (throws_rocks(g.youmonst.data)) {
|
if (throws_rocks(g.youmonst.data)) {
|
||||||
/* player has used 'm<dir>' to move, so step to boulder's
|
/* player has used 'm<dir>' to move, so step to boulder's
|
||||||
spot without pushing it; hero is poly'd into a giant,
|
spot without pushing it; hero is poly'd into a giant,
|
||||||
@@ -139,10 +144,12 @@ moverock(void)
|
|||||||
/* ["over" seems weird on air level but what else to say?] */
|
/* ["over" seems weird on air level but what else to say?] */
|
||||||
sokoban_guilt();
|
sokoban_guilt();
|
||||||
res = 0; /* move to <sx,sy> */
|
res = 0; /* move to <sx,sy> */
|
||||||
|
} else if (!u.usteed && (squeezeablylightinvent()
|
||||||
|
|| verysmall(g.youmonst.data))) {
|
||||||
|
You("squeeze yourself against the boulder.");
|
||||||
|
sokoban_guilt();
|
||||||
|
res = 0; /* move to <sx,sy> */
|
||||||
} else {
|
} else {
|
||||||
int oldglyph = glyph_at(sx, sy);
|
|
||||||
|
|
||||||
feel_location(sx, sy);
|
|
||||||
There("is a boulder in your way.");
|
There("is a boulder in your way.");
|
||||||
/* use a move if hero learns something; see test_move() for
|
/* use a move if hero learns something; see test_move() for
|
||||||
how/why 'context.door_opened' is being dragged into this */
|
how/why 'context.door_opened' is being dragged into this */
|
||||||
@@ -424,11 +431,13 @@ moverock(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!u.usteed
|
/* similar to m<dir> above, but that doesn't care if you're
|
||||||
&& (((!g.invent || inv_weight() <= -850)
|
moving orthogonally or toward a diagonal squeeze */
|
||||||
&& (!u.dx || !u.dy || (IS_ROCK(levl[u.ux][sy].typ)
|
if (!u.usteed && ((squeezeablylightinvent()
|
||||||
&& IS_ROCK(levl[sx][u.uy].typ))))
|
&& (!u.dx || !u.dy
|
||||||
|| verysmall(g.youmonst.data))) {
|
|| (IS_ROCK(levl[u.ux][sy].typ)
|
||||||
|
&& IS_ROCK(levl[sx][u.uy].typ))))
|
||||||
|
|| verysmall(g.youmonst.data))) {
|
||||||
pline(
|
pline(
|
||||||
"However, you can squeeze yourself into a small opening.");
|
"However, you can squeeze yourself into a small opening.");
|
||||||
sokoban_guilt();
|
sokoban_guilt();
|
||||||
|
|||||||
Reference in New Issue
Block a user