File src/artifact.c

FIXME


Included Files


Preprocessor definitions

#define get_artifact( o )

#define FATAL_DAMAGE 9999

#define MB_MAX_DIEROLL 8

#define MB_INDEX_INIT 1

#define MB_INDEX_PROBE 0

#define MB_INDEX_STUN 1

#define MB_INDEX_SCARE 2

#define MB_INDEX_PURGE 3

#define MB_RESIST_ATTACK

#define MB_RESISTED_ATTACK

#define MB_UWEP_ATTACK


External Variables

notonhead
extern boolean notonhead

n_dgns
extern int n_dgns


Local Variables

artilist
static struct artifact artilist[]
Included from include/artilist.h
Used in: arti_invoke()
  arti_speak()
  artifact_exists()
  artifact_hit()
  artifact_name()
  artiname()
  attacks()
  defends()
  disp_artifact_discoveries()
  exist_artifact()
  hack_artifacts()
  mk_artifact()
  protects()
  restrict_name()
  set_artifact_intrinsic()
  spec_ability()
  spec_abon()
  spec_dbon()
  spec_m2()
  touch_artifact()

spec_dbon_applies
static int spec_dbon_applies
Used in: artifact_hit()
  spec_dbon()

artiexist
static boolean artiexist[1+33+1]
Used in: artifact_exists()
  exist_artifact()
  init_artifacts()
  mk_artifact()
  nartifact_exist()
  restore_artifacts()
  save_artifacts()

artidisco
static xchar artidisco[33]
Used in: discover_artifact()
  disp_artifact_discoveries()
  init_artifacts()
  restore_artifacts()
  save_artifacts()
  undiscovered_artifact()

recharge_type
static const char recharge_type[]
Used in: arti_invoke()

invoke_types
static const char invoke_types[]
Used in: doinvoke()


Global Function arti_speak()

void arti_speak ( struct obj* obj )
Prototyped in: include/extern.h
Calls: The(), bcsign(), getrumor(), pline(), verbalize(), xname()
Called by: doapply()src/apply.c
References Variables: artilistsrc/artifact.c

Global Function artifact_exists()

void artifact_exists ( struct obj* otmp, const char* name, boolean mod )
Prototyped in: include/extern.h
Calls: strcmp()
References Variables: artiexistsrc/artifact.c
  artilistsrc/artifact.c

Global Function artifact_hit()

boolean artifact_hit ( struct monst* magr, struct monst* mdef, struct obj* otmp, int* dmgptr, int dieroll )
Prototyped in: include/extern.h
Calls: attacks()src/artifact.c
  spec_ability()src/artifact.c
  spec_dbon()src/artifact.c
  Monnam(), The(), You(), You_feel(), attacktype(), body_part(), cancel_monst(), destroy_mitem(), dist2(), distant_name(), expels(), hcolor(), healup(), impossible(), losexp(), make_confused(), make_stunned(), map_invisible(), mbodypart(), mksobj(), mon_nam(), nomul(), obfree(), pline(), pline_The(), probe_monster(), resist(), resists_magm(), rn2(), rnd(), s_suffix(), shieldeff(), sticks(), worm_known(), xname()
References Functions: xname()
References Variables: artilistsrc/artifact.c
  spec_dbon_appliessrc/artifact.c
  c_color_names, flags, mons, nomovemsg, notonhead, u, ublindf, uwep, viz_array, youmonst

Global Function artifact_name()

const char* artifact_name ( const char* name, short* otyp )
Prototyped in: include/extern.h
Calls: strncmpi()
References Variables: artilistsrc/artifact.c

Global Function artiname()

const char* artiname ( int artinum )
Prototyped in: include/extern.h
Called by: disp_artifact_discoveries()src/artifact.c
References Variables: artilistsrc/artifact.c

Global Function defends()

boolean defends ( int adtyp, struct obj* otmp )
Prototyped in: include/extern.h
Called by: spec_applies()src/artifact.c
References Variables: artilistsrc/artifact.c

Global Function discover_artifact()

void discover_artifact ( xchar m )
Prototyped in: include/extern.h
Calls: impossible()
References Variables: artidiscosrc/artifact.c

Global Function disp_artifact_discoveries()

int disp_artifact_discoveries ( winid tmpwin )
Prototyped in: include/extern.h
Calls: artiname()src/artifact.c
  align_str(), simple_typename(), sprintf()
References Variables: artidiscosrc/artifact.c
  artilistsrc/artifact.c
  windowprocs

Global Function doinvoke()

int doinvoke ( void )
Prototyped in: include/extern.h
Calls: arti_invoke()src/artifact.c
  getobj()
References Variables: invoke_typessrc/artifact.c

Global Function exist_artifact()

boolean exist_artifact ( int otyp, const char* name )
Prototyped in: include/extern.h
Calls: strcmp()
References Variables: artiexistsrc/artifact.c
  artilistsrc/artifact.c

Global Function init_artifacts()

void init_artifacts ( void )
Prototyped in: include/extern.h
Calls: hack_artifacts()src/artifact.c
  memset()
Called by: newgame()src/allmain.c
References Variables: artidiscosrc/artifact.c
  artiexistsrc/artifact.c

Global Function mk_artifact()

struct obj* mk_artifact ( struct obj* otmp, aligntyp alignment )
Prototyped in: include/extern.h
Calls: mksobj(), oname(), rn2()
References Variables: artiexistsrc/artifact.c
  artilistsrc/artifact.c
  mons, objects, u, urace, urole

Global Function nartifact_exist()

int nartifact_exist ( void )
Prototyped in: include/extern.h
References Variables: artiexistsrc/artifact.c

Global Function protects()

boolean protects ( int adtyp, struct obj* otmp )
Prototyped in: include/extern.h
References Variables: artilistsrc/artifact.c

Global Function restore_artifacts()

void restore_artifacts ( int fd )
Prototyped in: include/extern.h
Calls: hack_artifacts()src/artifact.c
  mread()
References Variables: artidiscosrc/artifact.c
  artiexistsrc/artifact.c

Global Function restrict_name()

boolean restrict_name ( struct obj* otmp, const char* name )
Prototyped in: include/extern.h
Calls: strcmp(), strncmpi()
References Variables: artilistsrc/artifact.c

Global Function save_artifacts()

void save_artifacts ( int fd )
Prototyped in: include/extern.h
Calls: bwrite()
References Variables: artidiscosrc/artifact.c
  artiexistsrc/artifact.c

Global Function set_artifact_intrinsic()

void set_artifact_intrinsic ( struct obj* otmp, boolean on, long wp_mask )
Prototyped in: include/extern.h
Calls: arti_invoke()src/artifact.c
  spec_m2()src/artifact.c
  make_hallucinated(), see_monsters()
References Variables: artilistsrc/artifact.c
  flags, invent, restoring, u

Global Function spec_ability()

boolean spec_ability ( struct obj* otmp, unsigned long abil )
Prototyped in: include/extern.h
Called by: artifact_hit()src/artifact.c
References Variables: artilistsrc/artifact.c

Global Function spec_abon()

int spec_abon ( struct obj* otmp, struct monst* mon )
Prototyped in: include/extern.h
Calls: spec_applies()src/artifact.c
  rnd()
References Variables: artilistsrc/artifact.c

Global Function spec_dbon()

int spec_dbon ( struct obj* otmp, struct monst* mon, int tmp )
Prototyped in: include/extern.h
Calls: spec_applies()src/artifact.c
  rnd()
Called by: artifact_hit()src/artifact.c
References Variables: artilistsrc/artifact.c
  spec_dbon_appliessrc/artifact.c

Global Function spec_m2()

long spec_m2 ( struct obj* otmp )
Prototyped in: include/extern.h
Called by: set_artifact_intrinsic()src/artifact.c
References Variables: artilistsrc/artifact.c

Global Function touch_artifact()

int touch_artifact ( struct obj* obj, struct monst* mon )
Prototyped in: include/extern.h
Calls: spec_applies()src/artifact.c
  The(), You(), d(), exercise(), losehp(), pline(), resists_magm(), rn2(), s_suffix(), sgn(), sprintf(), the(), xname()
References Variables: artilistsrc/artifact.c
  u, urace, urole, youmonst

Global Function undiscovered_artifact()

boolean undiscovered_artifact ( xchar m )
Prototyped in: include/extern.h
References Variables: artidiscosrc/artifact.c

Local Function arti_invoke()

static int arti_invoke ( struct obj* obj )
Prototyped in: src/artifact.c
Calls: You(), You_feel(), Your(), aobjnam(), d(), depth(), dmgtype(), enlightenment(), float_down(), float_up(), free(), getobj(), goto_level(), hold_another_object(), level_tele(), make_blinded(), make_sick(), mksobj(), newsym(), obfree(), pline(), recharge(), rnd(), rnz(), seffects(), the(), untrap(), use_crystal_ball(), weight(), xname()
Called by: doinvoke()src/artifact.c
  set_artifact_intrinsic()src/artifact.c
References Variables: artilistsrc/artifact.c
  recharge_typesrc/artifact.c
  c_common_strings, dungeon_topology, dungeons, flags, monstermoves, n_dgns, u, ublindf, urole, windowprocs, youmonst

Local Function attacks()

static boolean attacks ( int adtyp, struct obj* otmp )
Prototyped in: src/artifact.c
Called by: artifact_hit()src/artifact.c
References Variables: artilistsrc/artifact.c

Local Function hack_artifacts()

static void hack_artifacts ( void )
Prototyped in: src/artifact.c
Called by: init_artifacts()src/artifact.c
  restore_artifacts()src/artifact.c
References Variables: artilistsrc/artifact.c
  aligns, flags, urole

Local Function spec_applies()

static int spec_applies ( const struct artifact* weap, struct monst* mtmp )
Prototyped in: src/artifact.c
Calls: defends()src/artifact.c
  impossible(), resists_drli(), resists_magm(), rn2(), sgn()
Called by: spec_abon()src/artifact.c
  spec_dbon()src/artifact.c
  touch_artifact()src/artifact.c
References Variables: mons, u, urace, uwep, youmonst