Data Structures | Defines | Functions | Variables

u_init.c File Reference

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

Data Structures

struct  trobj
struct  inv_sub

Defines

#define UNDEF_TYP   0
#define UNDEF_SPE   '\177'
#define UNDEF_BLESS   2
#define B_MAJOR   0
#define B_MINOR   1
#define C_AMMO   2
#define M_BOOK   2
#define RAN_BOW   1
#define RAN_TWO_ARROWS   2
#define RAN_ZERO_ARROWS   3
#define R_DAGGERS   1
#define S_ARROWS   3
#define W_MULTSTART   2
#define W_MULTEND   6

Functions

STATIC_DCL void FDECL (ini_inv,(struct trobj *))
STATIC_DCL void FDECL (knows_object,(int))
STATIC_DCL void FDECL (knows_class,(CHAR_P))
STATIC_DCL boolean FDECL (restricted_spell_discipline,(int))
STATIC_OVL void knows_object (int obj)
STATIC_OVL void knows_class (char sym)
void u_init ()
STATIC_OVL boolean restricted_spell_discipline (int otyp)
STATIC_OVL void ini_inv (struct trobj *trop)

Variables

static struct trobj Archeologist []
static struct trobj Barbarian []
static struct trobj Cave_man []
static struct trobj Healer []
static struct trobj Knight []
static struct trobj Monk []
static struct trobj Priest []
static struct trobj Ranger []
static struct trobj Rogue []
static struct trobj Samurai []
static struct trobj Valkyrie []
static struct trobj Wizard []
static struct trobj Tinopener []
static struct trobj Magicmarker []
static struct trobj Lamp []
static struct trobj Blindfold []
static struct trobj Instrument []
static struct trobj Xtra_food []
static struct trobj Wishing []
static struct inv_sub inv_subs []
static struct def_skill Skill_A []
static struct def_skill Skill_B []
static struct def_skill Skill_C []
static struct def_skill Skill_H []
static struct def_skill Skill_K []
static struct def_skill Skill_Mon []
static struct def_skill Skill_P []
static struct def_skill Skill_R []
static struct def_skill Skill_Ran []
static struct def_skill Skill_S []
static struct def_skill Skill_V []
static struct def_skill Skill_W []

Define Documentation

#define B_MAJOR   0

Referenced by u_init().

#define B_MINOR   1

Referenced by u_init().

#define C_AMMO   2

Referenced by u_init().

#define M_BOOK   2

Referenced by u_init().

#define R_DAGGERS   1

Referenced by u_init().

#define RAN_BOW   1
#define RAN_TWO_ARROWS   2

Referenced by u_init().

#define RAN_ZERO_ARROWS   3

Referenced by u_init().

#define S_ARROWS   3

Referenced by u_init().

#define UNDEF_BLESS   2

Referenced by ini_inv().

#define UNDEF_SPE   '\177'

Referenced by ini_inv().

#define UNDEF_TYP   0

Referenced by ini_inv().

#define W_MULTEND   6
#define W_MULTSTART   2

Function Documentation

STATIC_DCL void FDECL ( ini_inv  ,
(struct trobj *)   
)
STATIC_DCL void FDECL ( knows_object  ,
(int)   
)
STATIC_DCL boolean FDECL ( restricted_spell_discipline  ,
(int)   
)
STATIC_DCL void FDECL ( knows_class  ,
(CHAR_P)   
)
STATIC_OVL void ini_inv ( struct trobj trop )
STATIC_OVL void knows_class ( char  sym )

References Is_dragon_armor, knows_object(), NUM_OBJECTS, and objects.

Referenced by u_init().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void knows_object ( int  obj )

References discover_object(), FALSE, objects, and TRUE.

Referenced by knows_class(), and u_init().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean restricted_spell_discipline ( int  otyp )
void u_init (  )

References A_CON, A_CURRENT, A_MAX, A_ORIGINAL, A_STR, ABASE, adjabil(), adjalign(), adjattrib(), aligns, AMAX, ARMOR_CLASS, flag::ascet, u_roleplay::ascet, flag::atheist, u_roleplay::atheist, B_MAJOR, B_MINOR, BATTLE_AXE, flag::beginner, BELL, flag::blindfolded, u_roleplay::blindfolded, BUGLE, C_AMMO, change_luck(), CONDUCT_BLINDFOLDED, discover, d_level::dlevel, d_level::dnum, DWARVISH_CLOAK, DWARVISH_IRON_HELM, DWARVISH_MATTOCK, DWARVISH_MITHRIL_COAT, DWARVISH_ROUNDSHIELD, DWARVISH_SHORT_SWORD, DWARVISH_SPEAR, ELVEN_ARROW, ELVEN_BOOTS, ELVEN_BOW, ELVEN_BROADSWORD, ELVEN_CLOAK, ELVEN_DAGGER, ELVEN_LEATHER_HELM, ELVEN_MITHRIL_COAT, ELVEN_SHIELD, ELVEN_SHORT_SWORD, ELVEN_SPEAR, Race::enadv, Role::enadv, FALSE, flag::female, Role::femalenum, find_ac(), flags, FROMOUTSIDE, hidden_gold(), HJumping, flag::illiterate, u_roleplay::illiterate, RoleAdvance::infix, ini_inv(), init_attr(), init_uasmon(), init_uhunger(), flag::initalign, flag::initgend, RoleAdvance::inrnd, inv_weight(), knows_class(), knows_object(), LEATHER_DRUM, M_BOOK, Role::malenum, max_rank_sz(), MAXSPELL, you::mh, you::mhmax, you::moreluck, you::mtimedone, newhp(), NO_SPELL, NON_PM, flag::nudist, u_roleplay::nudist, you::nv_range, ORCISH_ARROW, ORCISH_BOW, ORCISH_CHAIN_MAIL, ORCISH_CLOAK, ORCISH_DAGGER, ORCISH_HELM, ORCISH_RING_MAIL, ORCISH_SHIELD, ORCISH_SHORT_SWORD, ORCISH_SPEAR, flag::pacifist, u_roleplay::pacifist, PM_ARCHEOLOGIST, PM_BARBARIAN, PM_CAVEMAN, PM_DWARF, PM_ELF, PM_GNOME, PM_HEALER, PM_HUMAN, PM_KNIGHT, PM_MONK, PM_ORC, PM_PRIEST, PM_RANGER, PM_ROGUE, PM_SAMURAI, PM_TOURIST, PM_VALKYRIE, PM_VAMPIRE, PM_WIZARD, POT_FULL_HEALING, POT_WATER, R_DAGGERS, Race_switch, RAN_TWO_ARROWS, RAN_ZERO_ARROWS, rn1, rn2(), rnd(), Role_if, Role_switch, you::roleplay, S_ARROWS, SACK, SHORT_SWORD, SIZE, skill_init(), SPE_HEALING, SPE_PROTECTION, SPE_SLEEP, spl_book, time(), TOOLED_HORN, TOUCHSTONE, towelday(), trobj::trotyp, TRUE, you::twoweap, align::type, u, you::ualign, you::ualignbase, uarm, uarmc, uarmf, uarmg, uarmh, uarms, uball, you::ubirthday, you::ublesscnt, you::ublessed, ublindf, uchain, you::udg_cnt, you::uen, you::uenmax, you::uevent, you::ugangr, you::ugifts, you::ugold, you::ugold0, you::ugrave_arise, you::uhp, you::uhpmax, uleft, you::ulevel, you::ulevelmax, you::uluck, you::ulycn, you::umonnum, you::umonster, you::umortality, you::umoved, uquiver, urace, uright, urole, URUK_HAI_SHIELD, you::usick_cause, you::uspellprot, you::ustuck, uswapwep, you::utolev, you::utotype, uwep, you::uz, you::uz0, Align::value, flag::vegan, u_roleplay::vegan, flag::vegetarian, u_roleplay::vegetarian, violated(), WEAPON_CLASS, wizard, WOODEN_FLUTE, WOODEN_HARP, and you::xray_range.

Referenced by newgame().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct trobj Archeologist[] [static]
Initial value:
 {
        
        { BULLWHIP, 2, WEAPON_CLASS, 1, UNDEF_BLESS },
        { LEATHER_JACKET, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { FEDORA, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { FOOD_RATION, 0, FOOD_CLASS, 3, 0 },
        { PICK_AXE, UNDEF_SPE, TOOL_CLASS, 1, UNDEF_BLESS },
        { TINNING_KIT, UNDEF_SPE, TOOL_CLASS, 1, UNDEF_BLESS },
        { TOUCHSTONE, 0, GEM_CLASS, 1, 0 },
        { SACK, 0, TOOL_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Barbarian[] [static]
Initial value:
 {
#define B_MAJOR
#define B_MINOR
        { TWO_HANDED_SWORD, 0, WEAPON_CLASS, 1, UNDEF_BLESS },
        { AXE, 0, WEAPON_CLASS, 1, UNDEF_BLESS },
        { RING_MAIL, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { FOOD_RATION, 0, FOOD_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Blindfold[] [static]
Initial value:
 {
        { BLINDFOLD, 0, TOOL_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Cave_man[] [static]
Initial value:
 {
#define C_AMMO
        { CLUB, 1, WEAPON_CLASS, 1, UNDEF_BLESS },
        { SLING, 2, WEAPON_CLASS, 1, UNDEF_BLESS },
        { FLINT, 0, GEM_CLASS, 15, UNDEF_BLESS },       
        { ROCK, 0, GEM_CLASS, 3, 0 },                   
        { LEATHER_ARMOR, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { 0, 0, 0, 0, 0 }
}
struct trobj Healer[] [static]
Initial value:
struct trobj Instrument[] [static]
Initial value:
 {
        { WOODEN_FLUTE, 0, TOOL_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct inv_sub inv_subs[] [static]

Referenced by ini_inv().

struct trobj Knight[] [static]
Initial value:
 {
        { LONG_SWORD, 1, WEAPON_CLASS, 1, UNDEF_BLESS },
        { LANCE, 1, WEAPON_CLASS, 1, UNDEF_BLESS },
        { RING_MAIL, 1, ARMOR_CLASS, 1, UNDEF_BLESS },
        { HELMET, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { SMALL_SHIELD, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { LEATHER_GLOVES, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { APPLE, 0, FOOD_CLASS, 10, 0 },
        { CARROT, 0, FOOD_CLASS, 10, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Lamp[] [static]
Initial value:
 {
        { OIL_LAMP, 1, TOOL_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Magicmarker[] [static]
Initial value:
 {
        { MAGIC_MARKER, UNDEF_SPE, TOOL_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Monk[] [static]
Initial value:
struct trobj Priest[] [static]
Initial value:
 {
        { MACE, 1, WEAPON_CLASS, 1, 1 },
        { ROBE, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { SMALL_SHIELD, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { POT_WATER, 0, POTION_CLASS, 4, 1 },   
        { CLOVE_OF_GARLIC, 0, FOOD_CLASS, 1, 0 },
        { SPRIG_OF_WOLFSBANE, 0, FOOD_CLASS, 1, 0 },
        { UNDEF_TYP, UNDEF_SPE, SPBOOK_CLASS, 2, UNDEF_BLESS },
        { 0, 0, 0, 0, 0 }
}
struct trobj Ranger[] [static]
Initial value:
 {
#define RAN_BOW
#define RAN_TWO_ARROWS
#define RAN_ZERO_ARROWS
        { DAGGER, 1, WEAPON_CLASS, 1, UNDEF_BLESS },
        { BOW, 1, WEAPON_CLASS, 1, UNDEF_BLESS },
        { ARROW, 2, WEAPON_CLASS, 50, UNDEF_BLESS },
        { ARROW, 0, WEAPON_CLASS, 30, UNDEF_BLESS },
        { CLOAK_OF_DISPLACEMENT, 2, ARMOR_CLASS, 1, UNDEF_BLESS },
        { CRAM_RATION, 0, FOOD_CLASS, 4, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Rogue[] [static]
Initial value:
 {
#define R_DAGGERS
        { SHORT_SWORD, 0, WEAPON_CLASS, 1, UNDEF_BLESS },
        { DAGGER, 0, WEAPON_CLASS, 10, 0 },     
        { LEATHER_ARMOR, 1, ARMOR_CLASS, 1, UNDEF_BLESS },
        { POT_SICKNESS, 0, POTION_CLASS, 1, 0 },
        { LOCK_PICK, 9, TOOL_CLASS, 1, 0 },
        { SACK, 0, TOOL_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Samurai[] [static]
Initial value:
 {
#define S_ARROWS
        { KATANA, 0, WEAPON_CLASS, 1, UNDEF_BLESS },
        { SHORT_SWORD, 0, WEAPON_CLASS, 1, UNDEF_BLESS }, 
        { YUMI, 0, WEAPON_CLASS, 1, UNDEF_BLESS },
        { YA, 0, WEAPON_CLASS, 25, UNDEF_BLESS }, 
        { SPLINT_MAIL, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
        { 0, 0, 0, 0, 0 }
}
struct def_skill Skill_A[] [static]
struct def_skill Skill_B[] [static]
struct def_skill Skill_C[] [static]
struct def_skill Skill_H[] [static]
struct def_skill Skill_K[] [static]
struct def_skill Skill_Mon[] [static]
struct def_skill Skill_P[] [static]
struct def_skill Skill_R[] [static]
struct def_skill Skill_Ran[] [static]
struct def_skill Skill_S[] [static]
struct def_skill Skill_V[] [static]
struct def_skill Skill_W[] [static]
struct trobj Tinopener[] [static]
Initial value:
 {
        { TIN_OPENER, 0, TOOL_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Valkyrie[] [static]
Initial value:
 {
        { LONG_SWORD, 1, WEAPON_CLASS, 1, UNDEF_BLESS },
        { DAGGER, 0, WEAPON_CLASS, 1, UNDEF_BLESS },
        { SMALL_SHIELD, 3, ARMOR_CLASS, 1, UNDEF_BLESS },
        { FOOD_RATION, 0, FOOD_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Wishing[] [static]
Initial value:
 {
        { WAN_WISHING, 3, WAND_CLASS, 1, 0 },
        { 0, 0, 0, 0, 0 }
}
struct trobj Wizard[] [static]
Initial value:
struct trobj Xtra_food[] [static]
Initial value:
 {
        { UNDEF_TYP, UNDEF_SPE, FOOD_CLASS, 2, 0 },
        { 0, 0, 0, 0, 0 }
}