Defines | Functions | Variables

monmove.c File Reference

#include "hack.h"
#include "mfndpos.h"
#include "artifact.h"
#include "epri.h"
Include dependency graph for monmove.c:

Defines

#define SQSRCHRADIUS   5

Functions

STATIC_DCL int FDECL (disturb,(struct monst *))
STATIC_DCL void FDECL (distfleeck,(struct monst *, int *, int *, int *))
STATIC_DCL int FDECL (m_arrival,(struct monst *))
STATIC_DCL void FDECL (watch_on_duty,(struct monst *))
boolean mb_trapped (struct monst *mtmp)
STATIC_OVL void watch_on_duty (struct monst *mtmp)
int dochugw (struct monst *mtmp)
boolean onscary (int x, int y, struct monst *mtmp)
void mon_regen (struct monst *mon, boolean digest_meal)
STATIC_OVL int disturb (struct monst *mtmp)
void monflee (struct monst *mtmp, int fleetime, boolean first, boolean fleemsg)
STATIC_OVL void distfleeck (struct monst *mtmp, int *inrange, int *nearby, int *scared)
STATIC_OVL int m_arrival (struct monst *mon)
int dochug (struct monst *mtmp)
boolean itsstuck (struct monst *mtmp)
int m_move (struct monst *mtmp, int after)
boolean closed_door (int x, int y)
boolean accessible (int x, int y)
void set_apparxy (struct monst *mtmp)
boolean can_ooze (struct monst *mtmp)

Variables

boolean notonhead
static NEARDATA const char practical [] = { WEAPON_CLASS, ARMOR_CLASS, GEM_CLASS, FOOD_CLASS, 0 }
static NEARDATA const char magical []
static NEARDATA const char indigestion [] = { BALL_CLASS, ROCK_CLASS, 0 }
static NEARDATA const char boulder_class [] = { ROCK_CLASS, 0 }
static NEARDATA const char gem_class [] = { GEM_CLASS, 0 }

Define Documentation

#define SQSRCHRADIUS   5

Function Documentation

boolean accessible ( int  x,
int  y 
)

References ACCESSIBLE, closed_door(), levl, and rm::typ.

Referenced by mondied(), and xkilled().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean can_ooze ( struct monst mtmp )
boolean closed_door ( int  x,
int  y 
)
STATIC_OVL void distfleeck ( struct monst mtmp,
int *  inrange,
int *  nearby,
int *  scared 
)

References BOLT_LIM, dist2(), in_your_sanctuary(), Invis, monflee(), monnear(), onscary(), perceives, rn2(), rnd(), TRUE, u, you::ux, and you::uy.

Referenced by dochug().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int disturb ( struct monst mtmp )

References Aggravate_monster, couldsee, distu, M_AP_FURNITURE, M_AP_OBJECT, permonst::mlet, mons, PM_ETTIN, PM_JABBERWOCK, PM_VORPAL_JABBERWOCK, rn2(), S_DOG, S_HUMAN, S_LEPRECHAUN, S_NYMPH, and Stealth.

Referenced by dochug().

Here is the call graph for this function:

Here is the caller graph for this function:

int dochug ( struct monst mtmp )
int dochugw ( struct monst mtmp )

References BOLT_LIM, canseemon, canspotmon, Confusion, couldsee, distu, dochug(), Hallucination, monst::mx, noattacks(), onscary(), sensemon, spec_ability(), spec_dbon(), SPFX_WARN, stop_occupation(), u, uwep, you::ux, you::uy, and Warning.

Referenced by movemon().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void FDECL ( watch_on_duty  ,
(struct monst *)   
)
STATIC_DCL void FDECL ( distfleeck  ,
(struct monst *, int *, int *, int *)   
)
STATIC_DCL int FDECL ( disturb  ,
(struct monst *)   
)
STATIC_DCL int FDECL ( m_arrival  ,
(struct monst *)   
)
boolean itsstuck ( struct monst mtmp )

References monst::data, FALSE, Monnam(), pline(), sticks(), TRUE, u, you::ustuck, and youmonst.

Referenced by fightm(), and m_move().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int m_arrival ( struct monst mon )

References monst::mstrategy, and STRAT_ARRIVE.

Referenced by dochug().

Here is the caller graph for this function:

int m_move ( struct monst mtmp,
int  after 
)

References ACURRSTR, add_damage(), after_shk_move(), ALLOW_BARS, ALLOW_DIG, ALLOW_M, ALLOW_ROCK, ALLOW_SANCT, ALLOW_SSM, ALLOW_U, ALLOW_WALL, amorphous, amphibious, BOULDER, BUSTDOOR, can_carry(), can_track(), cansee, canseemon, closed_door(), COIN_CLASS, COLNO, Conflict, CORPSE, obj::corpsenm, couldsee, curr_mon_load(), D_BROKEN, D_CLOSED, D_ISOPEN, D_LOCKED, D_NODOOR, D_TRAPPED, monst::data, dist2(), distmin(), dog_move(), FALSE, dlevel_t::flags, flags, fobj, g_at(), gd_move(), GEM_CLASS, GEMSTONE, gettrack(), GOLD_PIECE, gx, gy, hides_under, if(), in_line, in_rooms(), In_sokoban, index, invent, Invis, IRONBARS, is_animal, is_axe, is_covetous, IS_DOOR, is_giant, is_human, is_mercenary, is_minion, is_pick, is_pool(), is_rider, IS_ROCK, Is_rogue_level, Is_sokoprize, is_swimmer, IS_TREE, is_undead, is_unicorn, Is_waterlevel, itsstuck(), level, levl, likes_gems, likes_gold, likes_magic, likes_objs, lined_up(), locomotion(), M_AP_OBJECT, monst::m_ap_type, m_at, m_carrying(), m_in_out_region(), makeplural(), monst::mappearance, mattackm(), max, max_mon_load(), may_dig(), mb_trapped(), mdig_tunnel(), meatmetal(), meatobj(), metallivorous, mfndpos(), min, mindless, MINERAL, mintrap(), permonst::mlet, MM_AGR_DIED, MM_DEF_DIED, MM_HIT, permonst::mmove, mnexto(), MON_WEP, mon_wield_item(), mongone(), Monnam(), mons, monsndx(), monst::movement, mpickgold(), mpickstuff(), MTSZ, monst::mx, monst::my, NEED_AXE, NEED_PICK_AXE, NEED_PICK_OR_AXE, needspick, newsym(), obj::nobj, NOGARLIC, nohands, NORMAL_SPEED, notonhead, NOTONL, OBJ_AT, objects, obj::oclass, onscary(), OPENDOOR, otmp, obj::otyp, obj::ox, obj::oy, passes_bars(), passes_walls, perceives, pline(), PM_FOG_CLOUD, PM_GELATINOUS_CUBE, PM_LEPRECHAUN, PM_MAIL_DAEMON, PM_MINOTAUR, PM_STALKER, PM_TENGU, PM_YELLOW_LIGHT, pri_move(), obj::quan, REINCARNATION, remove_monster(), resist(), RING_CLASS, rloc(), rn2(), ROCK, ROWNO, S_BAT, S_EEL, S_GHOST, S_LIGHT, S_NYMPH, searches_for_item(), see_wsegs(), set_apparxy(), shk_move(), SHOPBASE, SKELETON_KEY, sobj_at(), flag::soundok, SQSRCHRADIUS, STRANGE_OBJECT, STRAT_GOALX, STRAT_GOALY, swallowed(), tele_restrict(), throws_rocks, touch_artifact(), touch_petrifies, TRUE, tunnels, u, you::ugold, unblock_point(), UNLOCKDOOR, you::ustuck, you::ux, you::ux0, you::uy, you::uy0, you::uz, flag::verbose, verysmall, worm_move(), worm_nomove(), nhcoord::x, nhcoord::y, and youmonst.

Referenced by attack().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean mb_trapped ( struct monst mtmp )

References cansee, FALSE, flags, mondied(), pline(), rnd(), flag::soundok, TRUE, flag::verbose, and wake_nearto().

Referenced by doorlock(), m_move(), and mdig_tunnel().

Here is the call graph for this function:

Here is the caller graph for this function:

void mon_regen ( struct monst mon,
boolean  digest_meal 
)

References monst::mhp, moves, and regenerates.

Referenced by mcalcdistress().

Here is the caller graph for this function:

void monflee ( struct monst mtmp,
int  fleetime,
boolean  first,
boolean  fleemsg 
)
boolean onscary ( int  x,
int  y,
struct monst mtmp 
)
void set_apparxy ( struct monst mtmp )

References ACCESSIBLE, can_ooze(), closed_door(), couldsee, Displaced, you::dx, you::dy, FALSE, invent, Invis, isok(), levl, mons, monst::mux, passes_walls, perceives, PM_XORN, rn2(), rm::typ, u, you::ugold, Underwater, you::ustuck, you::ux, and you::uy.

Referenced by dochug(), dog_move(), kickdmg(), m_move(), makemon(), mattacku(), mhurtle_step(), and rloc_to().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void watch_on_duty ( struct monst mtmp )

References Amonnam(), angry_guards(), couldsee, D_LOCKED, D_WARNED, digging, doormask, you::dx, you::dy, FALSE, flags, in_town(), is_digging(), IS_DOOR, levl, looted, m_canseeu, picking_lock(), pline(), dig_info::pos, rn2(), flag::soundok, stop_occupation(), u, you::ux, you::uy, watch_dig(), nhcoord::x, and nhcoord::y.

Referenced by dochug().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

NEARDATA const char boulder_class[] = { ROCK_CLASS, 0 } [static]
NEARDATA const char gem_class[] = { GEM_CLASS, 0 } [static]
NEARDATA const char indigestion[] = { BALL_CLASS, ROCK_CLASS, 0 } [static]
NEARDATA const char magical[] [static]
NEARDATA const char practical[] = { WEAPON_CLASS, ARMOR_CLASS, GEM_CLASS, FOOD_CLASS, 0 } [static]