MCPcopy Create free account
hub / github.com/NetHack/NetHack / u_locomotion

Function u_locomotion

src/hack.c:1816–1829  ·  view source on GitHub ↗

return an appropriate locomotion word for hero */

Source from the content-addressed store, hash-verified

1814
1815/* return an appropriate locomotion word for hero */
1816const char *
1817u_locomotion(const char *def)
1818{
1819 boolean capitalize = (*def == highc(*def));
1820
1821 /* regular locomotion() takes a monster type rather than a specific
1822 monster, so can't tell whether it is operating on hero;
1823 its is_flyer() and is_floater() tests wouldn't work on hero except
1824 when hero is polymorphed and not wearing an amulet of flying
1825 or boots/ring/spell of levitation */
1826 return Levitation ? (capitalize ? "Float" : "float")
1827 : Flying ? (capitalize ? "Fly" : "fly")
1828 : locomotion(gy.youmonst.data, def);
1829}
1830
1831/* Return a simplified floor solid/liquid state based on hero's state */
1832staticfn schar

Callers 15

dismount_steedFunction · 0.85
doteleFunction · 0.85
level_tele_trapFunction · 0.85
dodownFunction · 0.85
goto_levelFunction · 0.85
moverock_coreFunction · 0.85
swim_move_dangerFunction · 0.85
avoid_trap_andor_regionFunction · 0.85
check_special_roomFunction · 0.85
monstoneFunction · 0.85
trapeffect_pitFunction · 0.85
trapeffect_webFunction · 0.85

Calls 2

highcFunction · 0.85
locomotionFunction · 0.85

Tested by

no test coverage detected