Give feedback when released from a bear trap

This commit is contained in:
Pasi Kallinen
2017-09-28 22:38:08 +03:00
parent e2e7e6464d
commit 1027eacbca
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -452,6 +452,7 @@ when lit candelabrum burned out, persistent inventory window showed that it
was no longer lit but still showed phantom candles attached was no longer lit but still showed phantom candles attached
improve hilite_status, allowing multiple stops per field, and temporarily or improve hilite_status, allowing multiple stops per field, and temporarily or
permanently hilited fields permanently hilited fields
give feedback when released from a bear trap
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
+4 -1
View File
@@ -1161,7 +1161,7 @@ trapmove(x, y, desttrap)
int x, y; /* targetted destination, <u.ux+u.dx,u.uy+u.dy> */ int x, y; /* targetted destination, <u.ux+u.dx,u.uy+u.dy> */
struct trap *desttrap; /* nonnull if another trap at <x,y> */ struct trap *desttrap; /* nonnull if another trap at <x,y> */
{ {
boolean anchored; boolean anchored = FALSE;
const char *predicament, *culprit; const char *predicament, *culprit;
char *steedname = !u.usteed ? (char *) 0 : y_monnam(u.usteed); char *steedname = !u.usteed ? (char *) 0 : y_monnam(u.usteed);
@@ -1180,6 +1180,8 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
/* [why does diagonal movement give quickest escape?] */ /* [why does diagonal movement give quickest escape?] */
if ((u.dx && u.dy) || !rn2(5)) if ((u.dx && u.dy) || !rn2(5))
u.utrap--; u.utrap--;
if (!u.utrap)
goto wriggle_free;
break; break;
case TT_PIT: case TT_PIT:
if (desttrap && desttrap->tseen if (desttrap && desttrap->tseen
@@ -1271,6 +1273,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
Norep("You are %s %s.", predicament, culprit); Norep("You are %s %s.", predicament, culprit);
} }
} else { } else {
wriggle_free:
if (u.usteed) if (u.usteed)
pline("%s finally %s free.", upstart(steedname), pline("%s finally %s free.", upstart(steedname),
!anchored ? "lurches" : "wrenches the ball"); !anchored ? "lurches" : "wrenches the ball");