#include "hack.h"
#include "mfndpos.h"
#include "artifact.h"
#include "epri.h"
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 SQSRCHRADIUS 5 |
boolean accessible | ( | int | x, |
int | y | ||
) |
References ACCESSIBLE, closed_door(), levl, and rm::typ.
Referenced by mondied(), and xkilled().
References amorphous, AMULET_CLASS, ARROW, BAG_OF_HOLDING, BAG_OF_TRICKS, BLINDFOLD, BOOMERANG, CANDY_BAR, obj::cobj, COIN_CLASS, CORPSE, obj::corpsenm, CREDIT_CARD, CRYSKNIFE, DAGGER, FALSE, FEDORA, FORTUNE_COOKIE, GEM_CLASS, invent, Is_candle, is_cloak, Is_container, is_gloves, is_shirt, LEASH, LEATHER_JACKET, LEMBAS_WAFER, LOCK_PICK, LUMP_OF_ROYAL_JELLY, MAGIC_MARKER, MAGIC_WHISTLE, mons, obj::nobj, obj::oclass, OILSKIN_SACK, obj::otyp, PANCAKE, obj::quan, RING_CLASS, SACK, SKELETON_KEY, SLING, STETHOSCOPE, TIN_OPENER, TIN_WHISTLE, TOURIST, TOWEL, TRUE, u, you::ugold, VENOM_CLASS, verysmall, WIZARD, and youmonst.
Referenced by findtravelpath(), set_apparxy(), and test_move().
boolean closed_door | ( | int | x, |
int | y | ||
) |
References D_CLOSED, D_LOCKED, doormask, IS_DOOR, levl, and rm::typ.
Referenced by accessible(), badpos(), bhit(), boomhit(), buzz(), dig(), dig_typ(), dog_move(), findtravelpath(), goodpos(), hurtle_step(), isclearpath(), kick_object(), launch_obj(), lookaround(), lookat(), m_move(), m_throw(), mdig_tunnel(), moverock(), remove_damage(), scatter(), seffects(), set_apparxy(), still_chewing(), test_move(), throw_gold(), use_offensive(), use_trap(), watch_dig(), zap_dig(), and zap_over_floor().
STATIC_OVL void distfleeck | ( | struct monst * | mtmp, |
int * | inrange, | ||
int * | nearby, | ||
int * | scared | ||
) |
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().
int dochug | ( | struct monst * | mtmp ) |
References AD_DRIN, Amonnam(), AT_WEAP, attacktype(), Blind_telepat, BOLT_LIM, BTelepat, can_teleport, cansee, canseemon, Conflict, couldsee, monst::data, DEADMONSTER, demon_talk(), dist2(), distfleeck(), distu, disturb(), FALSE, find_defensive(), find_misc(), dlevel_t::flags, fmon, Half_spell_damage, Hallucination, invent, is_covetous, is_demon, is_mind_flayer, is_pick, KILLED_BY_AN, level, losehp(), m_arrival(), m_canseeu, m_respond(), monst::mhp, mindless, permonst::mlet, mon_nam(), MON_WEP, mon_wield_item(), monkilled(), Monnam(), monnear(), mons, MS_BRIBE, MS_SHRIEK, permonst::msound, monst::mx, monst::my, NEED_HTH_WEAPON, NEED_WEAPON, newsym(), monst::nmon, pline(), PM_CTHULHU, PM_MEDUSA, PM_WATCH_CAPTAIN, PM_WATCHMAN, quest_stat_check(), quest_talk(), resist(), RING_CLASS, rloc(), rn1, rn2(), rnd(), S_LEPRECHAUN, select_rwep(), sensemon, set_apparxy(), STRAT_ARRIVE, STRAT_CLOSE, STRAT_WAITFORU, STRAT_WAITMASK, tactics(), tele_restrict(), telepathic, TINFOIL_HAT, u, uarmh, you::ugold, um_dist(), use_defensive(), use_misc(), you::ux, you::uy, W_ARMH, watch_on_duty(), which_armor(), wipe_engr_at(), yname(), and youmonst.
Referenced by dochugw(), and u_entered_shop().
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().
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 *) | |||
) |
STATIC_OVL int m_arrival | ( | struct monst * | mon ) |
References monst::mstrategy, and STRAT_ARRIVE.
Referenced by dochug().
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().
References cansee, FALSE, flags, mondied(), pline(), rnd(), flag::soundok, TRUE, flag::verbose, and wake_nearto().
Referenced by doorlock(), m_move(), and mdig_tunnel().
References monst::mhp, moves, and regenerates.
Referenced by mcalcdistress().
References canseemon, monst::data, expels(), min, Monnam(), pline(), sticks(), TRUE, u, unstuck(), you::ustuck, and youmonst.
Referenced by attack(), awaken_monsters(), bagotricks(), bhitm(), deadbook(), distfleeck(), doturn(), drinkfountain(), flash_hits_mon(), hitmu(), hmon_hitmon(), kickdmg(), known_hitum(), Mb_hit(), minliquid(), seffects(), stealarm(), stealgold(), and use_mirror().
References monst::data, FALSE, G_UNIQ, permonst::geno, IS_ALTAR, is_demon, is_lminion, is_rider, is_vampire, levl, permonst::mlet, monst::mnum, mons, MS_NEMESIS, PM_ANGEL, PM_CTHULHU, PM_MINOTAUR, PM_VLAD_THE_IMPALER, quest_info(), S_HUMAN, SCR_SCARE_MONSTER, and sobj_at().
Referenced by distfleeck(), dochugw(), dog_move(), find_defensive(), find_misc(), m_move(), mfndpos(), and monster_nearby().
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().
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().
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] |
{ AMULET_CLASS, POTION_CLASS, SCROLL_CLASS, WAND_CLASS, RING_CLASS, SPBOOK_CLASS, 0 }
NEARDATA const char practical[] = { WEAPON_CLASS, ARMOR_CLASS, GEM_CLASS, FOOD_CLASS, 0 } [static] |