File src/hack.c


Included Files


Preprocessor definitions

#define IS_SHOP( x )

#define goodtype( rno )


Local Variables

fell_on_sink
static const char fell_on_sink[]
Used in: dosinkfall()

wc
static int wc
Used in: calc_capacity()
  inv_weight()
  max_capacity()


Global Function bad_rock()

boolean bad_rock ( struct permonst* mdat, xchar x, xchar y )
Prototyped in: include/extern.h
Calls: may_dig()src/hack.c
  may_passwall()src/hack.c
  sobj_at()
Called by: domove()src/hack.c
References Variables: dungeon_topologysrc/decl.c
  levelsrc/decl.c
  usrc/decl.c

Global Function calc_capacity()

int calc_capacity ( int xtra_wt )
Prototyped in: include/extern.h
Calls: inv_weight()src/hack.c
Called by: near_capacity()src/hack.c
References Variables: wcsrc/hack.c

Global Function check_capacity()

boolean check_capacity ( const char* str )
Prototyped in: include/extern.h
Calls: near_capacity()src/hack.c
  You_cant(), pline()
Called by: doapply()src/apply.c
  doeat()src/eat.c
  doengrave()src/engrave.c
  dofire()src/dothrow.c
  dothrow()src/dothrow.c

Global Function check_special_room()

void check_special_room ( boolean newlev )
Prototyped in: include/extern.h
Calls: monstinroom()src/hack.c
  move_update()src/hack.c
  Hello(), You(), intemple(), locomotion(), midnight(), pline(), rn2(), search_special(), u_entered_shop(), u_left_shop(), verbalize()
Called by: goto_level()src/do.c
  newgame()src/allmain.c
  spoteffects()src/hack.c
References Variables: levelsrc/decl.c
  plnamesrc/decl.c
  roomssrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c
  mons

Global Function domove()

void domove ( void )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  abuse_dog()src/dog.c
  acurr()src/attrib.c
  adjalign()src/attrib.c
  bad_rock()src/hack.c
  check_leash()src/apply.c
  confdir()src/cmd.c
  drag_ball()src/ball.c
  exercise()src/attrib.c
  feel_location()src/display.c
  gethungry()src/eat.c
  inv_weight()src/hack.c
  invocation_message()src/hack.c
  is_db_wall()src/dbridge.c
  is_ice()src/dbridge.c
  is_lava()src/dbridge.c
  is_pool()src/dbridge.c
  isok()src/cmd.c
  m_monnam()src/do_name.c
  may_passwall()src/hack.c
  mon_nam()src/do_name.c
  move_bc()src/ball.c
  moverock()src/hack.c
  near_capacity()src/hack.c
  newsym()src/display.c
  nomul()src/hack.c
  on_level()src/dungeon.c
  reset_occupations()src/cmd.c
  spoteffects()src/hack.c
  still_chewing()src/hack.c
  surface()src/engrave.c
  u_wipe_engr()src/engrave.c
  unmap_object()src/display.c
  weight_cap()src/hack.c
  y_monnam()src/do_name.c
  Norep(), You(), You_cant(), You_feel(), Your(), attack(), block_door(), block_entry(), body_part(), can_ooze(), closed_door(), dist2(), dmgtype(), exercise_steed(), fall_asleep(), fill_pit(), find_skates(), growl(), in_out_region(), mintrap(), minwater(), place_monster(), pline(), pline_The(), rn2(), rnd(), seemimic(), sobj_at(), sticks(), stumble_onto_mimic(), t_at(), vision_recalc(), water_friction(), worm_known(), yelp()
Called by: moveloop()src/allmain.c
  rhack()src/cmd.c
References Variables: WIN_MESSAGEsrc/decl.c
  bhitpossrc/decl.c
  dungeon_topologysrc/decl.c
  flagssrc/decl.c
  inventsrc/decl.c
  levelsrc/decl.c
  movessrc/decl.c
  multisrc/decl.c
  nomovemsgsrc/decl.c
  usrc/decl.c
  uarmfsrc/decl.c
  uballsrc/decl.c
  ublindfsrc/decl.c
  uwepsrc/decl.c
  vision_full_recalcsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c
  mons, windowprocs

Global Function dopickup()

int dopickup ( void )
Prototyped in: include/extern.h
Calls: can_reach_floor()src/engrave.c
  is_lava()src/dbridge.c
  is_pool()src/dbridge.c
  mon_nam()src/do_name.c
  on_level()src/dungeon.c
  surface()src/engrave.c
  There(), You(), You_cant(), pickup(), pline(), s_suffix()
Used in:  src/cmd.c
References Variables: c_common_stringssrc/decl.c
  dungeon_topologysrc/decl.c
  levelsrc/decl.c
  multisrc/decl.c
  save_cmsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c
  mons

Global Function in_rooms()

char* in_rooms ( xchar x, xchar y, int typewanted )
Prototyped in: include/extern.h
Calls: strchr()
Called by: breakobj()src/dothrow.c
  ceiling()src/engrave.c
  check_shop_obj()src/dothrow.c
  dig()src/dig.c
  digactualhole()src/dig.c
  dokick()src/dokick.c
  impact_drop()src/dokick.c
  kick_object()src/dokick.c
  mdig_tunnel()src/dig.c
  mon_arrive()src/dog.c
  monstinroom()src/hack.c
  move_update()src/hack.c
  set_trap()src/apply.c
  ship_object()src/dokick.c
  still_chewing()src/hack.c
  throwit()src/dothrow.c
  zap_dig()src/dig.c
References Variables: levelsrc/decl.c
  roomssrc/decl.c

Global Function inv_cnt()

int inv_cnt ( void )
Prototyped in: include/extern.h
Called by: touchfood()src/eat.c
References Variables: inventsrc/decl.c

Global Function inv_weight()

int inv_weight ( void )
Prototyped in: include/extern.h
Calls: weight_cap()src/hack.c
Called by: calc_capacity()src/hack.c
  dokick()src/dokick.c
  domove()src/hack.c
  kick_monster()src/dokick.c
  max_capacity()src/hack.c
  moverock()src/hack.c
References Variables: inventsrc/decl.c
  usrc/decl.c
  wcsrc/hack.c
  youmonstsrc/decl.c

Global Function invocation_message()

void invocation_message ( void )
Prototyped in: include/extern.h
Calls: On_stairs()src/dungeon.c
  invocation_pos()src/hack.c
  The(), You_feel(), body_part(), carrying(), makeplural(), pline(), xname()
Called by: domove()src/hack.c
References Variables: usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Global Function invocation_pos()

boolean invocation_pos ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: Invocation_lev()src/dungeon.c
Called by: invocation_message()src/hack.c
  use_bell()src/apply.c
  use_candelabrum()src/apply.c
References Variables: inv_possrc/decl.c
  usrc/decl.c

Global Function lookaround()

void lookaround ( void )
Prototyped in: include/extern.h
Calls: is_lava()src/dbridge.c
  is_pool()src/dbridge.c
  isok()src/cmd.c
  nomul()src/hack.c
  closed_door(), dist2(), t_at()
Called by: moveloop()src/allmain.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Global Function losehp()

void losehp ( int n, const char* knam, boolean k_format )
Prototyped in: include/extern.h
Calls: done()src/end.c
  maybe_wail()src/hack.c
  You(), rehumanize()
Called by: ballfall()src/ball.c
  boulder_hits_pool()src/do.c
  do_break_wand()src/apply.c
  doeat()src/eat.c
  dokick()src/dokick.c
  dosinkfall()src/hack.c
  drag_down()src/ball.c
  drinkfountain()src/fountain.c
  drinksink()src/fountain.c
  drop_ball()src/ball.c
  eatcorpse()src/eat.c
  flooreffects()src/do.c
  goto_level()src/do.c
  hurtle_step()src/dothrow.c
  jump()src/apply.c
  throwit()src/dothrow.c
  toss_up()src/dothrow.c
  touch_artifact()src/artifact.c
  use_crystal_ball()src/detect.c
  use_grapple()src/apply.c
  use_pick_axe()src/dig.c
  use_whip()src/apply.c
  zap_dig()src/dig.c
References Variables: flagssrc/decl.c
  killersrc/decl.c
  killer_formatsrc/decl.c
  usrc/decl.c

Global Function max_capacity()

int max_capacity ( void )
Prototyped in: include/extern.h
Calls: inv_weight()src/hack.c
References Variables: wcsrc/hack.c

Global Function may_dig()

boolean may_dig ( xchar x, xchar y )
Prototyped in: include/extern.h
Called by: bad_rock()src/hack.c
  dig()src/dig.c
  dog_move()src/dogmove.c
  still_chewing()src/hack.c
  zap_dig()src/dig.c
References Variables: levelsrc/decl.c

Global Function may_passwall()

boolean may_passwall ( xchar x, xchar y )
Prototyped in: include/extern.h
Called by: bad_rock()src/hack.c
  domove()src/hack.c
  figurine_location_checks()src/apply.c
  hurtle_step()src/dothrow.c
References Variables: levelsrc/decl.c

Global Function monster_nearby()

int monster_nearby ( void )
Prototyped in: include/extern.h
Calls: isok()src/cmd.c
  dist2(), dmgtype(), noattacks(), onscary(), worm_known()
Called by: moveloop()src/allmain.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c
  mons

Global Function movobj()

void movobj ( struct obj* obj, xchar ox, xchar oy )
Prototyped in: include/extern.h
Calls: newsym()src/display.c
  place_object(), remove_object()
Called by: drop_ball()src/ball.c
  move_bc()src/ball.c
  moverock()src/hack.c

Global Function near_capacity()

int near_capacity ( void )
Prototyped in: include/extern.h
Calls: calc_capacity()src/hack.c
Called by: bot2()src/botl.c
  check_capacity()src/hack.c
  dokick()src/dokick.c
  domove()src/hack.c
  doup()src/do.c
  drag_ball()src/ball.c
  exerper()src/attrib.c
  gethungry()src/eat.c
  goto_level()src/do.c
  jump()src/apply.c

Global Function nomul()

void nomul ( int nval )
Prototyped in: include/extern.h
Called by: armoroff()src/do_wear.c
  artifact_hit()src/artifact.c
  cpostfx()src/eat.c
  do_break_wand()src/apply.c
  doapply()src/apply.c
  domove()src/hack.c
  done1()src/end.c
  done2()src/end.c
  dosearch0()src/detect.c
  dowear()src/do_wear.c
  drag_ball()src/ball.c
  hurtle()src/dothrow.c
  jump()src/apply.c
  lookaround()src/hack.c
  moveloop()src/allmain.c
  moverock()src/hack.c
  newuhs()src/eat.c
  read_engr_at()src/engrave.c
  reset_faint()src/eat.c
  rottenfood()src/eat.c
  scatter()src/explode.c
  still_chewing()src/hack.c
  stop_occupation()src/allmain.c
  use_bell()src/apply.c
  use_crystal_ball()src/detect.c
  use_mirror()src/apply.c
  use_pick_axe()src/dig.c
  vomit()src/eat.c
References Variables: flagssrc/decl.c
  multisrc/decl.c
  usrc/decl.c

Global Function revive_nasty()

boolean revive_nasty ( int x, int y, const char* msg )
Prototyped in: include/extern.h
Calls: revive_corpse()src/do.c
  Norep(), enexto(), goodpos(), rloc_to()
Called by: close_drawbridge()src/dbridge.c
  moverock()src/hack.c
  open_drawbridge()src/dbridge.c
References Variables: levelsrc/decl.c
  mons

Global Function spoteffects()

void spoteffects ( boolean pick )
Prototyped in: include/extern.h
Calls: Amonnam()src/do_name.c
  a_monnam()src/do_name.c
  ceiling()src/engrave.c
  check_special_room()src/hack.c
  docrt()src/display.c
  dosinkfall()src/hack.c
  is_ice()src/dbridge.c
  is_lava()src/dbridge.c
  is_pool()src/dbridge.c
  on_level()src/dungeon.c
  x_monnam()src/do_name.c
  You(), d(), dist2(), dotrap(), drown(), lava_effects(), mdamageu(), mnexto(), pickup(), pline(), rnd(), t_at()
Called by: Boots_off()src/do_wear.c
  Boots_on()src/do_wear.c
  digactualhole()src/dig.c
  domove()src/hack.c
  drag_ball()src/ball.c
  drop_ball()src/ball.c
References Variables: c_common_stringssrc/decl.c
  dungeon_topologysrc/decl.c
  flagssrc/decl.c
  in_steed_dismountingsrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  uarmhsrc/decl.c
  ublindfsrc/decl.c
  vision_full_recalcsrc/decl.c
  youmonstsrc/decl.c
  mons

Global Function unmul()

void unmul ( const char* msg_override )
Prototyped in: include/extern.h
Calls: pline()
Called by: moveloop()src/allmain.c
References Variables: afternmvsrc/decl.c
  c_common_stringssrc/decl.c
  multisrc/decl.c
  nomovemsgsrc/decl.c
  usrc/decl.c

Global Function weight_cap()

int weight_cap ( void )
Prototyped in: include/extern.h
Calls: acurr()src/attrib.c
  acurrstr()src/attrib.c
  on_level()src/dungeon.c
Called by: dokick()src/dokick.c
  domove()src/hack.c
  inv_weight()src/hack.c
  kick_monster()src/dokick.c
  litter()src/ball.c
References Variables: dungeon_topologysrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Local Function dosinkfall()

static void dosinkfall ( void )
Prototyped in: src/hack.c
Calls: Boots_off()src/do_wear.c
  Ring_off()src/do_wear.c
  acurr()src/attrib.c
  exercise()src/attrib.c
  losehp()src/hack.c
  off_msg()src/do_wear.c
  You(), doname(), rn2(), rnd()
Called by: spoteffects()src/hack.c
References Variables: fell_on_sinksrc/hack.c
  levelsrc/decl.c
  usrc/decl.c
  uarmfsrc/decl.c
  uleftsrc/decl.c
  urightsrc/decl.c
  youmonstsrc/decl.c

Local Function maybe_wail()

static void maybe_wail ( void )
Prototyped in: src/hack.c
Calls: You_hear(), pline()
Called by: losehp()src/hack.c
References Variables: movessrc/decl.c
  usrc/decl.c
  wailmsgsrc/decl.c
  urace, urole

Local Function monstinroom()

static boolean monstinroom ( struct permonst* mdat, int roomno )
Prototyped in: src/hack.c
Calls: in_rooms()src/hack.c
  strchr()
Called by: check_special_room()src/hack.c
References Variables: levelsrc/decl.c

Local Function move_update()

static void move_update ( boolean newlev )
Prototyped in: src/hack.c
Calls: in_rooms()src/hack.c
  strchr(), strcpy()
Called by: check_special_room()src/hack.c
References Variables: roomssrc/decl.c
  usrc/decl.c

Local Function moverock()

static int moverock ( void )
Prototyped in: src/hack.c
Calls: Monnam()src/do_name.c
  boulder_hits_pool()src/do.c
  bury_objs()src/dig.c
  change_luck()src/attrib.c
  del_engr_at()src/engrave.c
  depth()src/dungeon.c
  exercise()src/attrib.c
  feel_location()src/display.c
  flooreffects()src/do.c
  get_level()src/dungeon.c
  inv_weight()src/hack.c
  isok()src/cmd.c
  map_invisible()src/display.c
  mon_nam()src/do_name.c
  movobj()src/hack.c
  newsym()src/display.c
  nomul()src/hack.c
  on_level()src/dungeon.c
  revive_nasty()src/hack.c
  scatter()src/explode.c
  surface()src/engrave.c
  unmap_object()src/display.c
  The(), You(), You_hear(), add_to_migration(), closed_door(), delobj(), deltrap(), dist2(), obj_extract_self(), place_object(), pline(), random_teleport_level(), remove_object(), rloco(), rn2(), seetrap(), sobj_at(), t_at(), the(), worm_known(), xname()
Called by: domove()src/hack.c
References Variables: dungeon_topologysrc/decl.c
  flagssrc/decl.c
  inventsrc/decl.c
  levelsrc/decl.c
  movessrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c
  mons

Local Function still_chewing()

static int still_chewing ( xchar x, xchar y )
Prototyped in: src/hack.c
Calls: acurrstr()src/attrib.c
  assign_level()src/dungeon.c
  in_rooms()src/hack.c
  may_dig()src/hack.c
  newsym()src/display.c
  nomul()src/hack.c
  on_level()src/dungeon.c
  You(), add_damage(), b_trapped(), block_point(), closed_door(), delobj(), memset(), pay_for_damage(), rnd(), sobj_at(), unblock_point()
Called by: domove()src/hack.c
References Variables: diggingsrc/decl.c
  flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c