File src/apply.c


Included Files


Preprocessor definitions

#define MAXLEASHED 2

#define WEAK 3

#define PROP_COUNT 6

#define ATTR_COUNT

#define prop2trbl( X )

#define attr2trbl( Y )

#define prop_trouble( X )

#define attr_trouble( Y )

#define BY_OBJECT


Type struct trapinfo

struct trapinfo
struct trapinfo 
   { 
     struct obj* tobj; 
     xchar tx; 
     xchar ty; 
     int time_needed; 
   } 

Local Variables

tools
static const char tools[]
Used in: doapply()

tools_too
static const char tools_too[]
Used in: doapply()

no_elbow_room
static char no_elbow_room[]
Used in: light_cocktail()
  use_candle()

hollow_str
static char hollow_str[]
Used in: use_stethoscope()

whistle_str
static char whistle_str[]
Used in: use_magic_whistle()
  use_whistle()

look_str
static char look_str[]
Used in: use_mirror()

cuddly
static const char cuddly[]
Used in: dorub()

lubricables
static const char lubricables[]
Used in: use_grease()

need_to_remove_outer_armor
static const char need_to_remove_outer_armor[]
Used in: use_grease()

trapinfo
static struct trapinfo trapinfo
Used in: reset_trapset()
  set_trap()
  use_trap()

not_enough_room
static const char* not_enough_room
Used in: use_grapple()
  use_pole()

where_to_hit
static const char* where_to_hit
Used in: use_grapple()
  use_pole()

cant_see_spot
static const char* cant_see_spot
Used in: use_grapple()
  use_pole()


Global Function check_leash()

void check_leash ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: m_unleash()src/apply.c
  um_dist()src/apply.c
  Monnam(), You(), dist2(), growl(), mondied(), pline(), rn2(), s_suffix(), whimper(), yelp()
References Variables: invent, level, u

Global Function doapply()

int doapply ( void )
Prototyped in: include/extern.h
Calls: do_break_wand()src/apply.c
  light_cocktail()src/apply.c
  use_bell()src/apply.c
  use_camera()src/apply.c
  use_candelabrum()src/apply.c
  use_candle()src/apply.c
  use_figurine()src/apply.c
  use_grapple()src/apply.c
  use_grease()src/apply.c
  use_lamp()src/apply.c
  use_leash()src/apply.c
  use_magic_whistle()src/apply.c
  use_mirror()src/apply.c
  use_pole()src/apply.c
  use_stethoscope()src/apply.c
  use_tinning_kit()src/apply.c
  use_towel()src/apply.c
  use_trap()src/apply.c
  use_unicorn_horn()src/apply.c
  use_whip()src/apply.c
  use_whistle()src/apply.c
  Blindf_off(), Blindf_on(), The(), You(), aobjnam(), arti_speak(), carrying(), check_capacity(), check_unpaid(), cursed(), discover_object(), do_play_instrument(), dowrite(), getobj(), hold_another_object(), makemon(), mkobj(), nomul(), on_level(), pick_lock(), pline(), rn2(), rnd_class(), use_container(), use_crystal_ball(), use_pick_axe(), use_saddle(), weight()
References Variables: toolssrc/apply.c
  tools_toosrc/apply.c
  c_common_strings, dungeon_topology, flags, objects, u, ublindf, uwep

Global Function dojump()

int dojump ( void )
Prototyped in: include/extern.h
Calls: jump()src/apply.c

Global Function dorub()

int dorub ( void )
Prototyped in: include/extern.h
Calls: wield_tool()src/apply.c
  You(), begin_burn(), check_unpaid_usage(), discover_object(), djinni_from_bottle(), getobj(), pline(), rn2()
References Variables: cuddlysrc/apply.c
  c_common_strings, u, ublindf, uwep, youmonst

Global Function fig_transform()

void fig_transform ( genericptr_t arg, long timeout )
Prototyped in: include/extern.h
Calls: figurine_location_checks()src/apply.c
  You(), You_feel(), a_monnam(), enexto(), get_obj_location(), impossible(), is_pool(), locomotion(), make_familiar(), newsym(), obfree(), obj_extract_self(), rnd(), s_suffix(), sprintf(), start_timer(), strcpy(), worm_known()
References Variables: c_common_strings, mons, monstermoves, u, ublindf, viz_array, youmonst

Global Function get_mleash()

struct obj* get_mleash ( struct monst* mtmp )
Prototyped in: include/extern.h
References Variables: invent

Global Function jump()

int jump ( int magic )
Prototyped in: include/extern.h
Calls: Monnam(), You(), You_cant(), Your(), acurr(), body_part(), change_luck(), deltrap(), dist2(), getpos(), isok(), losehp(), makeplural(), mon_nam(), morehungry(), near_capacity(), nomul(), on_level(), pline(), rn2(), rnd(), set_wounded_legs(), t_at(), teleds(), walk_path()
Called by: dojump()src/apply.c
References Functions: hurtle_step()
References Variables: dungeon_topology, nomovemsg, u, viz_array, youmonst

Global Function m_unleash()

void m_unleash ( struct monst* mtmp )
Prototyped in: include/extern.h
Called by: check_leash()src/apply.c
References Variables: invent

Global Function next_to_u()

boolean next_to_u ( void )
Prototyped in: include/extern.h
Calls: number_leashed()src/apply.c
  You_feel(), dist2(), mnexto()
References Variables: invent, level, u

Global Function number_leashed()

int number_leashed ( void )
Prototyped in: include/extern.h
Called by: next_to_u()src/apply.c
  use_leash()src/apply.c
References Variables: invent

Global Function o_unleash()

void o_unleash ( struct obj* otmp )
Prototyped in: include/extern.h
References Variables: level

Global Function reset_trapset()

void reset_trapset ( void )
Prototyped in: include/extern.h
Called by: set_trap()src/apply.c
  use_trap()src/apply.c
References Variables: trapinfosrc/apply.c

Global Function snuff_candle()

boolean snuff_candle ( struct obj* otmp )
Prototyped in: include/extern.h
Calls: Shk_Your(), end_burn(), get_obj_location(), pline()
Called by: snuff_lit()src/apply.c
References Variables: u, ublindf, viz_array, youmonst

Global Function snuff_lit()

boolean snuff_lit ( struct obj* obj )
Prototyped in: include/extern.h
Calls: snuff_candle()src/apply.c
  Yname2(), end_burn(), get_obj_location(), pline()
References Variables: u, ublindf, viz_array, youmonst

Global Function tinnable()

boolean tinnable ( struct obj* corpse )
Prototyped in: include/extern.h
References Variables: mons

Global Function um_dist()

boolean um_dist ( xchar x, xchar y, xchar n )
Prototyped in: include/extern.h
Calls: abs()
Called by: check_leash()src/apply.c
References Variables: u

Global Function unleash_all()

void unleash_all ( void )
Prototyped in: include/extern.h
References Variables: invent, level

Global Function use_unicorn_horn()

void use_unicorn_horn ( struct obj* obj )
Prototyped in: include/extern.h
Calls: You(), acurr(), adjattrib(), d(), dmgtype(), make_blinded(), make_confused(), make_hallucinated(), make_sick(), make_stunned(), make_vomiting(), panic(), pline(), rn2(), rnd(), xname()
Called by: doapply()src/apply.c
References Variables: c_common_strings, flags, u, youmonst

Global Function wield_tool()

boolean wield_tool ( struct obj* obj )
Prototyped in: include/extern.h
Calls: You(), You_cant(), body_part(), doname(), doswapweapon(), makeplural(), pline(), setuqwep(), setuwep(), untwoweapon(), welded(), xname()
Called by: dorub()src/apply.c
  use_grapple()src/apply.c
  use_pole()src/apply.c
  use_whip()src/apply.c
References Variables: flags, objects, u, uarms, unweapon, uquiver, uswapwep, uwep, youmonst

Local Function do_break_wand()

static int do_break_wand ( struct obj* obj )
Prototyped in: src/apply.c
Calls: Can_dig_down(), You(), You_cant(), acurr(), bhitm(), bhitpile(), body_part(), bot(), check_unpaid(), d(), delobj(), dig_check(), digactualhole(), discover_object(), explode(), freeinv(), isok(), litroom(), losehp(), makemon(), nomul(), pline(), rn2(), rnd(), self_pronoun(), setnotworn(), sprintf(), strcpy(), yname(), zapyourself()
Called by: doapply()src/apply.c
References Functions: bhito()
References Variables: bhitpos, current_wand, flags, level, u, windowprocs, xdir, ydir, ynchars, youmonst

Local Function figurine_location_checks()

static boolean figurine_location_checks ( struct obj* obj, coord* cc, boolean quietly )
Prototyped in: src/apply.c
Calls: You(), isok(), may_passwall(), sobj_at()
Called by: fig_transform()src/apply.c
  use_figurine()src/apply.c
References Variables: level, mons

Local Function its_dead()

static boolean its_dead ( int rx, int ry, int* resp )
Prototyped in: src/apply.c
Calls: The(), You(), You_hear(), dmgtype(), pline(), sobj_at(), t_at()
Called by: use_stethoscope()src/apply.c
References Variables: level, mons, u, urole, youmonst

Local Function light_cocktail()

static void light_cocktail ( struct obj* obj )
Prototyped in: src/apply.c
Calls: There(), You(), addinv(), begin_burn(), bill_dummy_object(), check_unpaid(), costly_spot(), discover_object(), doname(), end_burn(), freeinv(), hold_another_object(), obj_extract_self(), shk_your(), splitobj()
Called by: doapply()src/apply.c
References Variables: no_elbow_roomsrc/apply.c
  u, ublindf, youmonst

Local Function set_trap()

static int set_trap ( void )
Prototyped in: src/apply.c
Calls: reset_trapset()src/apply.c
  You(), Your(), add_damage(), dmgtype(), dotrap(), in_rooms(), maketrap(), newsym(), rn2(), rnl(), the(), useup()
Used in: use_trap()src/apply.c
References Variables: trapinfosrc/apply.c
  defsyms, u, youmonst

Local Function use_bell()

static void use_bell ( struct obj* obj )
Prototyped in: src/apply.c
Calls: On_stairs(), The(), You(), a_monnam(), check_unpaid(), discover_object(), findit(), invocation_pos(), makemon(), mkclass(), mkundead(), mon_adjust_speed(), nomul(), obj_resists(), openit(), pline(), rn2(), rnd(), the(), unpunish(), useup(), wake_nearby(), xname()
Called by: doapply()src/apply.c
References Variables: c_common_strings, moves, mvitals, nomovemsg, u, uchain

Local Function use_camera()

static int use_camera ( struct obj* obj )
Prototyped in: src/apply.c
Calls: You(), bhit(), ceiling(), flash_hits_mon(), getdir(), mon_nam(), pline(), rn2(), s_suffix(), surface(), zapyourself()
Called by: doapply()src/apply.c
References Variables: c_common_strings, u

Local Function use_candelabrum()

static void use_candelabrum ( struct obj* obj )
Prototyped in: src/apply.c
Calls: The(), There(), You(), begin_burn(), end_burn(), invocation_pos(), pline(), pline_The(), the(), xname()
Called by: doapply()src/apply.c
References Variables: u, ublindf, youmonst

Local Function use_candle()

static void use_candle ( struct obj* obj )
Prototyped in: src/apply.c
Calls: use_lamp()src/apply.c
  The(), You(), carrying(), end_burn(), eos(), obj_merge_light_sources(), pline(), pline_The(), splitobj(), sprintf(), the(), useupall(), verbalize(), xname()
Called by: doapply()src/apply.c
References Variables: no_elbow_roomsrc/apply.c
  u, windowprocs, ynchars

Local Function use_figurine()

static void use_figurine ( struct obj* obj )
Prototyped in: src/apply.c
Calls: figurine_location_checks()src/apply.c
  You(), getdir(), make_familiar(), on_level(), stop_timer(), useup()
Called by: doapply()src/apply.c
References Variables: dungeon_topology, flags, multi, u

Local Function use_grapple()

static int use_grapple ( struct obj* obj )
Prototyped in: src/apply.c
Calls: wield_tool()src/apply.c
  You(), dist2(), enexto(), getpos(), hurtle(), losehp(), mon_nam(), newsym(), pickup_object(), pline(), rloc_to(), rn2(), sgn(), surface(), thitmonst(), uwep_skill_type()
Called by: doapply()src/apply.c
References Variables: cant_see_spotsrc/apply.c
  not_enough_roomsrc/apply.c
  where_to_hitsrc/apply.c
  c_common_strings, level, u, uwep, viz_array

Local Function use_grease()

static void use_grease ( struct obj* obj )
Prototyped in: src/apply.c
Calls: The(), You(), body_part(), check_unpaid(), dropx(), getobj(), incr_itimeout(), makeplural(), pline(), rn2(), rnd(), strcat(), strcpy(), xname(), yname()
Called by: doapply()src/apply.c
References Variables: lubricablessrc/apply.c
  need_to_remove_outer_armorsrc/apply.c
  u, uarm, uarmc, youmonst, zeroobj

Local Function use_lamp()

static void use_lamp ( struct obj* obj )
Prototyped in: src/apply.c
Calls: Shk_Your(), The(), Yname2(), You(), Your(), begin_burn(), bill_dummy_object(), check_unpaid(), costly_spot(), end_burn(), pline(), rn2(), s_suffix(), verbalize(), xname(), yname()
Called by: doapply()src/apply.c
  use_candle()src/apply.c
References Variables: objects, u, ublindf, youmonst

Local Function use_leash()

static void use_leash ( struct obj* obj )
Prototyped in: src/apply.c
Calls: number_leashed()src/apply.c
  Monnam(), There(), You(), dist2(), getdir(), l_monnam(), pline(), pline_The(), worm_known()
Called by: doapply()src/apply.c
References Variables: flags, level, mons, u, ublindf, viz_array, youmonst

Local Function use_magic_whistle()

static void use_magic_whistle ( struct obj* obj )
Prototyped in: src/apply.c
Calls: You(), change_luck(), discover_object(), dist2(), dmgtype(), fill_pit(), mintrap(), mnexto(), rn2(), wake_nearby(), worm_known()
Called by: doapply()src/apply.c
References Variables: whistle_strsrc/apply.c
  flags, level, mons, u, ublindf, viz_array, youmonst

Local Function use_mirror()

static int use_mirror ( struct obj* obj )
Prototyped in: src/apply.c
Calls: Monnam(), You(), You_cant(), You_hear(), acurr(), bhit(), body_part(), ceiling(), d(), dmgtype(), freeinv(), getdir(), hcolor(), killed(), make_confused(), mon_nam(), mon_reflects(), mpickobj(), nomul(), pline(), pline_The(), poly_gender(), pronoun_gender(), rloc(), rn2(), rnd(), s_suffix(), setnotworn(), surface(), tele_restrict(), worm_known()
Called by: doapply()src/apply.c
References Variables: look_strsrc/apply.c
  c_common_strings, his, mons, stoned, u, ublindf, viz_array, youmonst

Local Function use_pole()

static int use_pole ( struct obj* obj )
Prototyped in: src/apply.c
Calls: wield_tool()src/apply.c
  You(), dist2(), getpos(), pline(), thitmonst(), uwep_skill_type()
Called by: doapply()src/apply.c
References Variables: cant_see_spotsrc/apply.c
  not_enough_roomsrc/apply.c
  where_to_hitsrc/apply.c
  c_common_strings, level, u, uwep, viz_array

Local Function use_stethoscope()

static int use_stethoscope ( struct obj* obj )
Prototyped in: src/apply.c
Calls: its_dead()src/apply.c
  You(), You_cant(), You_hear(), body_part(), can_reach_floor(), ceiling(), confdir(), cvt_sdoor_to_door(), dist2(), feel_location(), freehand(), getdir(), isok(), map_invisible(), mstatusline(), newsym(), on_level(), pline_The(), rn2(), surface(), unmap_object(), ustatusline(), worm_known()
Called by: doapply()src/apply.c
References Variables: hollow_strsrc/apply.c
  dungeon_topology, flags, level, mons, monstermoves, moves, u, ublindf, viz_array, youmonst

Local Function use_tinning_kit()

static void use_tinning_kit ( struct obj* obj )
Prototyped in: src/apply.c
Calls: You(), an(), costly_spot(), doname(), floorfood(), hold_another_object(), impossible(), instapetrify(), mksobj(), pline(), poly_when_stoned(), revive_corpse(), sprintf(), useup(), useupf(), verbalize(), weight()
Called by: doapply()src/apply.c
References Variables: c_common_strings, mons, u, uarmg, youmonst

Local Function use_towel()

static int use_towel ( struct obj* obj )
Prototyped in: src/apply.c
Calls: Blindf_off(), You(), Your(), body_part(), dropx(), freehand(), make_blinded(), makeplural(), pline(), rn2()
Called by: doapply()src/apply.c
References Variables: u, ublindf

Local Function use_trap()

static void use_trap ( struct obj* otmp )
Prototyped in: src/apply.c
Calls: reset_trapset()src/apply.c
  On_stairs(), You(), You_cant(), acurr(), closed_door(), dmgtype(), is_lava(), is_pool(), rn2(), set_occupation(), shk_your(), t_at()
Called by: doapply()src/apply.c
References Functions: set_trap()src/apply.c
References Variables: trapinfosrc/apply.c
  defsyms, dnladder, level, u, ublindf, upladder, youmonst

Local Function use_whip()

static int use_whip ( struct obj* obj )
Prototyped in: src/apply.c
Calls: wield_tool()src/apply.c
  There(), You(), acurr(), an(), attack(), body_part(), ceiling(), confdir(), dbon(), dist2(), doname(), dropx(), enexto(), getdir(), hold_another_object(), instapetrify(), kick_steed(), losehp(), makeplural(), map_invisible(), mbodypart(), mon_nam(), obj_extract_self(), on_level(), pickup_object(), place_object(), pline(), pline_The(), poly_when_stoned(), polymon(), possibly_unwield(), pronoun_gender(), rn2(), rnd(), rnl(), s_suffix(), self_pronoun(), setuwep(), singular(), sobj_at(), sprintf(), stackobj(), strcpy(), surface(), teleds(), the(), wakeup(), worm_known(), xname()
Called by: doapply()src/apply.c
References Functions: xname()
References Variables: c_common_strings, dungeon_topology, flags, his, level, mons, objects, u, uarmg, ublindf, unweapon, urole, uwep, vision_full_recalc, viz_array, youmonst

Local Function use_whistle()

static void use_whistle ( struct obj* obj )
Prototyped in: src/apply.c
Calls: You(), wake_nearby()
Called by: doapply()src/apply.c
References Variables: whistle_strsrc/apply.c