Use proper locomotion when avoiding water or lava
This commit is contained in:
@@ -915,6 +915,7 @@ extern boolean test_move(int, int, int, int, int);
|
|||||||
extern int wiz_debug_cmd_traveldisplay(void);
|
extern int wiz_debug_cmd_traveldisplay(void);
|
||||||
#endif
|
#endif
|
||||||
extern boolean u_rooted(void);
|
extern boolean u_rooted(void);
|
||||||
|
extern const char *u_locomotion(const char *);
|
||||||
extern void domove(void);
|
extern void domove(void);
|
||||||
extern void runmode_delay_output(void);
|
extern void runmode_delay_output(void);
|
||||||
extern void overexert_hp(void);
|
extern void overexert_hp(void);
|
||||||
|
|||||||
+10
-1
@@ -1520,6 +1520,14 @@ check_buried_zombies(xchar x, xchar y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
u_locomotion(const char *def)
|
||||||
|
{
|
||||||
|
return Levitation ? "levitate"
|
||||||
|
: Flying ? "fly"
|
||||||
|
: locomotion(g.youmonst.data, def);
|
||||||
|
}
|
||||||
|
|
||||||
/* Is it dangerous for hero to move to x,y due to water or lava? */
|
/* Is it dangerous for hero to move to x,y due to water or lava? */
|
||||||
static boolean
|
static boolean
|
||||||
swim_move_danger(xchar x, xchar y)
|
swim_move_danger(xchar x, xchar y)
|
||||||
@@ -1546,7 +1554,8 @@ swim_move_danger(xchar x, xchar y)
|
|||||||
g.context.swim_tip = TRUE;
|
g.context.swim_tip = TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else if (ParanoidSwim) {
|
} else if (ParanoidSwim) {
|
||||||
You("avoid stepping into the %s.",
|
You("avoid %s into the %s.",
|
||||||
|
ing_suffix(u_locomotion("step")),
|
||||||
waterbody_name(x, y));
|
waterbody_name(x, y));
|
||||||
if (!g.context.swim_tip) {
|
if (!g.context.swim_tip) {
|
||||||
pline("(Use '%s' prefix to step in if you really want to.)",
|
pline("(Use '%s' prefix to step in if you really want to.)",
|
||||||
|
|||||||
+3
-1
@@ -349,7 +349,9 @@ ing_suffix(const char *s)
|
|||||||
Strcpy(onoff, p);
|
Strcpy(onoff, p);
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
if (p >= &buf[3] && !index(vowel, *(p - 1))
|
if (p >= &buf[2] && !strcmpi(p - 2, "er")) { /* slither + ing */
|
||||||
|
/* nothing here */
|
||||||
|
} else if (p >= &buf[3] && !index(vowel, *(p - 1))
|
||||||
&& index(vowel, *(p - 2)) && !index(vowel, *(p - 3))) {
|
&& index(vowel, *(p - 2)) && !index(vowel, *(p - 3))) {
|
||||||
/* tip -> tipp + ing */
|
/* tip -> tipp + ing */
|
||||||
*p = *(p - 1);
|
*p = *(p - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user