File src/pray.c


Included Files


Preprocessor definitions

#define PIOUS 20

#define DEVOUT 14

#define FERVENT 9

#define STRIDENT 4

#define TROUBLE_STONED 12

#define TROUBLE_SLIMED 11

#define TROUBLE_STRANGLED 10

#define TROUBLE_LAVA 9

#define TROUBLE_SICK 8

#define TROUBLE_STARVING 7

#define TROUBLE_HIT 6

#define TROUBLE_LYCANTHROPE 5

#define TROUBLE_COLLAPSING 4

#define TROUBLE_STUCK_IN_WALL 3

#define TROUBLE_CURSED_BLINDFOLD 2

#define TROUBLE_CURSED_LEVITATION 1

#define TROUBLE_PUNISHED 1

#define TROUBLE_CURSED_ITEMS 2

#define TROUBLE_BLIND 3

#define TROUBLE_POISONED 4

#define TROUBLE_WOUNDED_LEGS 5

#define TROUBLE_HUNGRY 6

#define TROUBLE_STUNNED 7

#define TROUBLE_CONFUSED 8

#define TROUBLE_HALLUCINATION 9

#define ugod_is_angry

#define on_altar

#define on_shrine

#define a_align( x, y )

#define SATIATED 0

#define NOT_HUNGRY 1

#define HUNGRY 2

#define WEAK 3

#define FAINTING 4

#define FAINTED 5

#define STARVED 6

#define MAXVALUE 24


Global Variable leftglow

const char leftglow[]
Visible in:  src/pray.c
Used in: fix_worst_trouble()src/pray.c

Global Variable rightglow

const char rightglow[]
Visible in:  src/pray.c
Used in: fix_worst_trouble()src/pray.c

External Variables

monstr
extern const int monstr[]
Defined in: src/monstr.c

Local Variables

Moloch
static const char* Moloch
Used in: align_gname()
  halu_gname()

godvoices
static const char* godvoices[]
Used in: godvoice()

p_aligntyp
static aligntyp p_aligntyp
Used in: can_pray()
  pleased()
  prayer_done()

p_trouble
static int p_trouble
Used in: can_pray()
  pleased()

p_type
static int p_type
Used in: can_pray()
  dopray()
  prayer_done()

sacrifice_types
static const char sacrifice_types[]
Used in: dosacrifice()


Global Function a_gname()

const char* a_gname ( void )
Prototyped in: include/extern.h
Calls: a_gname_at()src/pray.c
Called by: dfeature_at()src/invent.c
  dosacrifice()src/pray.c
References Variables: usrc/decl.c

Global Function a_gname_at()

const char* a_gname_at ( xchar x, xchar y )
Prototyped in: include/extern.h
Calls: align_gname()src/pray.c
Called by: a_gname()src/pray.c
References Variables: levelsrc/decl.c

Global Function align_gname()

const char* align_gname ( aligntyp alignment )
Prototyped in: include/extern.h
Calls: impossible()src/pline.c
Called by: a_gname_at()src/pray.c
  altar_wrath()src/pray.c
  angrygods()src/pray.c
  can_pray()src/pray.c
  fry_by_god()src/pray.c
  god_zaps_you()src/pray.c
  godvoice()src/pray.c
  halu_gname()src/pray.c
  minimal_enlightenment()src/cmd.c
  pleased()src/pray.c
  prayer_done()src/pray.c
  summon_minion()src/minion.c
  u_gname()src/pray.c
References Variables: Molochsrc/pray.c
  urole

Global Function align_gtitle()

const char* align_gtitle ( aligntyp alignment )
Prototyped in: include/extern.h
References Variables: urole

Global Function altar_wrath()

void altar_wrath ( int x, int y )
Prototyped in: include/extern.h
Calls: adjattrib()src/attrib.c
  align_gname()src/pray.c
  change_luck()src/attrib.c
  godvoice()src/pray.c
  pline()src/pline.c
  u_gname()src/pray.c
  verbalize()src/pline.c
  strcmp()
Called by: dig()src/dig.c
  doengrave()src/engrave.c
  dokick()src/dokick.c
References Variables: levelsrc/decl.c

Global Function can_pray()

boolean can_pray ( boolean praying )
Prototyped in: include/extern.h
Calls: In_hell()src/dungeon.c
  You()src/pline.c
  align_gname()src/pray.c
  in_trouble()src/pray.c
  pline_The()src/pline.c
  rn2()
Called by: dopray()src/pray.c
  enlightenment()src/cmd.c
References Variables: levelsrc/decl.c
  p_aligntypsrc/pray.c
  p_troublesrc/pray.c
  p_typesrc/pray.c
  usrc/decl.c
  youmonstsrc/decl.c

Global Function dopray()

int dopray ( void )
Prototyped in: include/extern.h
Calls: In_hell()src/dungeon.c
  You()src/pline.c
  can_pray()src/pray.c
  nomul()src/hack.c
Used in:  src/cmd.c
References Functions: prayer_done()src/pray.c
References Variables: afternmvsrc/decl.c
  flagssrc/decl.c
  nomovemsgsrc/decl.c
  p_typesrc/pray.c
  usrc/decl.c
  ublindfsrc/decl.c
  yncharssrc/decl.c
  youmonstsrc/decl.c
  windowprocs

Global Function dosacrifice()

int dosacrifice ( void )
Prototyped in: include/extern.h
Calls: Amulet_off()src/do_wear.c
  In_hell()src/dungeon.c
  You()src/pline.c
  You_feel()src/pline.c
  You_hear()src/pline.c
  a_gname()src/pray.c
  a_monnam()src/do_name.c
  adjalign()src/attrib.c
  adjattrib()src/attrib.c
  align_str()src/pline.c
  an()src/objnam.c
  angrygods()src/pray.c
  body_part()src/polyself.c
  change_luck()src/attrib.c
  consume_offering()src/pray.c
  discover_artifact()src/artifact.c
  dlord()src/minion.c
  dmgtype()src/mondata.c
  done()src/end.c
  dropy()src/do.c
  eaten_stat()src/eat.c
  exercise()src/attrib.c
  feel_cockatrice()src/invent.c
  floorfood()src/eat.c
  get_mtraits()src/mkobj.c
  getobj()src/invent.c
  god_zaps_you()src/pray.c
  gods_upset()src/pray.c
  godvoice()src/pray.c
  hcolor()src/do_name.c
  makemon()src/makemon.c
  makeplural()src/objnam.c
  mk_artifact()src/artifact.c
  nartifact_exist()src/artifact.c
  newsym()src/display.c
  nomul()src/hack.c
  on_level()src/dungeon.c
  peek_at_iced_corpse_age()src/mkobj.c
  pline()src/pline.c
  pline_The()src/pline.c
  sgn()src/hacklib.c
  summon_minion()src/minion.c
  u_gname()src/pray.c
  uncurse()src/mkobj.c
  useup()src/invent.c
  useupf()src/invent.c
  verbalize()src/pline.c
  angry_priest(), findpriest(), p_coaligned(), rn2(), rnd(), rnl(), rnz(), temple_occupied(), unrestrict_weapon_skill(), weapon_type()
Used in:  src/cmd.c
References Variables: WIN_MESSAGEsrc/decl.c
  c_color_namessrc/decl.c
  c_common_stringssrc/decl.c
  dungeon_topologysrc/decl.c
  flagssrc/decl.c
  levelsrc/decl.c
  monssrc/monst.c
  monstermovessrc/decl.c
  monstrsrc/monstr.c
  movessrc/decl.c
  sacrifice_typessrc/pray.c
  usrc/decl.c
  uamulsrc/decl.c
  uarmhsrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c
  urace, windowprocs

Global Function doturn()

int doturn ( void )
Prototyped in: include/extern.h
Calls: In_hell()src/dungeon.c
  You()src/pline.c
  dist2()src/hacklib.c
  exercise()src/attrib.c
  killed()src/mon.c
  nomul()src/hack.c
  pline()src/pline.c
  u_gname()src/pray.c
  aggravate(), resist(), spelleffects()
Used in:  src/cmd.c
References Variables: levelsrc/decl.c
  objectssrc/objects.c
  spl_booksrc/decl.c
  usrc/decl.c
  viz_arraysrc/decl.c
  youmonstsrc/decl.c
  urole

Global Function halu_gname()

const char* halu_gname ( aligntyp alignment )
Prototyped in: include/extern.h
Calls: align_gname()src/pray.c
  dmgtype()src/mondata.c
  randrole(), rn2()
References Variables: Molochsrc/pray.c
  usrc/decl.c
  youmonstsrc/decl.c
  roles

Global Function u_gname()

const char* u_gname ( void )
Prototyped in: include/extern.h
Calls: align_gname()src/pray.c
Called by: altar_wrath()src/pray.c
  dosacrifice()src/pray.c
  doturn()src/pray.c
  enlightenment()src/cmd.c
  pleased()src/pray.c
References Variables: usrc/decl.c

Local Function angrygods()

static void angrygods ( aligntyp resp_god )
Prototyped in: src/pray.c
Calls: An()src/objnam.c
  In_hell()src/dungeon.c
  You_feel()src/pline.c
  adjattrib()src/attrib.c
  align_gname()src/pray.c
  dmgtype()src/mondata.c
  god_zaps_you()src/pray.c
  gods_angry()src/pray.c
  godvoice()src/pray.c
  hcolor()src/do_name.c
  losexp()src/exper.c
  pline()src/pline.c
  resists_magm()src/mondata.c
  summon_minion()src/minion.c
  verbalize()src/pline.c
  punish(), rn2(), rndcurse(), rnz()
Called by: dosacrifice()src/pray.c
  gods_upset()src/pray.c
  prayer_done()src/pray.c
References Variables: c_color_namessrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  uballsrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Local Function blocked_boulder()

static boolean blocked_boulder ( int dx, int dy )
Prototyped in: src/pray.c
Calls: isok()src/cmd.c
  sobj_at()src/invent.c
Called by: in_trouble()src/pray.c
References Variables: levelsrc/decl.c
  usrc/decl.c

Local Function consume_offering()

static void consume_offering ( struct obj* otmp )
Prototyped in: src/pray.c
Calls: Your()src/pline.c
  dmgtype()src/mondata.c
  exercise()src/attrib.c
  useup()src/invent.c
  useupf()src/invent.c
  rn2()
Called by: dosacrifice()src/pray.c
References Variables: usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Local Function fix_worst_trouble()

static void fix_worst_trouble ( int trouble )
Prototyped in: src/pray.c
Calls: You()src/pline.c
  You_feel()src/pline.c
  Your()src/pline.c
  aobjnam()src/objnam.c
  body_part()src/polyself.c
  dmgtype()src/mondata.c
  encumber_msg()src/pickup.c
  hcolor()src/do_name.c
  heal_legs()src/do.c
  impossible()src/pline.c
  init_uhunger()src/eat.c
  losestr()src/attrib.c
  make_blinded()src/potion.c
  make_confused()src/potion.c
  make_hallucinated()src/potion.c
  make_sick()src/potion.c
  make_stunned()src/potion.c
  makeplural()src/objnam.c
  pline()src/pline.c
  pline_The()src/pline.c
  uncurse()src/mkobj.c
  useup()src/invent.c
  rnd(), safe_teleds(), unpunish(), welded(), you_unwere()
Called by: pleased()src/pray.c
References Variables: c_color_namessrc/decl.c
  delayed_killersrc/decl.c
  flagssrc/decl.c
  inventsrc/decl.c
  leftglowsrc/pray.c
  objectssrc/objects.c
  rightglowsrc/pray.c
  usrc/decl.c
  uamulsrc/decl.c
  uarmsrc/decl.c
  uarmcsrc/decl.c
  uarmfsrc/decl.c
  uarmgsrc/decl.c
  uarmhsrc/decl.c
  uarmssrc/decl.c
  uarmusrc/decl.c
  ublindfsrc/decl.c
  uleftsrc/decl.c
  urightsrc/decl.c
  uwepsrc/decl.c
  youmonstsrc/decl.c

Local Function fry_by_god()

static void fry_by_god ( aligntyp resp_god )
Prototyped in: src/pray.c
Calls: You()src/pline.c
  align_gname()src/pray.c
  done()src/end.c
  sprintf()
Called by: god_zaps_you()src/pray.c
References Variables: killersrc/decl.c
  killer_formatsrc/decl.c

Local Function god_zaps_you()

static void god_zaps_you ( aligntyp resp_god )
Prototyped in: src/pray.c
Calls: Monnam()src/do_name.c
  You()src/pline.c
  align_gname()src/pray.c
  destroy_arm()src/do_wear.c
  fry_by_god()src/pray.c
  godvoice()src/pray.c
  mon_nam()src/do_name.c
  on_level()src/dungeon.c
  pline()src/pline.c
  shieldeff()src/display.c
  summon_minion()src/minion.c
  ureflects()src/muse.c
  verbalize()src/pline.c
  xkilled()src/mon.c
Called by: angrygods()src/pray.c
  dosacrifice()src/pray.c
References Variables: c_color_namessrc/decl.c
  dungeon_topologysrc/decl.c
  flagssrc/decl.c
  himsrc/decl.c
  monssrc/monst.c
  usrc/decl.c
  uarmsrc/decl.c
  uarmcsrc/decl.c
  uarmssrc/decl.c
  uarmusrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c

Local Function gods_angry()

static void gods_angry ( aligntyp g_align )
Prototyped in: src/pray.c
Calls: godvoice()src/pray.c
Called by: angrygods()src/pray.c

Local Function gods_upset()

static void gods_upset ( aligntyp g_align )
Prototyped in: src/pray.c
Calls: angrygods()src/pray.c
Called by: dosacrifice()src/pray.c
  prayer_done()src/pray.c
References Variables: usrc/decl.c

Local Function godvoice()

static void godvoice ( aligntyp g_align, const char* words )
Prototyped in: src/pray.c
Calls: align_gname()src/pray.c
  pline_The()src/pline.c
  rn2()
Called by: altar_wrath()src/pray.c
  angrygods()src/pray.c
  dosacrifice()src/pray.c
  god_zaps_you()src/pray.c
  gods_angry()src/pray.c
  pleased()src/pray.c
  prayer_done()src/pray.c
References Variables: godvoicessrc/pray.c

Local Function in_trouble()

static int in_trouble ( void )
Prototyped in: src/pray.c
Calls: blocked_boulder()src/pray.c
  dmgtype()src/mondata.c
  isok()src/cmd.c
  near_capacity()src/hack.c
  welded()
Called by: can_pray()src/pray.c
  pleased()src/pray.c
References Variables: inventsrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  uamulsrc/decl.c
  uarmsrc/decl.c
  uarmcsrc/decl.c
  uarmfsrc/decl.c
  uarmgsrc/decl.c
  uarmhsrc/decl.c
  uarmssrc/decl.c
  uarmusrc/decl.c
  uballsrc/decl.c
  ublindfsrc/decl.c
  uleftsrc/decl.c
  urightsrc/decl.c
  uwepsrc/decl.c
  youmonstsrc/decl.c

Local Function pleased()

static void pleased ( aligntyp g_align )
Prototyped in: src/pray.c
Calls: An()src/objnam.c
  You()src/pline.c
  You_feel()src/pline.c
  You_hear()src/pline.c
  Your()src/pline.c
  adjalign()src/attrib.c
  align_gname()src/pray.c
  an()src/objnam.c
  aobjnam()src/objnam.c
  artiname()src/artifact.c
  bless()src/mkobj.c
  body_part()src/polyself.c
  carrying()src/invent.c
  discover_artifact()src/artifact.c
  dmgtype()src/mondata.c
  dropy()src/do.c
  exist_artifact()src/artifact.c
  fix_worst_trouble()src/pray.c
  godvoice()src/pray.c
  hcolor()src/do_name.c
  impossible()src/pline.c
  in_trouble()src/pray.c
  init_uhunger()src/eat.c
  make_blinded()src/potion.c
  makeplural()src/objnam.c
  mkobj()src/mkobj.c
  mksobj()src/mkobj.c
  oname()src/do_name.c
  place_object()src/mkobj.c
  pline()src/pline.c
  rnd_class()src/objnam.c
  see_monsters()src/display.c
  u_gname()src/pray.c
  uncurse()src/mkobj.c
  verbalize()src/pline.c
  xname()src/objnam.c
  rn2(), rnl(), rnz(), sprintf(), unrestrict_weapon_skill(), weapon_type(), welded()
Called by: prayer_done()src/pray.c
References Variables: basessrc/decl.c
  c_color_namessrc/decl.c
  c_common_stringssrc/decl.c
  flagssrc/decl.c
  inventsrc/decl.c
  levelsrc/decl.c
  objectssrc/objects.c
  p_aligntypsrc/pray.c
  p_troublesrc/pray.c
  spl_booksrc/decl.c
  tunesrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  uwepsrc/decl.c
  youmonstsrc/decl.c
  urole

Local Function prayer_done()

static int prayer_done ( void )
Prototyped in: src/pray.c
Calls: In_hell()src/dungeon.c
  You_feel()src/pline.c
  align_gname()src/pray.c
  angrygods()src/pray.c
  change_luck()src/attrib.c
  exercise()src/attrib.c
  gods_upset()src/pray.c
  godvoice()src/pray.c
  losehp()src/hack.c
  pleased()src/pray.c
  pline()src/pline.c
  rehumanize()src/polyself.c
  water_prayer()src/pray.c
  rnd(), rnl(), rnz()
Used in: dopray()src/pray.c
References Variables: levelsrc/decl.c
  p_aligntypsrc/pray.c
  p_typesrc/pray.c
  usrc/decl.c

Local Function water_prayer()

static boolean water_prayer ( boolean bless_water )
Prototyped in: src/pray.c
Calls: dmgtype()src/mondata.c
  hcolor()src/do_name.c
  pline()src/pline.c
Called by: prayer_done()src/pray.c
References Variables: c_color_namessrc/decl.c
  levelsrc/decl.c
  usrc/decl.c
  ublindfsrc/decl.c
  youmonstsrc/decl.c