Data Structures | Defines | Functions | Variables

attrib.c File Reference

#include "hack.h"
Include dependency graph for attrib.c:

Data Structures

struct  innate

Defines

#define AVAL   50
#define SATIATED   0
#define NOT_HUNGRY   1
#define HUNGRY   2
#define WEAK   3
#define FAINTING   4
#define FAINTED   5
#define STARVED   6

Functions

STATIC_DCL void NDECL (exerper)
STATIC_DCL void FDECL (postadjabil,(long *))
boolean adjattrib (int ndx, int incr, int msgflg)
void gainstr (struct obj *otmp, int incr)
void losestr (int num)
void change_luck (schar n)
int stone_luck (boolean parameter)
void set_moreluck ()
void restore_attrib ()
void exercise (int i, boolean inc_or_dec)
STATIC_OVL void exerper ()
void exerchk ()
void reset_attribute_clock ()
void init_attr (int np)
void redist_attr ()
STATIC_OVL void postadjabil (long *ability)
void adjabil (int oldlevel, int newlevel)
int newhp ()
schar acurr (int x)
schar acurrstr ()
void adjalign (int n)
const char * beautiful ()
int uhp ()
int uhpmax ()

Variables

static const char *const plusattr []
static const char *const *const minusattr []
static struct innate arc_abil []
static struct innate bar_abil []
static struct innate cav_abil []
static struct innate hea_abil []
static struct innate kni_abil []
static struct innate mon_abil []
static struct innate pri_abil []
static struct innate ran_abil []
static struct innate rog_abil []
static struct innate sam_abil []
static struct innate tou_abil []
static struct innate val_abil []
static struct innate wiz_abil []
static struct innate elf_abil []
static struct innate orc_abil []
static long next_check = 600L

Define Documentation

#define AVAL   50

Referenced by exerchk(), and exercise().

#define FAINTED   5

Referenced by exerper().

#define FAINTING   4

Referenced by exerper().

#define HUNGRY   2

Referenced by exerper(), and in_trouble().

#define NOT_HUNGRY   1

Referenced by exerper().

#define SATIATED   0

Referenced by exerper().

#define STARVED   6
#define WEAK   3

Referenced by exerper().


Function Documentation

schar acurr ( int  x )

References A_CHA, A_INT, A_STR, A_WIS, monst::data, DUNCE_CAP, GAUNTLETS_OF_POWER, permonst::mlet, obj::otyp, PM_INCUBUS, PM_SUCCUBUS, S_NYMPH, u, uarmg, uarmh, you::umonnum, and youmonst.

Referenced by spelleffects().

Here is the caller graph for this function:

schar acurrstr (  )

References A_STR, and ACURR.

void adjabil ( int  oldlevel,
int  newlevel 
)
void adjalign ( int  n )
boolean adjattrib ( int  ndx,
int  incr,
int  msgflg 
)
const char* beautiful (  )

Returns "beautiful", "handsome" or "ugly" according to gender and charisma.

References A_CHA, ACURR, and poly_gender().

Referenced by do_mname(), and use_mirror().

Here is the call graph for this function:

Here is the caller graph for this function:

void change_luck ( schar  n )
void exerchk (  )

References A_CHA, A_CON, A_DEX, A_INT, A_MAX, A_STR, A_WIS, ABASE, adjattrib(), AEXE, AVAL, exerper(), moves, multi, pline(), rn1, rn2(), and sgn().

Referenced by moveloop().

Here is the call graph for this function:

Here is the caller graph for this function:

void exercise ( int  i,
boolean  inc_or_dec 
)
STATIC_OVL void exerper (  )
STATIC_DCL void FDECL ( postadjabil  ,
(long *)   
)
void gainstr ( struct obj otmp,
int  incr 
)

References A_STR, ABASE, adjattrib(), rn2(), rnd(), STR18, and TRUE.

Referenced by cpostfx(), fpostfx(), and opentin().

Here is the call graph for this function:

Here is the caller graph for this function:

void init_attr ( int  np )

References A_MAX, ABASE, AMAX, ATEMP, ATIME, Role::attrbase, Role::attrdist, ATTRMAX, ATTRMIN, rn2(), and urole.

Referenced by u_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void losestr ( int  num )

References A_STR, ABASE, adjattrib(), you::mh, you::mhmax, TRUE, u, you::uhp, you::uhpmax, and Upolyd.

Referenced by cast_wizard_spell(), cursed_book(), doeat(), drinkfountain(), eatcorpse(), fix_worst_trouble(), and newuhs().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void NDECL ( exerper   )
int newhp (  )
STATIC_OVL void postadjabil ( long *  ability )

References HSee_invisible, HWarning, and see_monsters().

Referenced by adjabil().

Here is the call graph for this function:

Here is the caller graph for this function:

void redist_attr (  )

References A_INT, A_MAX, A_WIS, ABASE, AMAX, ATTRMAX, ATTRMIN, encumber_msg(), and rn2().

Referenced by newman().

Here is the call graph for this function:

Here is the caller graph for this function:

void reset_attribute_clock (  )

References moves, and rn1.

Referenced by dorecover().

Here is the caller graph for this function:

void restore_attrib (  )

References A_CON, A_MAX, ACURR, ATEMP, ATIME, and encumber_msg().

Referenced by moveloop().

Here is the call graph for this function:

Here is the caller graph for this function:

void set_moreluck (  )

References carrying(), LUCKADD, LUCKSTONE, you::moreluck, stone_luck(), TRUE, and u.

Referenced by addinv_core2(), bless(), curse(), freeinv_core(), unbless(), and uncurse().

Here is the call graph for this function:

Here is the caller graph for this function:

int stone_luck ( boolean  parameter )

References confers_luck(), invent, obj::nobj, otmp, obj::quan, and sgn().

Referenced by enlightenment(), nh_timeout(), and set_moreluck().

Here is the call graph for this function:

Here is the caller graph for this function:

int uhp (  )

Returns the hitpoints of your current form.

References you::mh, u, you::uhp, and Upolyd.

Referenced by bot1(), and Ring_on().

Here is the caller graph for this function:

int uhpmax (  )

Returns the maximal hitpoints of your current form.

References you::mhmax, u, you::uhpmax, and Upolyd.

Referenced by bot1(), and Ring_on().

Here is the caller graph for this function:


Variable Documentation

struct innate arc_abil[] [static]

Referenced by adjabil().

struct innate bar_abil[] [static]

Referenced by adjabil().

struct innate cav_abil[] [static]

Referenced by adjabil().

struct innate elf_abil[] [static]

Referenced by adjabil().

struct innate hea_abil[] [static]

Referenced by adjabil().

struct innate kni_abil[] [static]

Referenced by adjabil().

const char* const * const minusattr[]
Initial value:
 {
        "weak", "stupid", "foolish", "clumsy", "fragile", "repulsive"
}

Referenced by adjattrib().

struct innate mon_abil[] [static]

Referenced by adjabil().

long next_check = 600L [static]
struct innate orc_abil[] [static]

Referenced by adjabil().

const char* const plusattr[] [static]
Initial value:
 {
        "strong", "smart", "wise", "agile", "tough", "charismatic"
}

Referenced by adjattrib().

struct innate pri_abil[] [static]

Referenced by adjabil().

struct innate ran_abil[] [static]

Referenced by adjabil().

struct innate rog_abil[] [static]

Referenced by adjabil().

struct innate sam_abil[] [static]

Referenced by adjabil().

struct innate tou_abil[] [static]

Referenced by adjabil().

struct innate val_abil[] [static]

Referenced by adjabil().

struct innate wiz_abil[] [static]

Referenced by adjabil().