Merge branch 'ice_fumbling' of https://github.com/entrez/NetHack into NetHack-3.7
This commit is contained in:
@@ -2142,12 +2142,13 @@ static void
|
|||||||
slippery_ice_fumbling(void)
|
slippery_ice_fumbling(void)
|
||||||
{
|
{
|
||||||
boolean on_ice = !Levitation && is_ice(u.ux, u.uy);
|
boolean on_ice = !Levitation && is_ice(u.ux, u.uy);
|
||||||
|
struct monst *iceskater = u.usteed ? u.usteed : &gy.youmonst;
|
||||||
|
|
||||||
if (on_ice) {
|
if (on_ice) {
|
||||||
if ((uarmf && objdescr_is(uarmf, "snow boots"))
|
if ((uarmf && objdescr_is(uarmf, "snow boots"))
|
||||||
|| resists_cold(&gy.youmonst) || Flying
|
|| resists_cold(iceskater) || Flying
|
||||||
|| is_floater(gy.youmonst.data) || is_clinger(gy.youmonst.data)
|
|| is_floater(iceskater->data) || is_clinger(iceskater->data)
|
||||||
|| is_whirly(gy.youmonst.data)) {
|
|| is_whirly(iceskater->data)) {
|
||||||
on_ice = FALSE;
|
on_ice = FALSE;
|
||||||
} else if (!rn2(Cold_resistance ? 3 : 2)) {
|
} else if (!rn2(Cold_resistance ? 3 : 2)) {
|
||||||
HFumbling |= FROMOUTSIDE;
|
HFumbling |= FROMOUTSIDE;
|
||||||
|
|||||||
@@ -415,9 +415,9 @@ do_earthquake(int force)
|
|||||||
selftouch("Falling, you");
|
selftouch("Falling, you");
|
||||||
} else if (u.utrap && u.utraptype == TT_PIT) {
|
} else if (u.utrap && u.utraptype == TT_PIT) {
|
||||||
boolean keepfooting =
|
boolean keepfooting =
|
||||||
((Fumbling && !rn2(5))
|
(!(Fumbling && rn2(5))
|
||||||
|| (!rnl(Role_if(PM_ARCHEOLOGIST) ? 3 : 9))
|
&& (!(rnl(Role_if(PM_ARCHEOLOGIST) ? 3 : 9))
|
||||||
|| ((ACURR(A_DEX) > 7) && rn2(5)));
|
|| ((ACURR(A_DEX) > 7) && rn2(5))));
|
||||||
|
|
||||||
You("are jostled around violently!");
|
You("are jostled around violently!");
|
||||||
set_utrap(rn1(6, 2), TT_PIT);
|
set_utrap(rn1(6, 2), TT_PIT);
|
||||||
|
|||||||
@@ -1175,14 +1175,23 @@ slip_or_trip(void)
|
|||||||
an(mons[otmp->corpsenm].pmnames[NEUTRAL]));
|
an(mons[otmp->corpsenm].pmnames[NEUTRAL]));
|
||||||
instapetrify(gk.killer.name);
|
instapetrify(gk.killer.name);
|
||||||
}
|
}
|
||||||
} else if (rn2(3) && is_ice(u.ux, u.uy)) {
|
} else if ((HFumbling & FROMOUTSIDE) || (is_ice(u.ux, u.uy) && !rn2(3))) {
|
||||||
|
/* is fumbling from ice alone? */
|
||||||
|
boolean ice_only = !(EFumbling || (HFumbling & ~FROMOUTSIDE));
|
||||||
|
|
||||||
pline("%s %s%s on the ice.",
|
pline("%s %s%s on the ice.",
|
||||||
u.usteed ? upstart(x_monnam(u.usteed,
|
u.usteed ? upstart(x_monnam(u.usteed, ARTICLE_THE, (char *) 0,
|
||||||
(has_mgivenname(u.usteed)) ? ARTICLE_NONE
|
SUPPRESS_SADDLE, FALSE))
|
||||||
: ARTICLE_THE,
|
|
||||||
(char *) 0, SUPPRESS_SADDLE, FALSE))
|
|
||||||
: "You",
|
: "You",
|
||||||
rn2(2) ? "slip" : "slide", on_foot ? "" : "s");
|
rn2(2) ? "slip" : "slide", on_foot ? "" : "s");
|
||||||
|
/* fumbling outside of ice while mounted always causes the hero to
|
||||||
|
fall from the saddle, so to avoid a counterintuitive effect where
|
||||||
|
ice makes riding _less_ hazardous, unconditionally dismount if
|
||||||
|
fumbling is from a non-ice source */
|
||||||
|
if (!on_foot && (!ice_only || !rn2(3))) {
|
||||||
|
You("lose your balance.");
|
||||||
|
dismount_steed(DISMOUNT_FELL);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (on_foot) {
|
if (on_foot) {
|
||||||
switch (rn2(4)) {
|
switch (rn2(4)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user