Defines | Functions | Variables

zap.c File Reference

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

Defines

#define MAGIC_COOKIE   1000
#define ZT_MAGIC_MISSILE   (AD_MAGM-1)
#define ZT_FIRE   (AD_FIRE-1)
#define ZT_COLD   (AD_COLD-1)
#define ZT_SLEEP   (AD_SLEE-1)
#define ZT_DEATH   (AD_DISN-1)
#define ZT_LIGHTNING   (AD_ELEC-1)
#define ZT_POISON_GAS   (AD_DRST-1)
#define ZT_ACID   (AD_ACID-1)
#define ZT_WAND(x)   (x)
#define ZT_SPELL(x)   (10+(x))
#define ZT_BREATH(x)   (20+(x))
#define is_hero_spell(type)   ((type) >= 10 && (type) < 20)
#define USES_CORPSENM(typ)   ((typ)==CORPSE || (typ)==STATUE || (typ)==FIGURINE)
#define oresist_disintegration(obj)

Functions

STATIC_DCL void FDECL (costly_cancel,(struct obj *))
STATIC_DCL void FDECL (polyuse,(struct obj *, int, int))
STATIC_DCL void FDECL (create_polymon,(struct obj *, int))
STATIC_DCL boolean FDECL (zap_updown,(struct obj *))
STATIC_DCL int FDECL (zhitm,(struct monst *, int, int, struct obj **))
STATIC_DCL void FDECL (zhitu,(int, int, const char *, XCHAR_P, XCHAR_P))
STATIC_DCL void FDECL (revive_egg,(struct obj *))
STATIC_DCL int FDECL (zap_hit,(int, int))
STATIC_DCL void FDECL (backfire,(struct obj *))
STATIC_DCL int FDECL (spell_hit_bonus,(int))
int bhitm (struct monst *mtmp, struct obj *otmp)
void probe_monster (struct monst *mtmp)
boolean get_obj_location (struct obj *obj, xchar *xp, xchar *yp, int locflags)
boolean get_mon_location (struct monst *mon, xchar *xp, xchar *yp, int locflags)
struct monstmontraits (struct obj *obj, coord *cc)
struct monstget_container_location (struct obj *obj, int *loc, int *container_nesting)
struct monstrevive (struct obj *obj)
STATIC_OVL void revive_egg (struct obj *obj)
int unturn_dead (struct monst *mon)
STATIC_OVL void costly_cancel (struct obj *obj)
boolean cancellable (struct obj *obj)
void cancel_item (struct obj *obj)
boolean drain_item (struct obj *obj)
boolean obj_resists (struct obj *obj, int ochance, int achance)
boolean obj_shudders (struct obj *obj)
STATIC_OVL void polyuse (struct obj *objhdr, int mat, int minwt)
STATIC_OVL void create_polymon (struct obj *obj, int okind)
void do_osshock (struct obj *obj)
struct objpoly_obj (struct obj *obj, int id)
int bhito (struct obj *obj, struct obj *otmp)
int bhitpile (struct obj *obj, fhito, int tx, int ty)
int zappable (struct obj *wand)
void zapnodir (struct obj *obj)
STATIC_OVL void backfire (struct obj *otmp)
int dozap ()
int zapyourself (struct obj *obj, boolean ordinary)
boolean cancel_monst (struct monst *mdef, struct obj *obj, boolean youattack, boolean allow_cancel_kill, boolean self_cancel)
STATIC_OVL boolean zap_updown (struct obj *obj)
void weffects (struct obj *obj)
int spell_damage_bonus ()
STATIC_OVL int spell_hit_bonus (int skill)
const char * exclam (int force)
void hit (const char *str, struct monst *mtmp, const char *force)
void miss (const char *str, struct monst *mtmp)
struct monstbhit (int ddx, int ddy, int range, int weapon, fhitm, fhito, struct obj *obj, boolean *obj_destroyed)
struct monstboomhit (int dx, int dy)
STATIC_OVL int zhitm (struct monst *mon, int type, int nd, struct obj **ootmp)
STATIC_OVL void zhitu (int type, int nd, const char *fltxt, xchar sx, xchar sy)
int burn_floor_paper (int x, int y, boolean give_feedback, boolean u_caused)
STATIC_OVL int zap_hit (int ac, int type)
void buzz (int type, int nd, xchar sx, xchar sy, int dx, int dy)
void melt_ice (xchar x, xchar y)
int zap_over_floor (xchar x, xchar y, int type, boolean *shopdamage)
void fracture_rock (struct obj *obj)
boolean break_statue (struct obj *obj)
void destroy_item (int osym, int dmgtyp)
int destroy_mitem (struct monst *mtmp, int osym, int dmgtyp)
int resist (struct monst *mtmp, char oclass, int damage, int tell)
void makewish (boolean magical)

Variables

static NEARDATA boolean obj_zapped
static NEARDATA int poly_zapped
boolean notonhead
boolean m_using
STATIC_VAR const char are_blinded_by_the_flash [] = "are blinded by the flash!"
const char *const flash_types []
static const char charged_objs [] = { WAND_CLASS, WEAPON_CLASS, ARMOR_CLASS, 0 }
static NEARDATA const char zap_syms [] = { WAND_CLASS, 0 }
const char *const destroy_strings []

Define Documentation

#define is_hero_spell (   type )    ((type) >= 10 && (type) < 20)

Referenced by buzz(), and zhitm().

#define MAGIC_COOKIE   1000

Referenced by buzz(), and zhitm().

#define oresist_disintegration (   obj )
#define USES_CORPSENM (   typ )    ((typ)==CORPSE || (typ)==STATUE || (typ)==FIGURINE)

Referenced by poly_obj().

#define ZT_ACID   (AD_ACID-1)

Referenced by zhitm(), and zhitu().

#define ZT_BREATH (   x )    (20+(x))

Referenced by buzz(), zap_over_floor(), zhitm(), and zhitu().

#define ZT_COLD   (AD_COLD-1)

Referenced by buzz(), zap_over_floor(), zhitm(), and zhitu().

#define ZT_DEATH   (AD_DISN-1)

Referenced by buzz(), zap_over_floor(), zhitm(), and zhitu().

#define ZT_FIRE   (AD_FIRE-1)

Referenced by buzz(), zap_over_floor(), zhitm(), and zhitu().

#define ZT_LIGHTNING   (AD_ELEC-1)

Referenced by buzz(), zap_over_floor(), zhitm(), and zhitu().

#define ZT_MAGIC_MISSILE   (AD_MAGM-1)

Referenced by zhitm(), and zhitu().

#define ZT_POISON_GAS   (AD_DRST-1)

Referenced by zhitm(), and zhitu().

#define ZT_SLEEP   (AD_SLEE-1)

Referenced by zhitm(), and zhitu().

#define ZT_SPELL (   x )    (10+(x))

Referenced by buzz(), zap_over_floor(), and zhitm().

#define ZT_WAND (   x )    (x)

Referenced by zhitm().


Function Documentation

STATIC_OVL void backfire ( struct obj otmp )

References d(), KILLED_BY_AN, losehp(), pline(), The(), TRUE, useup(), and xname().

Referenced by dozap().

Here is the call graph for this function:

Here is the caller graph for this function:

struct monst* bhit ( int  ddx,
int  ddy,
int  range,
int  weapon,
fhitm  ,
fhito  ,
struct obj obj,
boolean obj_destroyed 
) [read]

Called for the following distance effects: when a weapon is thrown (weapon == THROWN_WEAPON) when an object is kicked (KICKED_WEAPON) when an IMMEDIATE wand is zapped (ZAPPED_WAND) when a light beam is flashed (FLASHED_LIGHT) when a mirror is applied (INVIS_BEAM) A thrown/kicked object falls down at the end of its range or when a monster is hit. The variable 'bhitpos' is set to the final position of the weapon thrown/zapped. The ray of a wand may affect (by calling a provided function) several objects and monsters on its path. The return value is the monster hit (weapon != ZAPPED_WAND), or a null monster pointer.

Check !u.uswallow before calling bhit(). This function reveals the absence of a remembered invisible monster in necessary cases (throwing or kicking weapons). The presence of a real one is revealed for a weapon, but if not a weapon is left up to fhitm().

Parameters:
rangeCalled for the following distance effects: when a weapon is thrown (weapon == THROWN_WEAPON) when an object is kicked (KICKED_WEAPON) when an IMMEDIATE wand is zapped (ZAPPED_WAND) when a light beam is flashed (FLASHED_LIGHT) when a mirror is applied (INVIS_BEAM) A thrown/kicked object falls down at the end of its range or when a monster is hit. The variable 'bhitpos' is set to the final position of the weapon thrown/zapped. The ray of a wand may affect (by calling a provided function) several objects and monsters on its path. The return value is the monster hit (weapon != ZAPPED_WAND), or a null monster pointer.

Check !u.uswallow before calling bhit(). This function reveals the absence of a remembered invisible monster in necessary cases (throwing or kicking weapons). The presence of a real one is revealed for a weapon, but if not a weapon is left up to fhitm(). direction and range

Parameters:
weaponCalled for the following distance effects: when a weapon is thrown (weapon == THROWN_WEAPON) when an object is kicked (KICKED_WEAPON) when an IMMEDIATE wand is zapped (ZAPPED_WAND) when a light beam is flashed (FLASHED_LIGHT) when a mirror is applied (INVIS_BEAM) A thrown/kicked object falls down at the end of its range or when a monster is hit. The variable 'bhitpos' is set to the final position of the weapon thrown/zapped. The ray of a wand may affect (by calling a provided function) several objects and monsters on its path. The return value is the monster hit (weapon != ZAPPED_WAND), or a null monster pointer.

Check !u.uswallow before calling bhit(). This function reveals the absence of a remembered invisible monster in necessary cases (throwing or kicking weapons). The presence of a real one is revealed for a weapon, but if not a weapon is left up to fhitm(). see values in hack.h

Parameters:
objCalled for the following distance effects: when a weapon is thrown (weapon == THROWN_WEAPON) when an object is kicked (KICKED_WEAPON) when an IMMEDIATE wand is zapped (ZAPPED_WAND) when a light beam is flashed (FLASHED_LIGHT) when a mirror is applied (INVIS_BEAM) A thrown/kicked object falls down at the end of its range or when a monster is hit. The variable 'bhitpos' is set to the final position of the weapon thrown/zapped. The ray of a wand may affect (by calling a provided function) several objects and monsters on its path. The return value is the monster hit (weapon != ZAPPED_WAND), or a null monster pointer.

Check !u.uswallow before calling bhit(). This function reveals the absence of a remembered invisible monster in necessary cases (throwing or kicking weapons). The presence of a real one is revealed for a weapon, but if not a weapon is left up to fhitm(). object tossed/used

Parameters:
obj_destroyedCalled for the following distance effects: when a weapon is thrown (weapon == THROWN_WEAPON) when an object is kicked (KICKED_WEAPON) when an IMMEDIATE wand is zapped (ZAPPED_WAND) when a light beam is flashed (FLASHED_LIGHT) when a mirror is applied (INVIS_BEAM) A thrown/kicked object falls down at the end of its range or when a monster is hit. The variable 'bhitpos' is set to the final position of the weapon thrown/zapped. The ray of a wand may affect (by calling a provided function) several objects and monsters on its path. The return value is the monster hit (weapon != ZAPPED_WAND), or a null monster pointer.

Check !u.uswallow before calling bhit(). This function reveals the absence of a remembered invisible monster in necessary cases (throwing or kicking weapons). The presence of a real one is revealed for a weapon, but if not a weapon is left up to fhitm(). has object been deallocated? Pointer to boolean, may be NULL

References add_damage(), an(), bhitpile(), bhitpos, BOULDER, cansee, canspotmon, close_drawbridge(), closed_door(), cmap_to_glyph, COIN_CLASS, costly_spot(), D_BROKEN, delay_output, destroy_drawbridge(), DISP_BEAM, DISP_END, DISP_FLASH, distant_name(), doorlock(), DRAWBRIDGE_DOWN, DRAWBRIDGE_UP, FALSE, find_drawbridge(), flash_hits_mon(), FLASHED_LIGHT, glyph_is_invisible, HEAVY_IRON_BALL, hits_bars(), HOLE, in_rooms(), In_sokoban, inside_shop(), INVIS_BEAM, IRONBARS, is_db_wall(), IS_DOOR, is_lava(), is_pick, is_pool(), IS_SINK, isok(), KICKED_WEAPON, levl, m_at, makeknown, map_invisible(), monst::mx, monst::my, newsym(), notonhead, OBJ_AT, obj_to_glyph, obj::oclass, open_drawbridge(), obj::otyp, obj::ox, obj::oy, pay_for_damage(), PIT, pline(), rn2(), S_flashbeam, SDOOR, ship_object(), shkcatch(), SHOPBASE, sobj_at(), SPE_FORCE_BOLT, SPE_KNOCK, SPE_WIZARD_LOCK, SPIKED_PIT, t_at(), TEST_MOVE, test_move(), The(), THROWN_WEAPON, tmp_at(), TRAPDOOR, TRUE, u, uball, unmap_object(), you::ux, you::uy, you::uz, WAN_LOCKING, WAN_OPENING, WAN_PROBING, WAN_STRIKING, nhcoord::x, xname(), nhcoord::y, ZAP_POS, and ZAPPED_WAND.

Referenced by kick_object(), throw_gold(), throwit(), use_mirror(), and weffects().

Here is the call graph for this function:

Here is the caller graph for this function:

int bhitm ( struct monst mtmp,
struct obj otmp 
)

References adjalign(), bhitpos, Blind, BUFSZ, bypass_obj(), flag::bypasses, cancel_monst(), cansee, canseemon, canspotmon, CHAM_ORDINARY, d(), exclam(), expels(), FALSE, find_mac(), flags, flash_hits_mon(), Hallucination, hit(), hot_pursuit(), is_animal, is_undead, is_whirly, knowninvisible, M_AP_NOTHING, M_AP_OBJECT, m_dowear(), m_respond(), makeknown, map_invisible(), mimic_hit_msg(), miss(), mon_adjust_speed(), mon_nam(), mon_set_minvis(), monflee(), Monnam(), mons, monsndx(), nambuf, name, newcham(), newsym(), obj::nobj, NOTELL, obj_extract_self(), obj::oclass, obj::otyp, obj::owornmask, place_object(), pline(), PM_FLESH_GOLEM, PM_HEALER, PM_KNIGHT, PM_PESTILENCE, PM_STONE_GOLEM, POT_POLYMORPH, probe_monster(), resist(), resists_drli(), resists_magm(), rn2(), rnd(), Role_if, S_MIMIC, seemimic(), set_mimic_sym(), sgn(), shieldeff(), sleep_monst(), slept_monst(), obj::spe, SPE_CANCELLATION, SPE_DRAIN_LIFE, SPE_EXTRA_HEALING, SPE_FORCE_BOLT, SPE_HEALING, SPE_KNOCK, SPE_POLYMORPH, SPE_SLOW_MONSTER, SPE_STONE_TO_FLESH, SPE_TELEPORT_AWAY, SPE_TURN_UNDEAD, SPE_WIZARD_LOCK, spell_damage_bonus(), STRANGE_OBJECT, Strcpy, TELL, TRUE, align::type, u, u_teleport_mon(), you::ualign, you::uhave, unturn_dead(), update_mon_intrinsics(), you::ushops, you::ustuck, wakeup(), WAN_CANCELLATION, WAN_LIGHT, WAN_LOCKING, WAN_MAKE_INVISIBLE, WAN_NOTHING, WAN_OPENING, WAN_POLYMORPH, WAN_PROBING, WAN_SLEEP, WAN_SLOW_MONSTER, WAN_SPEED_MONSTER, WAN_STRIKING, WAN_TELEPORTATION, WAN_UNDEAD_TURNING, WAND_CLASS, which_armor(), nhcoord::x, xkilled(), and nhcoord::y.

Referenced by do_break_wand(), potionhit(), and weffects().

Here is the call graph for this function:

Here is the caller graph for this function:

int bhito ( struct obj obj,
struct obj otmp 
)

References AMULET_OF_UNCHANGING, ANIMATE_SPELL, animate_statue(), BOULDER, boxlock(), break_statue(), breaks(), flag::bypasses, cancel_item(), cansee, carnivorous, obj::cobj, CORPSE, monst::data, delobj(), display_cinventory(), do_osshock(), drain_item(), EGG, FALSE, FIGURINE, flags, fracture_rock(), G_NOCORPSE, G_UNIQ, GEM_CLASS, GEMSTONE, permonst::geno, get_obj_location(), herbivorous, hero_breaks(), HUGE_CHUNK_OF_MEAT, Is_box, Is_container, makeknown, makemon(), MEAT_RING, MEAT_STICK, MEATBALL, MINERAL, mon, flag::mon_moving, mons, monst::mx, monst::my, newsym(), NO_MM_FLAGS, obj::nobj, obj_extract_self(), OBJ_FLOOR, obj_resists(), obj_shudders(), objects, objclass::oc_class, place_object(), pline(), PM_MONK, poly_obj(), u_conduct::polypiles, POT_POLYMORPH, revive(), revive_egg(), RING_CLASS, rloco(), ROCK_CLASS, Role_if, SPE_CANCELLATION, SPE_DRAIN_LIFE, SPE_EXTRA_HEALING, SPE_FORCE_BOLT, SPE_HEALING, SPE_KNOCK, SPE_POLYMORPH, SPE_SLOW_MONSTER, SPE_STONE_TO_FLESH, SPE_TELEPORT_AWAY, SPE_TURN_UNDEAD, SPE_WIZARD_LOCK, STATUE, STRANGE_OBJECT, Tobjnam(), TOOL_CLASS, TRUE, u, uball, uchain, you::uconduct, unpunish(), u_conduct::unvegetarian, vegetarian, WAN_CANCELLATION, WAN_LOCKING, WAN_MAKE_INVISIBLE, WAN_NOTHING, WAN_OPENING, WAN_POLYMORPH, WAN_PROBING, WAN_SLOW_MONSTER, WAN_SPEED_MONSTER, WAN_STRIKING, WAN_TELEPORTATION, WAN_UNDEAD_TURNING, WAND_CLASS, WEAPON_CLASS, and youmonst.

Referenced by do_break_wand(), use_defensive(), use_offensive(), weffects(), zap_updown(), and zapyourself().

Here is the call graph for this function:

Here is the caller graph for this function:

int bhitpile ( struct obj obj,
fhito  ,
int  tx,
int  ty 
)

References activate_statue_trap(), create_polymon(), level, makeknown, dlevel_t::objects, otmp, poly_zapped, SPE_FORCE_BOLT, STATUE_TRAP, t_at(), TRUE, and WAN_STRIKING.

Referenced by bhit(), do_break_wand(), and zap_updown().

Here is the call graph for this function:

Here is the caller graph for this function:

struct monst* boomhit ( int  dx,
int  dy 
) [read]

References A_DEX, ACURR, bhitpos, closed_door(), cmap_to_glyph, delay_output, DISP_CHANGE, DISP_END, DISP_FLASH, Fumbling, IS_SINK, levl, m_at, m_respond(), MON_AT, rn2(), rnd(), S_boomleft, S_boomright, thitu(), tmp_at(), u, you::ux, you::uy, nhcoord::x, xdir, nhcoord::y, ydir, youmonst, and ZAP_POS.

Referenced by throwit().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean break_statue ( struct obj obj )

References activate_statue_trap(), adjalign(), obj::cobj, FALSE, flags, fracture_rock(), flag::mon_moving, obj_extract_self(), obj::ox, place_object(), PM_ARCHEOLOGIST, Role_if, STATUE_HISTORIC, STATUE_TRAP, t_at(), and TRUE.

Referenced by bhito(), dig(), and scatter().

Here is the call graph for this function:

Here is the caller graph for this function:

int burn_floor_paper ( int  x,
int  y,
boolean  give_feedback,
boolean  u_caused 
)

References An(), BUFSZ, delobj(), distant_name(), level, obj_resists(), dlevel_t::objects, obj::oclass, obj::otyp, pline(), obj::quan, rn2(), SCR_FIRE, SCROLL_CLASS, SPBOOK_CLASS, SPE_FIREBALL, Strcpy, u, useupf(), you::ux, you::uy, and xname().

Referenced by cast_cleric_spell(), dofiretrap(), mintrap(), and zap_over_floor().

Here is the call graph for this function:

Here is the caller graph for this function:

void buzz ( int  type,
int  nd,
xchar  sx,
xchar  sy,
int  dx,
int  dy 
)
void cancel_item ( struct obj obj )
boolean cancel_monst ( struct monst mdef,
struct obj obj,
boolean  youattack,
boolean  allow_cancel_kill,
boolean  self_cancel 
)
boolean cancellable ( struct obj obj )

References ARMOR_CLASS, is_weptool, objects, POT_ACID, POT_SICKNESS, and WEAPON_CLASS.

Referenced by cancel_monst().

Here is the caller graph for this function:

STATIC_OVL void costly_cancel ( struct obj obj )

References bill_dummy_object(), costly_spot(), FALSE, in_rooms(), inhishop(), OBJ_FLOOR, OBJ_INVENT, shop_keeper(), SHOPBASE, stolen_value(), u, you::ushops, you::ux, and you::uy.

Referenced by cancel_item(), and drain_item().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void create_polymon ( struct obj obj,
int  okind 
)
void destroy_item ( int  osym,
int  dmgtyp 
)
int destroy_mitem ( struct monst mtmp,
int  osym,
int  dmgtyp 
)
void do_osshock ( struct obj obj )

References addtobill(), costly_spot(), delobj(), FALSE, LARGEST_INT, Luck, obj_zapped, objects, poly_zapped, rn2(), rnd(), SCR_MAIL, splitobj(), stolen_value(), TRUE, u, and you::ushops.

Referenced by bhito().

Here is the call graph for this function:

Here is the caller graph for this function:

int dozap (  )
boolean drain_item ( struct obj obj )
const char* exclam ( int  force )

Referenced by bhitm(), buzz(), hmon_hitmon(), mbhitm(), ohitmon(), and thitu().

Here is the caller graph for this function:

STATIC_DCL boolean FDECL ( zap_updown  ,
(struct obj *)   
)
STATIC_DCL int FDECL ( zap_hit  ,
(int, int)   
)
STATIC_DCL void FDECL ( backfire  ,
(struct obj *)   
)
STATIC_DCL void FDECL ( polyuse  ,
(struct obj *, int, int)   
)
STATIC_DCL int FDECL ( spell_hit_bonus  ,
(int)   
)
STATIC_DCL void FDECL ( costly_cancel  ,
(struct obj *)   
)
STATIC_DCL int FDECL ( zhitm  ,
(struct monst *, int, int, struct obj **)   
)
STATIC_DCL void FDECL ( create_polymon  ,
(struct obj *, int)   
)
STATIC_DCL void FDECL ( zhitu  ,
(int, int, const char *, XCHAR_P, XCHAR_P)   
)
STATIC_DCL void FDECL ( revive_egg  ,
(struct obj *)   
)
void fracture_rock ( struct obj obj )

References BOULDER, cansee, change_luck(), does_block(), FALSE, flags, GEM_CLASS, In_sokoban, levl, flag::mon_moving, newsym(), OATTACHED_NOTHING, obj_extract_self(), OBJ_FLOOR, place_object(), rn1, ROCK, u, unblock_point(), you::uz, and weight().

Referenced by bhito(), break_statue(), dig(), launch_obj(), mkinvpos(), and scatter().

Here is the call graph for this function:

Here is the caller graph for this function:

struct monst* get_container_location ( struct obj obj,
int *  loc,
int *  container_nesting 
) [read]

References OBJ_CONTAINED, OBJ_MINVENT, and obj::where.

Referenced by revive(), and revive_corpse().

Here is the caller graph for this function:

boolean get_mon_location ( struct monst mon,
xchar xp,
xchar yp,
int  locflags 
)

References FALSE, TRUE, u, you::ux, you::uy, and youmonst.

Referenced by do_light_sources().

Here is the caller graph for this function:

boolean get_obj_location ( struct obj obj,
xchar xp,
xchar yp,
int  locflags 
)
void hit ( const char *  str,
struct monst mtmp,
const char *  force 
)

References bhitpos, cansee, canspotmon, flags, mon_nam(), pline(), The(), u, you::ustuck, flag::verbose, vtense(), nhcoord::x, and nhcoord::y.

Referenced by bhitm(), buzz(), hmon_hitmon(), mbhitm(), and ohitmon().

Here is the call graph for this function:

Here is the caller graph for this function:

void makewish ( boolean  magical )

Lets the player make a wish. Entering an empty string selects a random object. Entering "nothing" returns nothing and keeps the wishing conduct.

Parameters:
magicalLets the player make a wish. Entering an empty string selects a random object. Entering "nothing" returns nothing and keeps the wishing conduct. if wishing for magical items is allowed

References aobjnam(), artifact_exists(), BUFSZ, FALSE, flags, getlin, hold_another_object(), ICE, IRONBARS, Is_airlevel, Is_waterlevel, levl, nothing, obj::oartifact, obfree(), objects, ONAME, otmp, obj::otyp, pline(), readobjnam(), rn1, rn2(), Strcpy, thats_enough_tries, The(), TRUE, u, you::ublesscnt, you::uconduct, you::ux, you::uy, you::uz, flag::verbose, u_conduct::wishes, u_conduct::wishmagic, and zeroobj.

Referenced by djinni_from_bottle(), dowaterdemon(), and zapnodir().

Here is the call graph for this function:

Here is the caller graph for this function:

void melt_ice ( xchar  x,
xchar  y 
)
void miss ( const char *  str,
struct monst mtmp 
)

References bhitpos, cansee, canspotmon, flags, mon_nam(), pline(), The(), flag::verbose, vtense(), nhcoord::x, and nhcoord::y.

Referenced by bhitm(), buzz(), drag_ball(), ghitm(), mbhitm(), ohitmon(), thitmonst(), and tmiss().

Here is the call graph for this function:

Here is the caller graph for this function:

struct monst* montraits ( struct obj obj,
coord cc 
) [read]
boolean obj_resists ( struct obj obj,
int  ochance,
int  achance 
)
boolean obj_shudders ( struct obj obj )

References rn2(), and WAND_CLASS.

Referenced by bhito().

Here is the call graph for this function:

Here is the caller graph for this function:

struct obj* poly_obj ( struct obj obj,
int  id 
) [read]
STATIC_OVL void polyuse ( struct obj objhdr,
int  mat,
int  minwt 
)

References addtobill(), costly_spot(), delobj(), FALSE, LARGEST_INT, obj_resists(), objects, otmp, rn2(), SCR_MAIL, stolen_value(), u, uball, uchain, and you::ushops.

Referenced by create_polymon().

Here is the call graph for this function:

Here is the caller graph for this function:

void probe_monster ( struct monst mtmp )

References display_minventory(), MINV_ALL, mstatusline(), obj::nobj, noit_Monnam(), notonhead, otmp, and pline().

Referenced by bhitm(), and Mb_hit().

Here is the call graph for this function:

Here is the caller graph for this function:

int resist ( struct monst mtmp,
char  oclass,
int  damage,
int  tell 
)
struct monst* revive ( struct obj obj ) [read]
STATIC_OVL void revive_egg ( struct obj obj )

References attach_egg_hatch_timeout(), dead_species(), EGG, NON_PM, and TRUE.

Referenced by bhito(), and unturn_dead().

Here is the call graph for this function:

Here is the caller graph for this function:

int spell_damage_bonus (  )

References A_INT, ACURR, u, and you::ulevel.

Referenced by bhitm(), spelleffects(), and zhitm().

Here is the caller graph for this function:

STATIC_OVL int spell_hit_bonus ( int  skill )

References A_DEX, ACURR, P_BASIC, P_EXPERT, P_ISRESTRICTED, P_SKILL, P_SKILLED, P_UNSKILLED, and spell_skilltype().

Referenced by zap_hit().

Here is the call graph for this function:

Here is the caller graph for this function:

int unturn_dead ( struct monst mon )

References Amonnam(), BUFSZ, canseemon, CORPSE, corpse_xname(), EGG, invent, Monnam(), obj::nobj, otmp, obj::otyp, pline(), revive(), revive_egg(), s_suffix(), Strcpy, TRUE, and youmonst.

Referenced by bhitm(), deadbook(), and zapyourself().

Here is the call graph for this function:

Here is the caller graph for this function:

void weffects ( struct obj obj )
STATIC_OVL int zap_hit ( int  ac,
int  type 
)

References AC_VALUE, rn2(), rnd(), and spell_hit_bonus().

Referenced by buzz().

Here is the call graph for this function:

Here is the caller graph for this function:

int zap_over_floor ( xchar  x,
xchar  y,
int  type,
boolean shopdamage 
)
STATIC_OVL boolean zap_updown ( struct obj obj )
void zapnodir ( struct obj obj )
int zappable ( struct obj wand )

References rn2().

Referenced by dozap(), and engrave().

Here is the call graph for this function:

Here is the caller graph for this function:

int zapyourself ( struct obj obj,
boolean  ordinary 
)

References A_CON, A_DEX, A_STR, AD_COLD, AD_ELEC, AD_FIRE, Antimagic, bhito(), BInvis, Blind, BUFSZ, burn_away_slime(), burnarmor(), cancel_monst(), Cold_resistance, d(), monst::data, destroy_item(), DIED, done(), Drain_resistance, exercise(), EXPENSIVE_CAMERA, EXPL_FIERY, explode(), fall_asleep(), FALSE, Fast, FIRE_HORN, Fire_resistance, fix_petrification(), FROMOUTSIDE, FROST_HORN, healup(), HFast, HInvis, HStun, incr_itimeout(), INTRINSIC, invent, Invis, is_demon, is_undead, killer, killer_format, losexp(), make_blinded(), make_stunned(), makeknown, merged(), MUMMY_WRAPPING, newsym(), NO_KILLER_PREFIX, obj::nobj, nonliving, obj::otyp, pline(), PM_FLESH_GOLEM, PM_STONE_GOLEM, polymon(), polyself(), POTION_CLASS, Punished, resists_blnd(), RING_CLASS, rn2(), rnd(), SCROLL_CLASS, self_invis_message(), shieldeff(), Shock_resistance, Sleep_resistance, SPBOOK_CLASS, SPE_CANCELLATION, SPE_CONE_OF_COLD, SPE_DETECT_UNSEEN, SPE_DIG, SPE_DRAIN_LIFE, SPE_EXTRA_HEALING, SPE_FINGER_OF_DEATH, SPE_FIREBALL, SPE_FORCE_BOLT, SPE_HEALING, SPE_KNOCK, SPE_MAGIC_MISSILE, SPE_POLYMORPH, SPE_SLEEP, SPE_SLOW_MONSTER, SPE_STONE_TO_FLESH, SPE_TELEPORT_AWAY, SPE_TURN_UNDEAD, SPE_WIZARD_LOCK, Sprintf, Stoned, Stunned, tele(), TIMEOUT, TRUE, u, u_slow_down(), uarmc, ugolemeffects(), uhim, you::umonnum, Unchanging, unturn_dead(), ustatusline(), you::ux, you::uy, vision_clears, WAN_CANCELLATION, WAN_COLD, WAN_DEATH, WAN_DIGGING, WAN_FIRE, WAN_LIGHT, WAN_LIGHTNING, WAN_LOCKING, WAN_MAGIC_MISSILE, WAN_MAKE_INVISIBLE, WAN_NOTHING, WAN_OPENING, WAN_POLYMORPH, WAN_PROBING, WAN_SLEEP, WAN_SLOW_MONSTER, WAN_SPEED_MONSTER, WAN_STRIKING, WAN_TELEPORTATION, WAN_UNDEAD_TURNING, WAND_CLASS, xname(), and youmonst.

Referenced by do_break_wand(), do_improvisation(), dozap(), and spelleffects().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int zhitm ( struct monst mon,
int  type,
int  nd,
struct obj **  ootmp 
)
STATIC_OVL void zhitu ( int  type,
int  nd,
const char *  fltxt,
xchar  sx,
xchar  sy 
)

Variable Documentation

STATIC_VAR const char are_blinded_by_the_flash[] = "are blinded by the flash!"
const char charged_objs[] = { WAND_CLASS, WEAPON_CLASS, ARMOR_CLASS, 0 } [static]
const char* const destroy_strings[]
Initial value:
 {      
        "freezes and shatters", "freeze and shatter", "shattered potion",
        "boils and explodes", "boil and explode", "boiling potion",
        "catches fire and burns", "catch fire and burn", "burning scroll",
        "catches fire and burns", "catch fire and burn", "burning book",
        "turns to dust and vanishes", "turn to dust and vanish", "",
        "breaks apart and explodes", "break apart and explode", "exploding wand"
}

Referenced by fire_damage().

const char* const flash_types[]
NEARDATA boolean obj_zapped [static]

Referenced by do_osshock(), and weffects().

NEARDATA int poly_zapped [static]

Referenced by bhitpile(), and do_osshock().

NEARDATA const char zap_syms[] = { WAND_CLASS, 0 } [static]