adjacent pit movement isn't a fall
H7074 1311 > When moving from a pit into an adjacent pit, you "fall into" the pit and take > damage. This happens even when you are walking back and forth between two pits, > repeatedly, where you should have no way to fall. > > The intent seems to be that you can move into the adjacent pit without having > to climb out of the first one, and this works properly - the only problem is > that the pit gets triggered when you ought to have no distance to fall. This is really just stumbling over uncleared clutter, not a pit fall. There was already a way to clear the clutter between adjacent pits.
This commit is contained in:
@@ -540,6 +540,7 @@ wizard mode 'sanity_check' gave spurious "mon not on map" warnings when mounted
|
|||||||
at the prompt for entering a level annotation, responding with <return>
|
at the prompt for entering a level annotation, responding with <return>
|
||||||
erroneously removed old annotation; use <space><return> to do that
|
erroneously removed old annotation; use <space><return> to do that
|
||||||
reorder the #droptype menu and add some separator lines
|
reorder the #droptype menu and add some separator lines
|
||||||
|
moving from a pit to an adjacent pit with uncleared debris shouldn't be a fall
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
54
src/trap.c
54
src/trap.c
@@ -31,6 +31,8 @@ STATIC_DCL char *FDECL(trapnote, (struct trap *, BOOLEAN_P));
|
|||||||
STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *));
|
STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *));
|
||||||
#endif
|
#endif
|
||||||
STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *));
|
STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *));
|
||||||
|
STATIC_DCL boolean FDECL(adj_nonconjoined_pit, (struct trap *));
|
||||||
|
|
||||||
STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *));
|
STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *));
|
||||||
STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse, (unsigned,
|
STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse, (unsigned,
|
||||||
struct obj *,
|
struct obj *,
|
||||||
@@ -851,7 +853,8 @@ unsigned trflags;
|
|||||||
forcebungle = (trflags & FORCEBUNGLE) != 0,
|
forcebungle = (trflags & FORCEBUNGLE) != 0,
|
||||||
plunged = (trflags & TOOKPLUNGE) != 0,
|
plunged = (trflags & TOOKPLUNGE) != 0,
|
||||||
viasitting = (trflags & VIASITTING) != 0,
|
viasitting = (trflags & VIASITTING) != 0,
|
||||||
adj_pit = conjoined_pits(trap, t_at(u.ux0, u.uy0), TRUE);
|
conj_pit = conjoined_pits(trap, t_at(u.ux0, u.uy0), TRUE),
|
||||||
|
adj_pit = (adj_nonconjoined_pit(trap) && t_at(u.ux0, u.uy0));
|
||||||
int oldumort;
|
int oldumort;
|
||||||
int steed_article = ARTICLE_THE;
|
int steed_article = ARTICLE_THE;
|
||||||
|
|
||||||
@@ -879,10 +882,11 @@ unsigned trflags;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Fumbling && ttype != MAGIC_PORTAL && ttype != VIBRATING_SQUARE
|
if (!Fumbling && ttype != MAGIC_PORTAL && ttype != VIBRATING_SQUARE
|
||||||
&& ttype != ANTI_MAGIC && !forcebungle && !plunged && !adj_pit
|
&& ttype != ANTI_MAGIC && !forcebungle && !plunged
|
||||||
|
&& !conj_pit && !adj_pit
|
||||||
&& (!rn2(5) || ((ttype == PIT || ttype == SPIKED_PIT)
|
&& (!rn2(5) || ((ttype == PIT || ttype == SPIKED_PIT)
|
||||||
&& is_clinger(youmonst.data)))) {
|
&& is_clinger(youmonst.data)))) {
|
||||||
You("escape %s %s.", (ttype == ARROW_TRAP && !trap->madeby_u)
|
You("escape %s %s.", (ttype == ARROW_TRAP && !trap->madeby_u)
|
||||||
? "an"
|
? "an"
|
||||||
: a_your[trap->madeby_u],
|
: a_your[trap->madeby_u],
|
||||||
defsyms[trap_to_defsym(ttype)].explanation);
|
defsyms[trap_to_defsym(ttype)].explanation);
|
||||||
@@ -1154,8 +1158,11 @@ unsigned trflags;
|
|||||||
Sprintf(verbbuf, "lead %s",
|
Sprintf(verbbuf, "lead %s",
|
||||||
x_monnam(u.usteed, steed_article, "poor",
|
x_monnam(u.usteed, steed_article, "poor",
|
||||||
SUPPRESS_SADDLE, FALSE));
|
SUPPRESS_SADDLE, FALSE));
|
||||||
} else if (adj_pit) {
|
} else if (conj_pit) {
|
||||||
You("move into an adjacent pit.");
|
You("move into an adjacent pit.");
|
||||||
|
} else if (adj_pit) {
|
||||||
|
You("stumble over debris%s.",
|
||||||
|
!rn2(5) ? " between the pits" : "");
|
||||||
} else {
|
} else {
|
||||||
Strcpy(verbbuf,
|
Strcpy(verbbuf,
|
||||||
!plunged ? "fall" : (Flying ? "dive" : "plunge"));
|
!plunged ? "fall" : (Flying ? "dive" : "plunge"));
|
||||||
@@ -1177,33 +1184,34 @@ unsigned trflags;
|
|||||||
pline("%s %s %s!",
|
pline("%s %s %s!",
|
||||||
upstart(x_monnam(u.usteed, steed_article, "poor",
|
upstart(x_monnam(u.usteed, steed_article, "poor",
|
||||||
SUPPRESS_SADDLE, FALSE)),
|
SUPPRESS_SADDLE, FALSE)),
|
||||||
adj_pit ? "steps" : "lands", predicament);
|
conj_pit ? "steps" : "lands", predicament);
|
||||||
} else
|
} else
|
||||||
You("%s %s!", adj_pit ? "step" : "land", predicament);
|
You("%s %s!", conj_pit ? "step" : "land", predicament);
|
||||||
}
|
}
|
||||||
u.utrap = rn1(6, 2);
|
u.utrap = rn1(6, 2);
|
||||||
u.utraptype = TT_PIT;
|
u.utraptype = TT_PIT;
|
||||||
if (!steedintrap(trap, (struct obj *) 0)) {
|
if (!steedintrap(trap, (struct obj *) 0)) {
|
||||||
if (ttype == SPIKED_PIT) {
|
if (ttype == SPIKED_PIT) {
|
||||||
oldumort = u.umortality;
|
oldumort = u.umortality;
|
||||||
losehp(Maybe_Half_Phys(rnd(adj_pit ? 6 : 10)),
|
losehp(Maybe_Half_Phys(rnd((conj_pit || adj_pit) ? 6 : 10)),
|
||||||
plunged
|
plunged
|
||||||
? "deliberately plunged into a pit of iron spikes"
|
? "deliberately plunged into a pit of iron spikes"
|
||||||
: adj_pit ? "stepped into a pit of iron spikes"
|
: conj_pit ? "stepped into a pit of iron spikes"
|
||||||
|
: adj_pit ? "stumbled into a pit of iron spikes"
|
||||||
: "fell into a pit of iron spikes",
|
: "fell into a pit of iron spikes",
|
||||||
NO_KILLER_PREFIX);
|
NO_KILLER_PREFIX);
|
||||||
if (!rn2(6))
|
if (!rn2(6))
|
||||||
poisoned("spikes", A_STR,
|
poisoned("spikes", A_STR,
|
||||||
adj_pit ? "stepping on poison spikes"
|
(conj_pit || adj_pit) ? "stepping on poison spikes"
|
||||||
: "fall onto poison spikes",
|
: "fall onto poison spikes",
|
||||||
/* if damage triggered life-saving,
|
/* if damage triggered life-saving,
|
||||||
poison is limited to attrib loss */
|
poison is limited to attrib loss */
|
||||||
(u.umortality > oldumort) ? 0 : 8, FALSE);
|
(u.umortality > oldumort) ? 0 : 8, FALSE);
|
||||||
} else {
|
} else {
|
||||||
/* plunging flyers take spike damage but not pit damage */
|
/* plunging flyers take spike damage but not pit damage */
|
||||||
if (!adj_pit
|
if (!conj_pit
|
||||||
&& !(plunged && (Flying || is_clinger(youmonst.data))))
|
&& !(plunged && (Flying || is_clinger(youmonst.data))))
|
||||||
losehp(Maybe_Half_Phys(rnd(6)),
|
losehp(Maybe_Half_Phys(rnd(adj_pit ? 3 : 6)),
|
||||||
plunged ? "deliberately plunged into a pit"
|
plunged ? "deliberately plunged into a pit"
|
||||||
: "fell into a pit",
|
: "fell into a pit",
|
||||||
NO_KILLER_PREFIX);
|
NO_KILLER_PREFIX);
|
||||||
@@ -1213,7 +1221,7 @@ unsigned trflags;
|
|||||||
ballfall();
|
ballfall();
|
||||||
placebc();
|
placebc();
|
||||||
}
|
}
|
||||||
if (!adj_pit)
|
if (!conj_pit)
|
||||||
selftouch("Falling, you");
|
selftouch("Falling, you");
|
||||||
vision_full_recalc = 1; /* vision limits change */
|
vision_full_recalc = 1; /* vision limits change */
|
||||||
exercise(A_STR, FALSE);
|
exercise(A_STR, FALSE);
|
||||||
@@ -4909,6 +4917,28 @@ struct trap *trap;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean
|
||||||
|
adj_nonconjoined_pit(adjtrap)
|
||||||
|
struct trap *adjtrap;
|
||||||
|
{
|
||||||
|
int idx;
|
||||||
|
struct trap *trap_with_u = t_at(u.ux, u.uy);
|
||||||
|
|
||||||
|
if (!trap_with_u || !(adjtrap->ttyp == PIT || adjtrap->ttyp == SPIKED_PIT))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
for (idx = 0; idx < 8; idx++) {
|
||||||
|
if (xdir[idx] == u.dx && ydir[idx] == u.dy)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* idx is valid if < 8 */
|
||||||
|
if (idx < 8) {
|
||||||
|
int adjidx = (idx + 4) % 8;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* Mark all neighboring pits as conjoined pits.
|
* Mark all neighboring pits as conjoined pits.
|
||||||
|
|||||||
Reference in New Issue
Block a user