Defines | Functions | Variables

uhitm.c File Reference

#include "hack.h"
Include dependency graph for uhitm.c:

Defines

#define PROJECTILE(obj)   ((obj) && is_ammo(obj))
#define useup_eggs(o)

Functions

STATIC_DCL boolean FDECL (known_hitum,(struct monst *, int *, struct attack *))
STATIC_DCL void FDECL (steal_it,(struct monst *, struct attack *))
STATIC_DCL boolean FDECL (hitum,(struct monst *, int, struct attack *))
STATIC_DCL boolean FDECL (hmon_hitmon,(struct monst *, struct obj *, int))
STATIC_DCL void FDECL (noisy_hit,(struct monst *, struct obj *, int))
STATIC_DCL void NDECL (demonpet)
STATIC_DCL boolean FDECL (m_slips_free,(struct monst *mtmp, struct attack *mattk))
STATIC_DCL int FDECL (explum,(struct monst *, struct attack *))
STATIC_DCL void FDECL (start_engulf,(struct monst *))
STATIC_DCL void NDECL (end_engulf)
STATIC_DCL int FDECL (gulpum,(struct monst *, struct attack *))
STATIC_DCL boolean FDECL (hmonas,(struct monst *, int))
STATIC_DCL void FDECL (nohandglow,(struct monst *))
STATIC_DCL boolean FDECL (shade_aware,(struct obj *))
void hurtmarmor (struct monst *mdef, int attk)
boolean attack_checks (struct monst *mtmp, struct obj *wep)
void check_caitiff (struct monst *mtmp)
schar find_roll_to_hit (struct monst *mtmp)
boolean attack (struct monst *mtmp)
STATIC_OVL boolean known_hitum (struct monst *mon, int *mhit, struct attack *uattk)
STATIC_OVL boolean hitum (struct monst *mon, int tmp, struct attack *uattk)
boolean hmon (struct monst *mon, struct obj *obj, int thrown)
STATIC_OVL boolean hmon_hitmon (struct monst *mon, struct obj *obj, int thrown)
STATIC_OVL void noisy_hit (struct monst *mtmp, struct obj *otmp, int thrown)
STATIC_OVL boolean shade_aware (struct obj *obj)
STATIC_OVL boolean m_slips_free (struct monst *mdef, struct attack *mattk)
STATIC_OVL int joust (struct monst *mon, struct obj *obj)
STATIC_OVL void demonpet ()
STATIC_OVL void steal_it (struct monst *mdef, struct attack *mattk)
int damageum (struct monst *mdef, struct attack *mattk)
STATIC_OVL int explum (struct monst *mdef, struct attack *mattk)
STATIC_OVL void start_engulf (struct monst *mdef)
STATIC_OVL void end_engulf ()
STATIC_OVL int gulpum (struct monst *mdef, struct attack *mattk)
void missum (struct monst *mdef, struct attack *mattk)
STATIC_OVL boolean hmonas (struct monst *mon, int tmp)
int passive (struct monst *mon, boolean mhit, int malive, uchar aatyp)
void passive_obj (struct monst *mon, struct obj *obj, struct attack *mattk)
void stumble_onto_mimic (struct monst *mtmp)
STATIC_OVL void nohandglow (struct monst *mon)
int flash_hits_mon (struct monst *mtmp, struct obj *otmp)

Variables

boolean notonhead
static int dieroll
static boolean override_confirmation = FALSE

Define Documentation

#define PROJECTILE (   obj )    ((obj) && is_ammo(obj))

Referenced by hmon_hitmon().

#define useup_eggs (   o )
Value:
{ if (thrown) obfree(o,(struct obj *)0); \
                          else useupall(o); \
                          o = (struct obj *)0; }

Referenced by hmon_hitmon().


Function Documentation

boolean attack ( struct monst mtmp )
boolean attack_checks ( struct monst mtmp,
struct obj wep 
)
void check_caitiff ( struct monst mtmp )

References A_LAWFUL, adjalign(), PM_KNIGHT, align::record, Role_if, align::type, u, and you::ualign.

Referenced by find_roll_to_hit(), kickdmg(), and use_pole().

Here is the call graph for this function:

Here is the caller graph for this function:

int damageum ( struct monst mdef,
struct attack mattk 
)

References A_DEX, A_INT, A_WIS, ABASE, AD_ACID, AD_BLND, AD_COLD, AD_CONF, AD_CORR, AD_CURS, AD_DCAY, AD_DRCO, AD_DRDX, AD_DRIN, AD_DRLI, AD_DRST, AD_ELEC, AD_ENCH, AD_FIRE, AD_HEAD, AD_HEAL, AD_LEGS, AD_PHYS, AD_PLYS, AD_RUST, AD_SEDU, AD_SGLD, AD_SITM, AD_SLEE, AD_SLIM, AD_SLOW, AD_SSEX, AD_STCK, AD_STON, AD_STUN, AD_TLPT, AD_WERE, AD_WRAP, addinv(), AMAX, amorphous, amphibious, ART_DEMONBANE, AT_BITE, AT_HUGS, AT_KICK, AT_WEAP, Blind, flag::botl, BUFSZ, can_blnd(), cansee, canseemon, CONDUCT_FOODLESS, CONDUCT_VEGAN, CONDUCT_VEGETARIAN, d(), monst::data, delayed_killer, demonpet(), destroy_mitem(), dropy(), exercise(), FALSE, flags, flaming, golemeffects(), has_blood, has_head, hurtmarmor(), inv_cnt(), invent, is_demon, is_pool(), is_swimmer, is_vampiric, killed(), KILLED_BY_AN, killer_format, LEG, lesshungry(), m_slips_free(), magic_negation(), makeplural(), maybe_polyd, mbodypart(), merge_choice(), mhis, mindless, minstapetrify(), mon_adjust_speed(), mon_nam(), MON_WEP, Monnam(), mons, morehungry(), mpoisons_subj(), MSLOW, munstone(), nambuf, NECK, newcham(), night(), noncorporeal, obj_extract_self(), on_fire(), pline(), PM_BALROG, PM_CLAY_GOLEM, PM_GREEN_SLIME, PM_INCUBUS, PM_IRON_GOLEM, PM_LEATHER_GOLEM, PM_PAPER_GOLEM, PM_SHADE, PM_STRAW_GOLEM, PM_SUCCUBUS, PM_VAMPIRE, PM_WOOD_GOLEM, POTION_CLASS, Race_if, resists_acid, resists_cold, resists_drli(), resists_elec, resists_fire, resists_poison, RING_CLASS, rn1, rn2(), rnd(), S_JABBERWOCK, s_suffix(), SCROLL_CLASS, shieldeff(), showdmg(), sleep_monst(), slept_monst(), Slimed, SPBOOK_CLASS, stagger(), steal_it(), sticks(), Stone_resistance, Stoned, STRAT_WAITFORU, Strcpy, thick_skinned, touch_petrifies, TRUE, u, u_teleport_mon(), uarmf, you::ugold, you::umonnum, Unchanging, you::ustuck, uwep, you::ux, you::uy, vegan, vegetarian, flag::verbose, violated(), W_ARMH, WAND_CLASS, xkilled(), and youmonst.

Referenced by hmonas(), and kick_monster().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void demonpet (  )

References A_WIS, monst::data, exercise(), makemon(), mons, ndemon(), NO_MM_FLAGS, NON_PM, pline(), pm, rn2(), tamedog(), TRUE, align::type, u, you::ualign, you::ux, you::uy, and youmonst.

Referenced by damageum().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void end_engulf (  )

References DISP_END, Invisible, newsym(), tmp_at(), u, you::ux, and you::uy.

Referenced by gulpum().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int explum ( struct monst mdef,
struct attack mattk 
)

References AD_BLND, AD_COLD, AD_ELEC, AD_FIRE, AD_HALU, d(), golemeffects(), haseyes, is_golem, killed(), min, mon_nam(), Monnam(), pline(), resists_blnd(), resists_cold, resists_elec, resists_fire, and shieldeff().

Referenced by hmonas().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void FDECL ( steal_it  ,
(struct monst *, struct attack *)   
)
STATIC_DCL int FDECL ( explum  ,
(struct monst *, struct attack *)   
)
STATIC_DCL boolean FDECL ( hmon_hitmon  ,
(struct monst *, struct obj *, int)   
)
STATIC_DCL boolean FDECL ( known_hitum  ,
(struct monst *, int *, struct attack *)   
)
STATIC_DCL void FDECL ( start_engulf  ,
(struct monst *)   
)
STATIC_DCL void FDECL ( noisy_hit  ,
(struct monst *, struct obj *, int)   
)
STATIC_DCL int FDECL ( gulpum  ,
(struct monst *, struct attack *)   
)
STATIC_DCL boolean FDECL ( hmonas  ,
(struct monst *, int)   
)
STATIC_DCL void FDECL ( nohandglow  ,
(struct monst *)   
)
STATIC_DCL boolean FDECL ( m_slips_free  ,
(struct monst *mtmp, struct attack *mattk)   
)
STATIC_DCL boolean FDECL ( shade_aware  ,
(struct obj *)   
)
STATIC_DCL boolean FDECL ( hitum  ,
(struct monst *, int, struct attack *)   
)
schar find_roll_to_hit ( struct monst mtmp )
int flash_hits_mon ( struct monst mtmp,
struct obj otmp 
)

References AD_BLND, cansee, canseemon, canspotmon, d(), dist2(), FALSE, flags, killed(), map_invisible(), min, flag::mon_moving, mon_nam(), monflee(), monkilled(), Monnam(), mons, obj::otyp, obj::ox, obj::oy, pline(), PM_GREMLIN, resists_blnd(), rn2(), rnd(), S_LIGHT, setmangry(), obj::spe, TRUE, and WAN_LIGHT.

Referenced by bhit(), and bhitm().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int gulpum ( struct monst mdef,
struct attack mattk 
)
STATIC_OVL boolean hitum ( struct monst mon,
int  tmp,
struct attack uattk 
)

References A_DEX, AT_WEAP, exercise(), known_hitum(), passive(), rnd(), TRUE, and u.

Referenced by attack().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean hmon ( struct monst mon,
struct obj obj,
int  thrown 
)

References angry_guards(), flags, ghod_hitsu(), hmon_hitmon(), mons, noisy_hit(), PM_WATCH_CAPTAIN, PM_WATCHMAN, rn2(), and flag::soundok.

Referenced by drag_ball(), flooreffects(), known_hitum(), and thitmonst().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean hmon_hitmon ( struct monst mon,
struct obj obj,
int  thrown 
)

References A_LAWFUL, A_WIS, abuse_dog(), ACID_VENOM, adjalign(), ammo_and_launcher, An(), an(), artifact_hit(), AT_SPIT, AT_WEAP, bigmonst, bimanual, Blind, BLINDING_VENOM, BOOMERANG, BOULDER, breaktest(), BUFSZ, can_blnd(), cansee, canseemon, canspotmon, change_luck(), clone_mon(), CLOVE_OF_GARLIC, CORPSE, obj::corpsenm, CREAM_PIE, create_camera_demon(), cxname(), d(), dbon(), DEADMONSTER, destroy_arm(), dmgval(), you::dx, you::dy, EGG, ELVEN_ARROW, ELVEN_BOW, exclam(), exercise(), EXPENSIVE_CAMERA, FACE, FALSE, flags, freeinv(), GEM_CLASS, greatest_erosion, haseyes, hates_silver(), HEAVY_IRON_BALL, highc(), hit(), IRON, IRON_CHAIN, is_ammo, is_demon, is_flimsy, is_launcher, is_missile, is_poisonable, is_pole, is_undead, is_weptool, joust(), KATANA, killed(), LOW_PM, m_shot, m_useup(), makeplural(), martial_bonus, max, mbodypart(), monst::mhpmax, mhurtle(), min, minstapetrify(), MIRROR, permonst::mname, mon_nam(), MON_NOWEP, MON_WEP, monflee(), Monnam(), mons, mshot_xname(), permonst::msize, munstone(), multishot::n, NEED_WEAPON, nohandglow(), NON_PM, noncorporeal, NOTELL, multishot::o, obj::oartifact, obfree(), obj_resists(), obj_stop_timers(), objects, obj::oclass, oresist_disintegration, otense(), obj::otyp, obj::owt, P_BARE_HANDED_COMBAT, P_LANCE, P_NONE, P_SKILL, P_SKILLED, place_object(), pline(), plur, PM_BARBARIAN, PM_BLACK_PUDDING, PM_BROWN_PUDDING, PM_ELF, PM_FLOATING_EYE, PM_ROGUE, PM_SAMURAI, PM_SHADE, POTION_CLASS, potionhit(), PROJECTILE, obj::quan, Race_if, align::record, resist(), resists_acid, resists_poison, resists_ston, rn1, rn2(), rnd(), rnl(), ROCK, Role_if, s_suffix(), setmangry(), setmnotwielded(), setuwep(), sgn(), shade_aware(), shk_your(), showdmg(), SILVER, SILVER_ARROW, singular(), SPBOOK_CLASS, obj::spe, splitobj(), Sprintf, stagger(), stale_egg, STEED, Strcpy, strstri(), The(), the(), thick_skinned, obj::timed, touch_petrifies, TRUE, you::twoweap, align::type, u, you::ualign, uarm, uarmg, uarms, you::udaminc, uleft, you::ulevel, you::umconf, unweapon, Upolyd, uright, use_skill(), useup(), useup_eggs, useupall(), you::ustuck, uwep, uwep_skill_type(), uwepgone(), you::ux, you::uy, VENOM_CLASS, flag::verbose, vtense(), wakeup(), WEAPON_CLASS, weapon_dam_bonus(), weapon_type(), weight(), what, xkilled(), xname(), YA, youmonst, and YUMI.

Referenced by hmon().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean hmonas ( struct monst mon,
int  tmp 
)
void hurtmarmor ( struct monst mdef,
int  attk 
)

References AD_CORR, AD_RUST, FALSE, rn2(), rust_dmg(), TRUE, W_ARM, W_ARMC, W_ARMF, W_ARMG, W_ARMH, W_ARMS, which_armor(), and xname().

Referenced by damageum(), and mdamagem().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int joust ( struct monst mon,
struct obj obj 
)

References Fumbling, obj_resists(), P_ISRESTRICTED, P_SKILL, P_TWO_WEAPON_COMBAT, P_UNSKILLED, rn2(), rnl(), Stunned, you::twoweap, u, unsolid, uswapwep, uwep, and weapon_type().

Referenced by hmon_hitmon().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean known_hitum ( struct monst mon,
int *  mhit,
struct attack uattk 
)

References cutworm(), monst::data, you::dx, you::dy, FALSE, flags, hmon(), is_weptool, m_at, missum(), monflee(), obj::oclass, rn2(), rnd(), sticks(), TRUE, you::twoweap, u, you::uconduct, you::ustuck, uswapwep, uwep, you::ux, you::uy, flag::verbose, u_conduct::weaphit, WEAPON_CLASS, and youmonst.

Referenced by hitum(), and hmonas().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean m_slips_free ( struct monst mdef,
struct attack mattk 
)

References AD_DRIN, AD_WRAP, attack::adtyp, cloak_simple_name(), FALSE, mon_nam(), objects, OILSKIN_CLOAK, obj::otyp, rn2(), s_suffix(), TRUE, W_ARM, W_ARMC, W_ARMH, which_armor(), and xname().

Referenced by damageum().

Here is the call graph for this function:

Here is the caller graph for this function:

void missum ( struct monst mdef,
struct attack mattk 
)

References canspotmon, could_seduce(), flags, mon_nam(), flag::verbose, wakeup(), and youmonst.

Referenced by hmonas(), kick_monster(), and known_hitum().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void NDECL ( end_engulf   )
STATIC_DCL void NDECL ( demonpet   )
STATIC_OVL void nohandglow ( struct monst mon )

References Blind, body_part(), HAND, hcolor(), makeplural(), NH_RED, u, and you::umconf.

Referenced by hmon_hitmon().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void noisy_hit ( struct monst mtmp,
struct obj otmp,
int  thrown 
)

References ammo_and_launcher, ART_MJOLLNIR, BULLWHIP, DART, dist2(), fmon, monst::mx, monst::my, monst::nmon, obj::oartifact, objects, obj::oclass, obj::otyp, P_KNIFE, P_NONE, PM_ROGUE, rn2(), Role_if, SHURIKEN, Stealth, uwep, and WEAPON_CLASS.

Referenced by hmon().

Here is the call graph for this function:

Here is the caller graph for this function:

int passive ( struct monst mon,
boolean  mhit,
int  malive,
uchar  aatyp 
)
void passive_obj ( struct monst mon,
struct obj obj,
struct attack mattk 
)

References attack::aatyp, AD_ACID, AD_CORR, AD_ENCH, AD_RUST, attack::adtyp, aobjnam(), ARMOR_CLASS, AT_NONE, carried, drain_item(), erode_obj(), FALSE, permonst::mattk, NATTK, rn2(), TRUE, you::twoweap, u, uarmg, update_inventory, uswapwep, and uwep.

Referenced by drop_throw(), passive(), and thitmonst().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean shade_aware ( struct obj obj )

References BOULDER, CLOVE_OF_GARLIC, FALSE, HEAVY_IRON_BALL, IRON_CHAIN, MIRROR, objects, SILVER, and TRUE.

Referenced by hmon_hitmon().

Here is the caller graph for this function:

STATIC_OVL void start_engulf ( struct monst mdef )

References delay_output, DISP_ALWAYS, Invisible, map_location(), mon_nam(), mon_to_glyph, tmp_at(), TRUE, u, you::ux, you::uy, and youmonst.

Referenced by gulpum().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void steal_it ( struct monst mdef,
struct attack mattk 
)
void stumble_onto_mimic ( struct monst mtmp )

References a_monnam(), AD_STCK, Blind, Blind_telepat, dmgtype(), you::dx, you::dy, glyph_is_cmap, glyph_is_object, glyph_to_cmap, glyph_to_obj, GOLD_PIECE, levl, M_AP_MONSTER, pline(), S_hcdoor, S_vcdoor, See_invisible, u, you::ustuck, you::ux, you::uy, wakeup(), and what.

Referenced by attack_checks(), doclose(), domove(), untrap(), and use_whip().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int dieroll [static]
boolean override_confirmation = FALSE [static]