File src/shk.c


Included Files


Preprocessor definitions

#define PAY_SOME 2

#define PAY_BUY 1

#define PAY_CANT 0

#define PAY_SKIP 1

#define PAY_BROKE 2

#define IS_SHOP( x )

#define HUNGRY 2

#define NEED_UPDATE 1

#define OPEN 2

#define INSHOP 4

#define horiz( i )

#define vert( i )

#define GDIST( x, y )


Global Variable Izchak_speaks

const char* Izchak_speaks[]
Visible in:  src/shk.c
Used in: shk_chat()src/shk.c

External Variables

shtypes
extern const struct shclass shtypes[]

Local Variables

followmsg
static long int followmsg
Used in: shk_move()

no_money
static const char no_money[]
Used in: dopay()

not_enough_money
static const char not_enough_money[]
Used in: dopay()

repo_location
static coord repo_location
Used in: finish_paybill()
  paybill()
  set_repo_loc()

sell_response
static char sell_response
Used in: sellobj()
  sellobj_state()

sell_voluntarily
static boolean sell_voluntarily
Used in: sellobj()
  sellobj_state()


Global Function Shk_Your()

char* Shk_Your ( char* buf, struct obj* obj )
Prototyped in: include/extern.h
Calls: highc()src/hacklib.c
  shk_your()src/shk.c
Called by: dodip()src/potion.c
  get_wet()src/potion.c
  snuff_candle()src/apply.c
  use_lamp()src/apply.c

Global Function add_damage()

void add_damage ( xchar x, xchar y, long cost )
Prototyped in: include/extern.h
Calls: alloc()src/alloc.c
  in_rooms()src/hack.c
  shop_keeper()src/shk.c
Called by: dig()src/dig.c
  do_earthquake()src/music.c
  dokick()src/dokick.c
  doopen()src/lock.c
  doorlock()src/lock.c
  fhito()src/muse.c
  m_move()src/monmove.c
  mdig_tunnel()src/dig.c
  picklock()src/lock.c
  set_trap()src/apply.c
  still_chewing()src/hack.c
  zap_dig()src/dig.c
References Variables: levelsrc/decl.c
  monstermovessrc/decl.c
  viz_arraysrc/decl.c

Global Function addtobill()

void addtobill ( struct obj* obj, boolean ininv, boolean dummy, boolean silent )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  The()src/objnam.c
  You()src/pline.c
  add_one_tobill()src/shk.c
  bill_box_content()src/shk.c
  contained_cost()src/shk.c
  contained_gold()src/shk.c
  costly_gold()src/shk.c
  get_cost()src/shk.c
  inhishop()src/shk.c
  onbill()src/shk.c
  picked_container()src/shk.c
  pline()src/pline.c
  pline_The()src/pline.c
  rn2()src/rnd.c
  shop_keeper()src/shk.c
  the()src/objnam.c
  xname()src/objnam.c
  strcat(), strcpy()
Called by: bill_dummy_object()src/mkobj.c
  kick_object()src/dokick.c
  out_container()src/pickup.c
  pick_obj()src/pickup.c
  useupf()src/invent.c
References Variables: flagssrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function block_door()

boolean block_door ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: in_rooms()src/hack.c
  inhishop()src/shk.c
  pline()src/pline.c
  shkname()src/shk.c
  shop_keeper()src/shk.c
Called by: domove()src/hack.c
References Variables: levelsrc/decl.c
  monssrc/monst.c
  roomssrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function block_entry()

boolean block_entry ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: carrying()src/invent.c
  in_rooms()src/hack.c
  inhishop()src/shk.c
  pline()src/pline.c
  shkname()src/shk.c
  shop_keeper()src/shk.c
Called by: domove()src/hack.c
References Variables: levelsrc/decl.c
  monssrc/monst.c
  roomssrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function check_unpaid()

void check_unpaid ( struct obj* otmp )
Prototyped in: include/extern.h
Calls: check_unpaid_usage()src/shk.c
Called by: do_break_wand()src/apply.c
  do_improvisation()src/music.c
  doapply()src/apply.c
  dodip()src/potion.c
  doengrave()src/engrave.c
  light_cocktail()src/apply.c
  use_bell()src/apply.c
  use_crystal_ball()src/detect.c
  use_grease()src/apply.c
  use_lamp()src/apply.c

Global Function check_unpaid_usage()

void check_unpaid_usage ( struct obj* otmp, boolean altusage )
Prototyped in: include/extern.h
Calls: cost_per_charge()src/shk.c
  exercise()src/attrib.c
  inhishop()src/shk.c
  rn2()src/rnd.c
  shop_keeper()src/shk.c
  verbalize()src/pline.c
Called by: check_unpaid()src/shk.c
  dorub()src/apply.c
References Variables: objectssrc/objects.c
  usrc/decl.c

Global Function contained_cost()

long contained_cost ( struct obj* obj, struct monst* shkp, long price, boolean usell )
Prototyped in: include/extern.h
Calls: contained_cost()src/shk.c
  get_cost()src/shk.c
  set_cost()src/shk.c
  saleable()
Called by: addtobill()src/shk.c
  contained_cost()src/shk.c
  price_quote()src/shk.c
  sellobj()src/shk.c
References Variables: objectssrc/objects.c

Global Function contained_gold()

long contained_gold ( struct obj* obj )
Prototyped in: include/extern.h
Calls: contained_gold()src/shk.c
Called by: addtobill()src/shk.c
  contained_gold()src/shk.c
  sellobj()src/shk.c
  stolen_value()src/shk.c

Global Function costly_gold()

void costly_gold ( xchar x, xchar y, long amount )
Prototyped in: include/extern.h
Calls: You()src/pline.c
  Your()src/pline.c
  costly_spot()src/shk.c
  in_rooms()src/hack.c
  shkname()src/shk.c
  shop_keeper()src/shk.c
Called by: addtobill()src/shk.c
  kick_object()src/dokick.c
  pickup_object()src/pickup.c

Global Function costly_spot()

boolean costly_spot ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: in_rooms()src/hack.c
  inhishop()src/shk.c
  inside_shop()src/shk.c
  shop_keeper()src/shk.c
Called by: breakobj()src/dothrow.c
  check_shop_obj()src/dothrow.c
  costly_gold()src/shk.c
  forcelock()src/lock.c
  get_wet()src/potion.c
  impact_drop()src/dokick.c
  in_container()src/pickup.c
  kick_object()src/dokick.c
  light_cocktail()src/apply.c
  out_container()src/pickup.c
  pick_obj()src/pickup.c
  sellobj()src/shk.c
  ship_object()src/dokick.c
  shk_owns()src/shk.c
  shop_object()src/shk.c
  touchfood()src/eat.c
  use_container()src/pickup.c
  use_lamp()src/apply.c
  use_tinning_kit()src/apply.c
  useupf()src/invent.c
References Variables: levelsrc/decl.c

Global Function delete_contents()

void delete_contents ( struct obj* obj )
Prototyped in: include/extern.h
Calls: obfree()src/shk.c
  obj_extract_self()src/mkobj.c
Called by: in_container()src/pickup.c
  obfree()src/shk.c
  readobjnam()src/objnam.c

Global Function doinvbill()

int doinvbill ( int mode )
Prototyped in: include/extern.h
Calls: bp_to_obj()src/shk.c
  impossible()src/pline.c
  inhishop()src/shk.c
  shop_keeper()src/shk.c
  xprname()src/invent.c
Called by: dotypeinv()src/invent.c
References Variables: usrc/decl.c
  windowprocs

Global Function dopay()

int dopay ( void )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  There()src/pline.c
  You()src/pline.c
  You_cant()src/pline.c
  Your()src/pline.c
  bot()src/botl.c
  bp_to_obj()src/shk.c
  cheapest_item()src/shk.c
  dist2()src/hacklib.c
  dopayobj()src/shk.c
  getpos()src/do_name.c
  impossible()src/pline.c
  inhishop()src/shk.c
  make_happy_shk()src/shk.c
  mon_nam()src/do_name.c
  next_shkp()src/shk.c
  pay()src/shk.c
  pline()src/pline.c
  pronoun_gender()src/mondata.c
  rn2()src/rnd.c
  s_suffix()src/hacklib.c
  setpaid()src/shk.c
  shkname()src/shk.c
  verbalize()src/pline.c
  x_monnam()src/do_name.c
  hidden_gold(), sprintf(), strcat(), strncmp(), worm_known()
Used in:  src/cmd.c
References Variables: flagssrc/decl.c
  hesrc/decl.c
  himsrc/decl.c
  hissrc/decl.c
  levelsrc/decl.c
  monssrc/monst.c
  multisrc/decl.c
  no_moneysrc/shk.c
  not_enough_moneysrc/shk.c
  plnamesrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  yncharssrc/decl.c
  youmonstsrc/decl.c
  shtypes, windowprocs

Global Function find_oid()

struct obj* find_oid ( unsigned id )
Prototyped in: include/extern.h
Calls: o_on()src/invent.c
Called by: bp_to_obj()src/shk.c
  relink_light_sources()src/light.c
References Variables: inventsrc/decl.c
  levelsrc/decl.c
  migrating_monssrc/decl.c
  migrating_objssrc/decl.c
  mydogssrc/decl.c

Global Function finish_paybill()

void finish_paybill ( void )
Prototyped in: include/extern.h
Calls: curse()src/mkobj.c
  obj_extract_self()src/mkobj.c
  place_object()src/mkobj.c
  rn2()src/rnd.c
Called by: done()src/end.c
References Variables: inventsrc/decl.c
  repo_locationsrc/shk.c

Global Function home_shk()

void home_shk ( struct monst* shkp, boolean killkops )
Prototyped in: include/extern.h
Calls: kops_gone()src/shk.c
  mnearto()src/mon.c
  pacify_guards()src/mon.c
Called by: inherits()src/shk.c
  make_happy_shk()src/shk.c
  pay_for_damage()src/shk.c
References Variables: levelsrc/decl.c

Global Function hot_pursuit()

void hot_pursuit ( struct monst* shkp )
Prototyped in: include/extern.h
Calls: rile_shk()src/shk.c
Called by: impact_drop()src/dokick.c
  make_angry_shk()src/shk.c
  pay_for_damage()src/shk.c
  stolen_value()src/shk.c
  throwit()src/dothrow.c
  u_left_shop()src/shk.c

Global Function inhishop()

int inhishop ( struct monst* mtmp )
Prototyped in: include/extern.h
Calls: in_rooms()src/hack.c
  on_level()src/dungeon.c
  strchr()
Called by: add_one_tobill()src/shk.c
  addtobill()src/shk.c
  block_door()src/shk.c
  block_entry()src/shk.c
  check_unpaid_usage()src/shk.c
  cost_per_charge()src/shk.c
  costly_spot()src/shk.c
  doinvbill()src/shk.c
  dopay()src/shk.c
  find_defensive()src/muse.c
  inherits()src/shk.c
  make_happy_shk()src/shk.c
  merge_choice()src/invent.c
  move_special()src/priest.c
  mpickstuff()src/mon.c
  pay_for_damage()src/shk.c
  paybill()src/shk.c
  replshk()src/shk.c
  restdamage()src/restore.c
  sellobj()src/shk.c
  shk_move()src/shk.c
  shkcatch()src/shk.c
  shop_object()src/shk.c
  shopdig()src/shk.c
  splitbill()src/shk.c
  stolen_value()src/shk.c
  tended_shop()src/shk.c
  u_entered_shop()src/shk.c
  u_left_shop()src/shk.c
  use_defensive()src/muse.c
References Variables: usrc/decl.c

Global Function inside_shop()

char inside_shop ( xchar x, xchar y )
Prototyped in: include/extern.h
Called by: breakobj()src/dothrow.c
  costly_spot()src/shk.c
  kick_object()src/dokick.c
  merge_choice()src/invent.c
  price_quote()src/shk.c
  remove_damage()src/shk.c
  repair_damage()src/shk.c
  shk_owns()src/shk.c
  shkcatch()src/shk.c
  shopper_financial_report()src/shk.c
  throwit()src/dothrow.c
  u_entered_shop()src/shk.c
References Variables: levelsrc/decl.c
  roomssrc/decl.c

Global Function is_fshk()

boolean is_fshk ( struct monst* mtmp )
Prototyped in: include/extern.h
Called by: levl_follower()src/mondata.c

Global Function make_angry_shk()

void make_angry_shk ( struct monst* shkp, xchar ox, xchar oy )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  addupbill()src/shk.c
  hot_pursuit()src/shk.c
  pline()src/pline.c
  setpaid()src/shk.c
Called by: breakobj()src/dothrow.c
  kick_object()src/dokick.c
References Variables: viz_arraysrc/decl.c

Global Function make_happy_shk()

void make_happy_shk ( struct monst* shkp, boolean silentkops )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  adjalign()src/attrib.c
  angry_shk_exists()src/shk.c
  dist2()src/hacklib.c
  home_shk()src/shk.c
  inhishop()src/shk.c
  kops_gone()src/shk.c
  ledger_no()src/dungeon.c
  migrate_to_level()src/dog.c
  mon_nam()src/do_name.c
  on_level()src/dungeon.c
  pacify_guards()src/mon.c
  pacify_shk()src/shk.c
  pline()src/pline.c
  sgn()src/hacklib.c
  strcpy(), worm_known()
Called by: dopay()src/shk.c
  ghitm()src/dokick.c
  seffects()src/read.c
References Variables: flagssrc/decl.c
  monssrc/monst.c
  usrc/decl.c
  ublindfsrc/decl.c
  urolesrc/role.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c

Global Function obfree()

void obfree ( struct obj* obj, struct obj* merge )
Prototyped in: include/extern.h
Calls: add_to_billobjs()src/shk.c
  dealloc_obj()src/mkobj.c
  delete_contents()src/shk.c
  food_disappears()src/eat.c
  impossible()src/pline.c
  next_shkp()src/shk.c
  o_unleash()src/apply.c
  onbill()src/shk.c
  shop_keeper()src/shk.c
Called by: arti_invoke()src/artifact.c
  artifact_hit()src/artifact.c
  boulder_hits_pool()src/do.c
  bury_an_obj()src/dig.c
  canletgo()src/do.c
  delete_contents()src/shk.c
  delobj()src/invent.c
  discard_minvent()src/mkobj.c
  dodip()src/potion.c
  done()src/end.c
  drinksink()src/fountain.c
  drop_throw()src/mthrowu.c
  fig_transform()src/apply.c
  flooreffects()src/do.c
  forcelock()src/lock.c
  kick_object()src/dokick.c
  merged()src/invent.c
  mkinvpos()src/mklev.c
  potionhit()src/potion.c
  readobjnam()src/objnam.c
  repair_damage()src/shk.c
  rot_organic()src/dig.c
  set_mimic_sym()src/makemon.c
  thitmonst()src/dothrow.c
  use_container()src/pickup.c
  useupall()src/invent.c
References Variables: levelsrc/decl.c
  usrc/decl.c

Global Function pay_for_damage()

void pay_for_damage ( const char* dmgstr )
Prototyped in: include/extern.h
Calls: You_hear()src/pline.c
  Your()src/pline.c
  adjalign()src/attrib.c
  check_credit()src/shk.c
  dist2()src/hacklib.c
  home_shk()src/shk.c
  hot_pursuit()src/shk.c
  in_rooms()src/hack.c
  inhishop()src/shk.c
  mnearto()src/mon.c
  mnexto()src/mon.c
  pacify_shk()src/shk.c
  pline()src/pline.c
  rn2()src/rnd.c
  sgn()src/hacklib.c
  shkname()src/shk.c
  shop_keeper()src/shk.c
  um_dist()src/apply.c
  verbalize()src/pline.c
  sleep(), sprintf(), strcmp(), strcpy(), strncpy()
Called by: dig()src/dig.c
  digactualhole()src/dig.c
  dokick()src/dokick.c
  explode()src/explode.c
  still_chewing()src/hack.c
  zap_dig()src/dig.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  monssrc/monst.c
  monstermovessrc/decl.c
  plnamesrc/decl.c
  usrc/decl.c
  viz_arraysrc/decl.c
  yncharssrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function paybill()

boolean paybill ( boolean croaked )
Prototyped in: include/extern.h
Calls: inherits()src/shk.c
  inhishop()src/shk.c
  mongone()src/mon.c
  next_shkp()src/shk.c
  on_level()src/dungeon.c
  shop_keeper()src/shk.c
Called by: done()src/end.c
References Variables: levelsrc/decl.c
  repo_locationsrc/shk.c
  usrc/decl.c

Global Function picked_container()

void picked_container ( struct obj* obj )
Prototyped in: include/extern.h
Calls: picked_container()src/shk.c
Called by: addtobill()src/shk.c
  impact_drop()src/dokick.c
  keepdogs()src/dog.c
  migrate_to_level()src/dog.c
  picked_container()src/shk.c
  ship_object()src/dokick.c

Global Function price_quote()

void price_quote ( struct obj* first_obj )
Prototyped in: include/extern.h
Calls: contained_cost()src/shk.c
  doname()src/objnam.c
  get_cost()src/shk.c
  inside_shop()src/shk.c
  pline()src/pline.c
  shk_embellish()src/shk.c
  shop_keeper()src/shk.c
  sprintf(), strcpy()
References Variables: usrc/decl.c
  uballsrc/decl.c
  uchainsrc/decl.c
  windowprocs

Global Function repair_damage()

int repair_damage ( struct monst* shkp, struct damage* tmp_dam, boolean catchup )
Prototyped in: include/extern.h
Calls: inside_shop()src/shk.c
  mksobj()src/mkobj.c
  newsym()src/display.c
  obfree()src/shk.c
  obj_extract_self()src/mkobj.c
  place_object()src/mkobj.c
  placebc()src/ball.c
  remove_object()src/mkobj.c
  rn2()src/rnd.c
  unplacebc()src/ball.c
  verbalize()src/pline.c
  weight()src/mkobj.c
  block_point(), deltrap(), memset(), mpickobj(), t_at()
Called by: remove_damage()src/shk.c
  restdamage()src/restore.c
References Variables: levelsrc/decl.c
  monstermovessrc/decl.c
  usrc/decl.c
  uballsrc/decl.c
  uchainsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c

Global Function replshk()

void replshk ( struct monst* mtmp, struct monst* mtmp2 )
Prototyped in: include/extern.h
Calls: inhishop()src/shk.c
Called by: replmon()src/mon.c
References Variables: roomssrc/decl.c
  usrc/decl.c

Global Function restshk()

void restshk ( struct monst* shkp, boolean ghostly )
Prototyped in: include/extern.h
Calls: assign_level()src/dungeon.c
  pacify_shk()src/shk.c
  strncmpi()src/hacklib.c
Called by: restmonchn()src/restore.c
References Variables: plnamesrc/decl.c
  usrc/decl.c

Global Function same_price()

boolean same_price ( struct obj* obj1, struct obj* obj2 )
Prototyped in: include/extern.h
Calls: impossible()src/pline.c
  next_shkp()src/shk.c
  onbill()src/shk.c
Called by: mergable()src/invent.c
References Variables: levelsrc/decl.c

Global Function sellobj()

void sellobj ( struct obj* obj, xchar x, xchar y )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  Your()src/pline.c
  contained_cost()src/shk.c
  contained_gold()src/shk.c
  costly_spot()src/shk.c
  count_unpaid()src/invent.c
  doname()src/objnam.c
  dropped_container()src/shk.c
  impossible()src/pline.c
  in_rooms()src/hack.c
  inhishop()src/shk.c
  pay()src/shk.c
  pline()src/pline.c
  rn2()src/rnd.c
  set_cost()src/shk.c
  shk_names_obj()src/shk.c
  shop_keeper()src/shk.c
  sub_one_frombill()src/shk.c
  subfrombill()src/shk.c
  verbalize()src/pline.c
  xname()src/objnam.c
  saleable(), sprintf()
Called by: check_shop_obj()src/dothrow.c
  dropy()src/do.c
  in_container()src/pickup.c
  throw_gold()src/dothrow.c
References Variables: objectssrc/objects.c
  sell_responsesrc/shk.c
  sell_voluntarilysrc/shk.c
  usrc/decl.c
  ynaqcharssrc/decl.c
  ynqcharssrc/decl.c
  windowprocs

Global Function sellobj_state()

void sellobj_state ( boolean deliberate )
Prototyped in: include/extern.h
Called by: doddrop()src/do.c
  dodrop()src/do.c
  in_container()src/pickup.c
References Variables: sell_responsesrc/shk.c
  sell_voluntarilysrc/shk.c

Global Function set_residency()

void set_residency ( struct monst* shkp, boolean zero_out )
Prototyped in: include/extern.h
Calls: on_level()src/dungeon.c
Called by: getlev()src/restore.c
  keepdogs()src/dog.c
  migrate_to_level()src/dog.c
  mon_arrive()src/dog.c
References Variables: roomssrc/decl.c
  usrc/decl.c

Global Function shk_chat()

void shk_chat ( struct monst* shkp )
Prototyped in: include/extern.h
Calls: Hello()src/role.c
  addupbill()src/shk.c
  pline()src/pline.c
  rn2()src/rnd.c
  shkname()src/shk.c
  verbalize()src/pline.c
  strcmp(), strncmp()
References Variables: Izchak_speakssrc/shk.c
  hesrc/decl.c
  himsrc/decl.c
  plnamesrc/decl.c

Global Function shk_move()

int shk_move ( struct monst* shkp )
Prototyped in: include/extern.h
Calls: Hello()src/role.c
  Monnam()src/do_name.c
  Your()src/pline.c
  carrying()src/invent.c
  dist2()src/hacklib.c
  holetime()src/dig.c
  inhishop()src/shk.c
  mattacku()src/mhitu.c
  mon_nam()src/do_name.c
  move_special()src/priest.c
  online2()src/hacklib.c
  pline()src/pline.c
  remove_damage()src/shk.c
  rile_shk()src/shk.c
  rn2()src/rnd.c
  sobj_at()src/invent.c
  verbalize()src/pline.c
  resist(), strncmp()
Called by: m_move()src/monmove.c
References Variables: followmsgsrc/shk.c
  monssrc/monst.c
  movessrc/decl.c
  plnamesrc/decl.c
  usrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c

Global Function shk_your()

char* shk_your ( char* buf, struct obj* obj )
Prototyped in: include/extern.h
Calls: mon_owns()src/shk.c
  shk_owns()src/shk.c
  strcpy()
Called by: Shk_Your()src/shk.c
  light_cocktail()src/apply.c
  use_trap()src/apply.c
  yname()src/objnam.c

Global Function shkcatch()

int shkcatch ( struct obj* obj, xchar x, xchar y )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  dist2()src/hacklib.c
  inhishop()src/shk.c
  inside_shop()src/shk.c
  map_invisible()src/display.c
  mnearto()src/mon.c
  pline()src/pline.c
  shop_keeper()src/shk.c
  subfrombill()src/shk.c
  the()src/objnam.c
  verbalize()src/pline.c
  xname()src/objnam.c
  mpickobj(), worm_known()
References Variables: flagssrc/decl.c
  monssrc/monst.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function shkgone()

void shkgone ( struct monst* mtmp )
Prototyped in: include/extern.h
Calls: on_level()src/dungeon.c
  remove_damage()src/shk.c
  search_special()src/mkroom.c
  setpaid()src/shk.c
Called by: m_detach()src/mon.c
References Variables: levelsrc/decl.c
  roomssrc/decl.c
  usrc/decl.c

Global Function shkname()

char* shkname ( struct monst* mtmp )
Prototyped in: include/extern.h
Called by: block_door()src/shk.c
  block_entry()src/shk.c
  costly_gold()src/shk.c
  done_in_by()src/end.c
  dopay()src/shk.c
  inherits()src/shk.c
  pay_for_damage()src/shk.c
  shk_chat()src/shk.c
  shk_owns()src/shk.c
  shopdig()src/shk.c
  shopper_financial_report()src/shk.c
  u_entered_shop()src/shk.c
  x_monnam()src/do_name.c

Global Function shop_keeper()

struct monst* shop_keeper ( char rmno )
Prototyped in: include/extern.h
Calls: pacify_shk()src/shk.c
  rile_shk()src/shk.c
Called by: add_damage()src/shk.c
  add_one_tobill()src/shk.c
  addtobill()src/shk.c
  bill_dummy_object()src/mkobj.c
  block_door()src/shk.c
  block_entry()src/shk.c
  breakobj()src/dothrow.c
  check_shop_obj()src/dothrow.c
  check_unpaid_usage()src/shk.c
  costly_gold()src/shk.c
  costly_spot()src/shk.c
  doinvbill()src/shk.c
  forcelock()src/lock.c
  impact_drop()src/dokick.c
  in_container()src/pickup.c
  kick_object()src/dokick.c
  merge_choice()src/invent.c
  obfree()src/shk.c
  out_container()src/pickup.c
  pay_for_damage()src/shk.c
  paybill()src/shk.c
  potionhit()src/potion.c
  price_quote()src/shk.c
  restdamage()src/restore.c
  sellobj()src/shk.c
  ship_object()src/dokick.c
  shk_owns()src/shk.c
  shkcatch()src/shk.c
  shop_object()src/shk.c
  shopdig()src/shk.c
  shopper_financial_report()src/shk.c
  splitbill()src/shk.c
  stolen_value()src/shk.c
  u_entered_shop()src/shk.c
  u_left_shop()src/shk.c
  use_container()src/pickup.c
References Variables: roomssrc/decl.c

Global Function shop_object()

struct obj* shop_object ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: costly_spot()src/shk.c
  in_rooms()src/hack.c
  inhishop()src/shk.c
  shop_keeper()src/shk.c
References Variables: levelsrc/decl.c

Global Function shopdig()

void shopdig ( int fall )
Prototyped in: include/extern.h
Calls: You_feel()src/pline.c
  add_to_minv()src/mkobj.c
  adjalign()src/attrib.c
  dist2()src/hacklib.c
  freeinv()src/invent.c
  inhishop()src/shk.c
  mnexto()src/mon.c
  pline()src/pline.c
  rile_shk()src/shk.c
  sgn()src/hacklib.c
  shkname()src/shk.c
  shop_keeper()src/shk.c
  subfrombill()src/shk.c
  um_dist()src/apply.c
  verbalize()src/pline.c
Called by: digactualhole()src/dig.c
  use_pick_axe()src/dig.c
References Variables: flagssrc/decl.c
  inventsrc/decl.c
  usrc/decl.c
  urolesrc/role.c

Global Function shopper_financial_report()

void shopper_financial_report ( void )
Prototyped in: include/extern.h
Calls: You()src/pline.c
  inside_shop()src/shk.c
  next_shkp()src/shk.c
  s_suffix()src/hacklib.c
  shkname()src/shk.c
  shop_debt()src/shk.c
  shop_keeper()src/shk.c
Called by: doprgold()src/invent.c
References Variables: levelsrc/decl.c
  usrc/decl.c
  shtypes

Global Function splitbill()

void splitbill ( struct obj* obj, struct obj* otmp )
Prototyped in: include/extern.h
Calls: impossible()src/pline.c
  inhishop()src/shk.c
  onbill()src/shk.c
  shop_keeper()src/shk.c
Called by: splitobj()src/mkobj.c
References Variables: usrc/decl.c

Global Function stolen_value()

long stolen_value ( struct obj* obj, xchar x, xchar y, boolean peaceful, boolean silent )
Prototyped in: include/extern.h
Calls: Monnam()src/do_name.c
  Norep()src/pline.c
  You()src/pline.c
  angry_guards()src/mon.c
  check_credit()src/shk.c
  contained_gold()src/shk.c
  count_unpaid()src/invent.c
  get_cost()src/shk.c
  hot_pursuit()src/shk.c
  in_rooms()src/hack.c
  inhishop()src/shk.c
  mon_nam()src/do_name.c
  shop_keeper()src/shk.c
  stolen_container()src/shk.c
  saleable(), strncpy()
Called by: breakobj()src/dothrow.c
  check_shop_obj()src/dothrow.c
  forcelock()src/lock.c
  impact_drop()src/dokick.c
  in_container()src/pickup.c
  kick_object()src/dokick.c
  potionhit()src/potion.c
  ship_object()src/dokick.c
  use_container()src/pickup.c
  useupf()src/invent.c
References Variables: plnamesrc/decl.c
  viz_arraysrc/decl.c

Global Function subfrombill()

void subfrombill ( struct obj* obj, struct monst* shkp )
Prototyped in: include/extern.h
Calls: sub_one_frombill()src/shk.c
  subfrombill()src/shk.c
Called by: bill_dummy_object()src/mkobj.c
  check_shop_obj()src/dothrow.c
  potionhit()src/potion.c
  sellobj()src/shk.c
  ship_object()src/dokick.c
  shkcatch()src/shk.c
  shopdig()src/shk.c
  subfrombill()src/shk.c

Global Function tended_shop()

boolean tended_shop ( struct mkroom* sroom )
Prototyped in: include/extern.h
Calls: inhishop()src/shk.c

Global Function u_entered_shop()

void u_entered_shop ( char* enterstring )
Prototyped in: include/extern.h
Calls: Hello()src/role.c
  carrying()src/invent.c
  dochug()src/monmove.c
  in_rooms()src/hack.c
  inhishop()src/shk.c
  inside_shop()src/shk.c
  pacify_shk()src/shk.c
  pline()src/pline.c
  s_suffix()src/hacklib.c
  shkname()src/shk.c
  shop_keeper()src/shk.c
  sobj_at()src/invent.c
  strncmpi()src/hacklib.c
  verbalize()src/pline.c
  y_monnam()src/do_name.c
  strchr(), strcpy(), strncpy()
Called by: check_special_room()src/hack.c
References Variables: monssrc/monst.c
  plnamesrc/decl.c
  roomssrc/decl.c
  usrc/decl.c
  youmonstsrc/decl.c
  shtypes

Global Function u_left_shop()

void u_left_shop ( char* leavestring, boolean newlev )
Prototyped in: include/extern.h
Calls: You()src/pline.c
  Your()src/pline.c
  addupbill()src/shk.c
  adjalign()src/attrib.c
  call_kops()src/shk.c
  hot_pursuit()src/shk.c
  inhishop()src/shk.c
  setpaid()src/shk.c
  sgn()src/hacklib.c
  shop_keeper()src/shk.c
  verbalize()src/pline.c
Called by: check_special_room()src/hack.c
References Variables: levelsrc/decl.c
  plnamesrc/decl.c
  usrc/decl.c
  urolesrc/role.c

Global Function unpaid_cost()

long unpaid_cost ( struct obj* unp_obj )
Prototyped in: include/extern.h
Calls: impossible()src/pline.c
  next_shkp()src/shk.c
  onbill()src/shk.c
Called by: dounpaid()src/invent.c
References Variables: levelsrc/decl.c

Local Function add_one_tobill()

static void add_one_tobill ( struct obj* obj, boolean dummy )
Prototyped in: src/shk.c
Calls: You()src/pline.c
  add_to_billobjs()src/shk.c
  get_cost()src/shk.c
  inhishop()src/shk.c
  onbill()src/shk.c
  shop_keeper()src/shk.c
Called by: addtobill()src/shk.c
  bill_box_content()src/shk.c
References Variables: usrc/decl.c

Local Function add_to_billobjs()

static void add_to_billobjs ( struct obj* obj )
Prototyped in: src/shk.c
Calls: panic()src/end.c
Called by: add_one_tobill()src/shk.c
  obfree()src/shk.c
  sub_one_frombill()src/shk.c
References Variables: billobjssrc/decl.c

Local Function addupbill()

static long addupbill ( struct monst* shkp )
Prototyped in: src/shk.c
Called by: inherits()src/shk.c
  make_angry_shk()src/shk.c
  shk_chat()src/shk.c
  u_left_shop()src/shk.c

Local Function angry_shk_exists()

static boolean angry_shk_exists ( void )
Prototyped in: src/shk.c
Calls: next_shkp()src/shk.c
Called by: make_happy_shk()src/shk.c
References Variables: levelsrc/decl.c

Local Function bill_box_content()

static void bill_box_content ( struct obj* obj, boolean ininv, boolean dummy, struct monst* shkp )
Prototyped in: src/shk.c
Calls: add_one_tobill()src/shk.c
  bill_box_content()src/shk.c
Called by: addtobill()src/shk.c
  bill_box_content()src/shk.c

Local Function bp_to_obj()

static struct obj* bp_to_obj ( struct bill_x* bp )
Prototyped in: src/shk.c
Calls: find_oid()src/shk.c
  o_on()src/invent.c
Called by: doinvbill()src/shk.c
  dopay()src/shk.c
References Variables: billobjssrc/decl.c

Local Function call_kops()

static void call_kops ( struct monst* shkp, boolean nearshop )
Prototyped in: src/shk.c
Calls: angry_guards()src/mon.c
  makekops()src/shk.c
  pline()src/pline.c
  pline_The()src/pline.c
Called by: u_left_shop()src/shk.c
References Variables: dnstairsrc/decl.c
  flagssrc/decl.c
  mvitalssrc/decl.c
  usrc/decl.c

Local Function cheapest_item()

static long cheapest_item ( struct monst* shkp )
Prototyped in: src/shk.c
Called by: dopay()src/shk.c

Local Function check_credit()

static long check_credit ( long tmp, struct monst* shkp )
Prototyped in: src/shk.c
Calls: pline_The()src/pline.c
Called by: pay()src/shk.c
  pay_for_damage()src/shk.c
  stolen_value()src/shk.c

Local Function clear_unpaid()

static void clear_unpaid ( struct obj* list )
Prototyped in: src/shk.c
Calls: clear_unpaid()src/shk.c
Called by: clear_unpaid()src/shk.c
  setpaid()src/shk.c

Local Function cost_per_charge()

static long cost_per_charge ( struct monst* shkp, struct obj* otmp, boolean altusage )
Prototyped in: src/shk.c
Calls: get_cost()src/shk.c
  inhishop()src/shk.c
Called by: check_unpaid_usage()src/shk.c
References Variables: objectssrc/objects.c

Local Function dopayobj()

static int dopayobj ( struct monst* shkp, struct bill_x* bp, struct obj** obj_p, int which, boolean itemize )
Prototyped in: src/shk.c
Calls: Doname2()src/objnam.c
  You()src/pline.c
  dealloc_obj()src/mkobj.c
  doname()src/objnam.c
  impossible()src/pline.c
  obj_extract_self()src/mkobj.c
  pay()src/shk.c
  shk_names_obj()src/shk.c
  verbalize()src/pline.c
  xname()src/objnam.c
  hidden_gold(), sprintf()
Called by: dopay()src/shk.c
References Variables: usrc/decl.c
  yncharssrc/decl.c
  windowprocs

Local Function dropped_container()

static void dropped_container ( struct obj* obj, struct monst* shkp, boolean sale )
Prototyped in: src/shk.c
Calls: dropped_container()src/shk.c
  saleable()
Called by: dropped_container()src/shk.c
  sellobj()src/shk.c

Local Function get_cost()

static long get_cost ( struct obj* obj, struct monst* shkp )
Prototyped in: src/shk.c
Calls: acurr()src/attrib.c
  getprice()src/shk.c
Called by: add_one_tobill()src/shk.c
  addtobill()src/shk.c
  contained_cost()src/shk.c
  cost_per_charge()src/shk.c
  price_quote()src/shk.c
  stolen_container()src/shk.c
  stolen_value()src/shk.c
References Variables: objectssrc/objects.c
  usrc/decl.c
  uarmsrc/decl.c
  uarmcsrc/decl.c
  uarmhsrc/decl.c
  uarmusrc/decl.c
  urolesrc/role.c

Local Function getprice()

static long getprice ( struct obj* obj, boolean shk_buying )
Prototyped in: src/shk.c
Called by: get_cost()src/shk.c
  set_cost()src/shk.c
References Variables: objectssrc/objects.c
  usrc/decl.c

Local Function inherits()

static boolean inherits ( struct monst* shkp, int numsk, boolean croaked )
Prototyped in: src/shk.c
Calls: Monnam()src/do_name.c
  addupbill()src/shk.c
  dist2()src/hacklib.c
  home_shk()src/shk.c
  inhishop()src/shk.c
  pacify_shk()src/shk.c
  pline()src/pline.c
  rn2()src/rnd.c
  set_repo_loc()src/shk.c
  setpaid()src/shk.c
  shkname()src/shk.c
  strncmp()
Called by: paybill()src/shk.c
References Variables: flagssrc/decl.c
  inventsrc/decl.c
  plnamesrc/decl.c
  usrc/decl.c
  viz_arraysrc/decl.c

Local Function kops_gone()

static void kops_gone ( boolean silent )
Prototyped in: src/shk.c
Calls: dist2()src/hacklib.c
  mongone()src/mon.c
  pline_The()src/pline.c
  worm_known()
Called by: home_shk()src/shk.c
  make_happy_shk()src/shk.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  monssrc/monst.c
  usrc/decl.c
  ublindfsrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c

Local Function makekops()

static void makekops ( coord* mm )
Prototyped in: src/shk.c
Calls: depth()src/dungeon.c
  makemon()src/makemon.c
  rnd()src/rnd.c
  abs(), enexto()
Called by: call_kops()src/shk.c
References Variables: monssrc/monst.c
  mvitalssrc/decl.c
  usrc/decl.c

Local Function mon_owns()

static char* mon_owns ( char* buf, struct obj* obj )
Prototyped in: src/shk.c
Calls: mon_nam()src/do_name.c
  s_suffix()src/hacklib.c
  strcpy()
Called by: shk_your()src/shk.c

Local Function next_shkp()

static struct monst* next_shkp ( struct monst* shkp, boolean withbill )
Prototyped in: src/shk.c
Calls: pacify_shk()src/shk.c
  rile_shk()src/shk.c
Called by: angry_shk_exists()src/shk.c
  dopay()src/shk.c
  obfree()src/shk.c
  paybill()src/shk.c
  same_price()src/shk.c
  shopper_financial_report()src/shk.c
  unpaid_cost()src/shk.c

Local Function onbill()

static struct bill_x* onbill ( struct obj* obj, struct monst* shkp, boolean silent )
Prototyped in: src/shk.c
Calls: pline()src/pline.c
Called by: add_one_tobill()src/shk.c
  addtobill()src/shk.c
  obfree()src/shk.c
  same_price()src/shk.c
  splitbill()src/shk.c
  sub_one_frombill()src/shk.c
  unpaid_cost()src/shk.c

Local Function pacify_shk()

static void pacify_shk ( struct monst* shkp )
Prototyped in: src/shk.c
Called by: inherits()src/shk.c
  make_happy_shk()src/shk.c
  next_shkp()src/shk.c
  pay_for_damage()src/shk.c
  restshk()src/shk.c
  shop_keeper()src/shk.c
  u_entered_shop()src/shk.c

Local Function pay()

static void pay ( long tmp, struct monst* shkp )
Prototyped in: src/shk.c
Calls: check_credit()src/shk.c
Called by: dopay()src/shk.c
  dopayobj()src/shk.c
  sellobj()src/shk.c
References Variables: flagssrc/decl.c
  usrc/decl.c

Local Function remove_damage()

static void remove_damage ( struct monst* shkp, boolean croaked )
Prototyped in: src/shk.c
Calls: Norep()src/pline.c
  You_feel()src/pline.c
  closed_door()src/monmove.c
  in_rooms()src/hack.c
  inside_shop()src/shk.c
  picking_at()src/lock.c
  pline()src/pline.c
  pline_The()src/pline.c
  repair_damage()src/shk.c
  rn2()src/rnd.c
  stop_occupation()src/allmain.c
  free(), strchr(), strcpy()
Called by: shk_move()src/shk.c
  shkgone()src/shk.c
References Variables: flagssrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  viz_arraysrc/decl.c

Local Function rile_shk()

static void rile_shk ( struct monst* shkp )
Prototyped in: src/shk.c
Called by: hot_pursuit()src/shk.c
  next_shkp()src/shk.c
  shk_move()src/shk.c
  shop_keeper()src/shk.c
  shopdig()src/shk.c

Local Function set_cost()

static long set_cost ( struct obj* obj, struct monst* shkp )
Prototyped in: src/shk.c
Calls: getprice()src/shk.c
  rn2()src/rnd.c
Called by: contained_cost()src/shk.c
  sellobj()src/shk.c
References Variables: objectssrc/objects.c
  usrc/decl.c
  uarmsrc/decl.c
  uarmcsrc/decl.c
  uarmhsrc/decl.c
  uarmusrc/decl.c
  urolesrc/role.c

Local Function set_repo_loc()

static void set_repo_loc ( struct eshk* eshkp )
Prototyped in: src/shk.c
Calls: sgn()src/hacklib.c
Called by: inherits()src/shk.c
References Variables: levelsrc/decl.c
  repo_locationsrc/shk.c
  usrc/decl.c

Local Function setpaid()

static void setpaid ( struct monst* shkp )
Prototyped in: src/shk.c
Calls: clear_unpaid()src/shk.c
  dealloc_obj()src/mkobj.c
  obj_extract_self()src/mkobj.c
Called by: dopay()src/shk.c
  inherits()src/shk.c
  make_angry_shk()src/shk.c
  shkgone()src/shk.c
  u_left_shop()src/shk.c
References Variables: billobjssrc/decl.c
  inventsrc/decl.c
  levelsrc/decl.c
  migrating_monssrc/decl.c

Local Function shk_embellish()

static const char* shk_embellish ( struct obj* itm, long cost )
Prototyped in: src/shk.c
Calls: rn2()src/rnd.c
Called by: price_quote()src/shk.c
References Variables: objectssrc/objects.c

Local Function shk_names_obj()

static void shk_names_obj ( struct monst* shkp, struct obj* obj, const char* fmt, long amt, const char* arg )
Prototyped in: src/shk.c
Calls: You()src/pline.c
  discover_object()src/o_init.c
  doname()src/objnam.c
  highc()src/hacklib.c
  pline()src/pline.c
  saleable(), sprintf()
Called by: dopayobj()src/shk.c
  sellobj()src/shk.c
References Variables: objectssrc/objects.c

Local Function shk_owns()

static char* shk_owns ( char* buf, struct obj* obj )
Prototyped in: src/shk.c
Calls: costly_spot()src/shk.c
  inside_shop()src/shk.c
  s_suffix()src/hacklib.c
  shkname()src/shk.c
  shop_keeper()src/shk.c
  get_obj_location(), strcpy()
Called by: shk_your()src/shk.c

Local Function shop_debt()

static long shop_debt ( struct eshk* eshkp )
Prototyped in: src/shk.c
Called by: shopper_financial_report()src/shk.c

Local Function stolen_container()

static long stolen_container ( struct obj* obj, struct monst* shkp, long price, boolean ininv )
Prototyped in: src/shk.c
Calls: get_cost()src/shk.c
  stolen_container()src/shk.c
Called by: stolen_container()src/shk.c
  stolen_value()src/shk.c
References Variables: objectssrc/objects.c

Local Function sub_one_frombill()

static void sub_one_frombill ( struct obj* obj, struct monst* shkp )
Prototyped in: src/shk.c
Calls: add_to_billobjs()src/shk.c
  alloc()src/alloc.c
  impossible()src/pline.c
  onbill()src/shk.c
Called by: sellobj()src/shk.c
  subfrombill()src/shk.c
References Variables: flagssrc/decl.c