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

Function stucksteed

src/steed.c:877–895  ·  view source on GitHub ↗

decide whether hero's steed is able to move; doesn't check for holding traps--those affect the hero directly */

Source from the content-addressed store, hash-verified

875/* decide whether hero's steed is able to move;
876 doesn't check for holding traps--those affect the hero directly */
877boolean
878stucksteed(boolean checkfeeding)
879{
880 struct monst *steed = u.usteed;
881
882 if (steed) {
883 /* check whether steed can move */
884 if (helpless(steed)) {
885 pline("%s won't move!", YMonnam(steed));
886 return TRUE;
887 }
888 /* optionally check whether steed is in the midst of a meal */
889 if (checkfeeding && steed->meating) {
890 pline("%s is still eating.", YMonnam(steed));
891 return TRUE;
892 }
893 }
894 return FALSE;
895}
896
897void
898place_monster(struct monst *mon, coordxy x, coordxy y)

Callers 4

dodownFunction · 0.85
doupFunction · 0.85
domove_coreFunction · 0.85
jumpFunction · 0.85

Calls 2

YMonnamFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected