Merge branch 'rock_disppear_msg' of https://github.com/argrath/NetHack into NetHack-3.7

This commit is contained in:
nhmall
2024-11-03 09:10:16 -05:00

View File

@@ -13,6 +13,7 @@ staticfn void dopush(coordxy, coordxy, coordxy, coordxy, struct obj *,
boolean); boolean);
staticfn void cannot_push_msg(struct obj *, coordxy, coordxy); staticfn void cannot_push_msg(struct obj *, coordxy, coordxy);
staticfn int cannot_push(struct obj *, coordxy, coordxy); staticfn int cannot_push(struct obj *, coordxy, coordxy);
staticfn void rock_disappear_msg(struct obj *);
staticfn void moverock_done(coordxy, coordxy); staticfn void moverock_done(coordxy, coordxy);
staticfn int moverock(void); staticfn int moverock(void);
staticfn int moverock_core(coordxy, coordxy); staticfn int moverock_core(coordxy, coordxy);
@@ -308,6 +309,18 @@ cannot_push(struct obj *otmp, coordxy sx, coordxy sy)
} }
} }
staticfn void
rock_disappear_msg(struct obj *otmp)
{
if (u.usteed)
pline("%s pushes %s and suddenly it disappears!",
YMonnam(u.usteed), the(xname(otmp)));
else
You("push %s and suddenly it disappears!",
the(xname(otmp)));
}
staticfn void staticfn void
moverock_done(coordxy sx, coordxy sy) moverock_done(coordxy sx, coordxy sy)
{ {
@@ -560,12 +573,7 @@ moverock_core(coordxy sx, coordxy sy)
} }
/*FALLTHRU*/ /*FALLTHRU*/
case TELEP_TRAP: case TELEP_TRAP:
if (u.usteed) rock_disappear_msg(otmp);
pline("%s pushes %s and suddenly it disappears!",
YMonnam(u.usteed), the(xname(otmp)));
else
You("push %s and suddenly it disappears!",
the(xname(otmp)));
otmp->next_boulder = 0; /* reset before moving it */ otmp->next_boulder = 0; /* reset before moving it */
if (ttmp->ttyp == TELEP_TRAP) { if (ttmp->ttyp == TELEP_TRAP) {
(void) rloco(otmp); (void) rloco(otmp);