boulder pushing feedback
Redo the details about giving or suppressing "with great effort you push the boulder". It works the same except that if push a different boulder than previously, you'll get a new message. If you do it while riding, you have the same lack-of-message for successive pushes instead of getting a message every turn. Don't exercise strength when pushing a boulder if poly'd into a giant.
This commit is contained in:
@@ -129,9 +129,9 @@ struct achievement_tracking {
|
|||||||
struct context_info {
|
struct context_info {
|
||||||
unsigned ident; /* social security number for each monster */
|
unsigned ident; /* social security number for each monster */
|
||||||
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
|
unsigned no_of_wizards; /* 0, 1 or 2 (wizard and his shadow) */
|
||||||
unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc) */
|
unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc),
|
||||||
/* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */
|
* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF-,
|
||||||
/* 8: travel */
|
* 8: travel */
|
||||||
unsigned startingpet_mid; /* monster id number for initial pet */
|
unsigned startingpet_mid; /* monster id number for initial pet */
|
||||||
int current_fruit; /* fruit->fid corresponding to gp.pl_fruit[] */
|
int current_fruit; /* fruit->fid corresponding to gp.pl_fruit[] */
|
||||||
int mysteryforce; /* adjusts how often "mysterious force" kicks in */
|
int mysteryforce; /* adjusts how often "mysterious force" kicks in */
|
||||||
|
|||||||
@@ -777,6 +777,11 @@ struct instance_globals_b {
|
|||||||
/* files.c */
|
/* files.c */
|
||||||
char bones[BONESSIZE];
|
char bones[BONESSIZE];
|
||||||
|
|
||||||
|
/* hack.c */
|
||||||
|
unsigned bldrpush_oid; /* id of last boulder pushed */
|
||||||
|
long bldrpushtime; /* turn that a message was given for pushing
|
||||||
|
* a boulder; used in lieu of Norep() */
|
||||||
|
|
||||||
/* mkmaze.c */
|
/* mkmaze.c */
|
||||||
lev_region bughack; /* for preserving the insect legs when wallifying
|
lev_region bughack; /* for preserving the insect legs when wallifying
|
||||||
* baalz level */
|
* baalz level */
|
||||||
|
|||||||
@@ -232,6 +232,9 @@ const struct instance_globals_b g_init_b = {
|
|||||||
UNDEFINED_PTR, /* branches */
|
UNDEFINED_PTR, /* branches */
|
||||||
/* files.c */
|
/* files.c */
|
||||||
BONESINIT, /* bones */
|
BONESINIT, /* bones */
|
||||||
|
/* hack.c */
|
||||||
|
0U, /* bldrpush_oid - last boulder pushed */
|
||||||
|
0L, /* bldrpushtime - turn message was given about pushing that boulder */
|
||||||
/* mkmaze.c */
|
/* mkmaze.c */
|
||||||
{ {COLNO, ROWNO, 0, 0}, {COLNO, ROWNO, 0, 0},
|
{ {COLNO, ROWNO, 0, 0}, {COLNO, ROWNO, 0, 0},
|
||||||
FALSE, FALSE, 0, 0, { 0 } }, /* bughack */
|
FALSE, FALSE, 0, 0, { 0 } }, /* bughack */
|
||||||
|
|||||||
37
src/hack.c
37
src/hack.c
@@ -414,22 +414,33 @@ moverock(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
/* note: reset to zero after save/restore cycle */
|
boolean givemesg, easypush;
|
||||||
static NEARDATA long lastmovetime;
|
|
||||||
dopush:
|
dopush:
|
||||||
what = the(xname(otmp));
|
/* give boulder pushing feedback if this is a different
|
||||||
|
boulder than the last one pushed or if it's been at
|
||||||
|
least 2 turns since we last pushed this boulder;
|
||||||
|
unlike with Norep(), intervening messages don't cause
|
||||||
|
it to repeat, only doing something else in the meantime */
|
||||||
|
if (otmp->o_id != gb.bldrpush_oid) {
|
||||||
|
gb.bldrpushtime = gm.moves + 1L;
|
||||||
|
gb.bldrpush_oid = otmp->o_id;
|
||||||
|
}
|
||||||
|
givemesg = (gm.moves > gb.bldrpushtime + 2L
|
||||||
|
|| gm.moves < gb.bldrpushtime);
|
||||||
|
what = givemesg ? the(xname(otmp)) : 0;
|
||||||
if (!u.usteed) {
|
if (!u.usteed) {
|
||||||
/* FIXME: also remember boulder->o_id and override
|
easypush = throws_rocks(gy.youmonst.data);
|
||||||
lastmovetime if this is a different boulder */
|
if (givemesg)
|
||||||
if (gm.moves > lastmovetime + 2 || gm.moves < lastmovetime)
|
|
||||||
pline("With %s effort you move %s.",
|
pline("With %s effort you move %s.",
|
||||||
throws_rocks(gy.youmonst.data) ? "little"
|
easypush ? "little" : "great", what);
|
||||||
: "great",
|
if (!easypush)
|
||||||
what);
|
exercise(A_STR, TRUE);
|
||||||
exercise(A_STR, TRUE);
|
} else {
|
||||||
} else
|
if (givemesg)
|
||||||
pline("%s moves %s.", upstart(y_monnam(u.usteed)), what);
|
pline("%s moves %s.",
|
||||||
lastmovetime = gm.moves;
|
upstart(y_monnam(u.usteed)), what);
|
||||||
|
}
|
||||||
|
gb.bldrpushtime = gm.moves;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Move the boulder *after* the message. */
|
/* Move the boulder *after* the message. */
|
||||||
|
|||||||
Reference in New Issue
Block a user