#include "hack.h"
Defines | |
#define | BP_ALIGN 0 |
#define | BP_GEND 1 |
#define | BP_RACE 2 |
#define | BP_ROLE 3 |
#define | NUM_BP 4 |
Functions | |
STATIC_DCL char * | FDECL (promptsep,(char *, int)) |
STATIC_DCL int | FDECL (role_gendercount,(int)) |
STATIC_DCL int | FDECL (race_alignmentcount,(int)) |
boolean | validrole (int rolenum) |
int | randrole () |
int | str2role (char *str) |
boolean | validrace (int rolenum, int racenum) |
int | randrace (int rolenum) |
int | str2race (char *str) |
boolean | validgend (int rolenum, int racenum, int gendnum) |
int | randgend (int rolenum, int racenum) |
int | str2gend (char *str) |
boolean | validalign (int rolenum, int racenum, int alignnum) |
int | randalign (int rolenum, int racenum) |
int | str2align (char *str) |
boolean | ok_role (int rolenum, int racenum, int gendnum, int alignnum) |
int | pick_role (int racenum, int gendnum, int alignnum, int pickhow) |
boolean | ok_race (int rolenum, int racenum, int gendnum, int alignnum) |
int | pick_race (int rolenum, int gendnum, int alignnum, int pickhow) |
boolean | ok_gend (int rolenum, int racenum, int gendnum, int alignnum) |
int | pick_gend (int rolenum, int racenum, int alignnum, int pickhow) |
boolean | ok_align (int rolenum, int racenum, int gendnum, int alignnum) |
int | pick_align (int rolenum, int racenum, int gendnum, int pickhow) |
void | rigid_role_checks () |
STATIC_OVL char * | promptsep (char *buf, int num_post_attribs) |
STATIC_OVL int | role_gendercount (int rolenum) |
STATIC_OVL int | race_alignmentcount (int racenum) |
char * | root_plselection_prompt (char *suppliedbuf, int buflen, int rolenum, int racenum, int gendnum, int alignnum) |
char * | build_plselection_prompt (char *buf, int buflen, int rolenum, int racenum, int gendnum, int alignnum) |
void | plnamesuffix () |
void | role_init () |
const char * | Hello (struct monst *mtmp) |
const char * | Goodbye () |
void | violated (int cdt) |
boolean | successful_cdt (int cdt) |
boolean | intended_cdt (int cdt) |
boolean | superfluous_cdt (int cdt) |
boolean | failed_cdt (int cdt) |
Variables | |
struct Role | roles [] |
struct Role | urole |
struct Race | races [] |
struct Race | urace |
struct Gender | genders [] |
struct Align | aligns [] |
struct Conduct | conducts [] |
static char NEARDATA | randomstr [] = "random" |
STATIC_VAR char | pa [NUM_BP] |
STATIC_VAR char | post_attribs |
#define BP_ALIGN 0 |
Referenced by build_plselection_prompt(), and root_plselection_prompt().
#define BP_GEND 1 |
Referenced by build_plselection_prompt(), and root_plselection_prompt().
#define BP_RACE 2 |
Referenced by build_plselection_prompt(), and root_plselection_prompt().
#define BP_ROLE 3 |
Referenced by build_plselection_prompt(), and root_plselection_prompt().
#define NUM_BP 4 |
Referenced by root_plselection_prompt().
char* build_plselection_prompt | ( | char * | buf, |
int | buflen, | ||
int | rolenum, | ||
int | racenum, | ||
int | gendnum, | ||
int | alignnum | ||
) |
References BP_ALIGN, BP_GEND, BP_RACE, BP_ROLE, BUFSZ, eos(), post_attribs, promptsep(), QBUFSZ, ROLE_NONE, root_plselection_prompt(), s_suffix(), Sprintf, Strcat, Strcpy, and validrole().
boolean failed_cdt | ( | int | cdt ) |
References intended_cdt(), and successful_cdt().
Referenced by show_conduct().
STATIC_DCL int FDECL | ( | role_gendercount | , |
(int) | |||
) |
STATIC_DCL char* FDECL | ( | promptsep | , |
(char *, int) | |||
) |
STATIC_DCL int FDECL | ( | race_alignmentcount | , |
(int) | |||
) |
const char* Goodbye | ( | ) |
References PM_KNIGHT, PM_MONK, PM_SAMURAI, PM_TOURIST, PM_VALKYRIE, and Role_switch.
Referenced by done(), and losexp().
const char* Hello | ( | struct monst * | mtmp ) |
References MAIL, mons, PM_KNIGHT, PM_MAIL_DAEMON, PM_MONK, PM_SAMURAI, PM_SHOPKEEPER, PM_TOURIST, PM_VALKYRIE, and Role_switch.
Referenced by check_special_room(), shk_chat(), shk_move(), u_entered_shop(), and welcome().
boolean intended_cdt | ( | int | cdt ) |
References flag::ascet, flag::atheist, flag::blindfolded, CONDUCT_ATHEISM, CONDUCT_BLINDFOLDED, CONDUCT_FOODLESS, CONDUCT_ILLITERACY, CONDUCT_NUDISM, CONDUCT_PACIFISM, CONDUCT_VEGAN, CONDUCT_VEGETARIAN, FALSE, flags, flag::illiterate, flag::nudist, flag::pacifist, TRUE, flag::vegan, and flag::vegetarian.
Referenced by failed_cdt(), and show_conduct().
boolean ok_align | ( | int | rolenum, |
int | racenum, | ||
int | gendnum, | ||
int | alignnum | ||
) |
References Race::allow, Role::allow, Align::allow, FALSE, ROLE_ALIGNMASK, ROLE_ALIGNS, SIZE, and TRUE.
Referenced by pick_align().
boolean ok_gend | ( | int | rolenum, |
int | racenum, | ||
int | gendnum, | ||
int | alignnum | ||
) |
References Race::allow, Role::allow, Gender::allow, FALSE, ROLE_GENDERS, ROLE_GENDMASK, SIZE, and TRUE.
Referenced by pick_gend().
boolean ok_race | ( | int | rolenum, |
int | racenum, | ||
int | gendnum, | ||
int | alignnum | ||
) |
References Role::allow, Race::allow, FALSE, ROLE_ALIGNMASK, ROLE_ALIGNS, ROLE_GENDERS, ROLE_GENDMASK, ROLE_RACEMASK, SIZE, and TRUE.
Referenced by pick_race(), and root_plselection_prompt().
boolean ok_role | ( | int | rolenum, |
int | racenum, | ||
int | gendnum, | ||
int | alignnum | ||
) |
References Race::allow, Role::allow, FALSE, ROLE_ALIGNMASK, ROLE_ALIGNS, ROLE_GENDERS, ROLE_GENDMASK, ROLE_RACEMASK, SIZE, and TRUE.
Referenced by pick_role().
int pick_align | ( | int | rolenum, |
int | racenum, | ||
int | gendnum, | ||
int | pickhow | ||
) |
References ok_align(), PICK_RIGID, rn2(), ROLE_ALIGNS, and ROLE_NONE.
Referenced by rigid_role_checks().
int pick_gend | ( | int | rolenum, |
int | racenum, | ||
int | alignnum, | ||
int | pickhow | ||
) |
References ok_gend(), PICK_RIGID, rn2(), ROLE_GENDERS, and ROLE_NONE.
Referenced by rigid_role_checks().
int pick_race | ( | int | rolenum, |
int | gendnum, | ||
int | alignnum, | ||
int | pickhow | ||
) |
References ok_race(), PICK_RIGID, rn2(), ROLE_NONE, and SIZE.
Referenced by rigid_role_checks().
int pick_role | ( | int | racenum, |
int | gendnum, | ||
int | alignnum, | ||
int | pickhow | ||
) |
References ok_role(), PICK_RIGID, rn2(), ROLE_NONE, and SIZE.
Referenced by rigid_role_checks().
void plnamesuffix | ( | ) |
References askname, flags, index, flag::initalign, flag::initgend, flag::initrace, flag::initrole, plname, ROLE_NONE, str2align(), str2gend(), str2race(), and str2role().
Referenced by parse_config_line(), and role_init().
STATIC_OVL char* promptsep | ( | char * | buf, |
int | num_post_attribs | ||
) |
References post_attribs, and Strcat.
Referenced by build_plselection_prompt().
STATIC_OVL int race_alignmentcount | ( | int | racenum ) |
References ROLE_CHAOTIC, ROLE_LAWFUL, ROLE_NEUTRAL, ROLE_NONE, and ROLE_RANDOM.
Referenced by root_plselection_prompt().
int randalign | ( | int | rolenum, |
int | racenum | ||
) |
References rn2(), ROLE_ALIGNMASK, and ROLE_ALIGNS.
Referenced by role_init().
int randgend | ( | int | rolenum, |
int | racenum | ||
) |
int randrace | ( | int | rolenum ) |
References Race::noun, rn2(), SIZE, and validrace().
Referenced by role_init().
int randrole | ( | ) |
Referenced by rigid_role_checks(), rnd_gname(), and role_init().
void rigid_role_checks | ( | ) |
References flags, flag::initalign, flag::initgend, flag::initrace, flag::initrole, pick_align(), pick_gend(), pick_race(), PICK_RANDOM, PICK_RIGID, pick_role(), randrole(), ROLE_NONE, and ROLE_RANDOM.
STATIC_OVL int role_gendercount | ( | int | rolenum ) |
References ROLE_FEMALE, ROLE_MALE, ROLE_NEUTER, and validrole().
Referenced by root_plselection_prompt().
void role_init | ( | ) |
References flag::ascet, Role::cgod, flag::female, Role::femalenum, flags, Role::guardnum, flag::initalign, flag::initgend, flag::initrace, flag::initrole, Role::ldrnum, Role::lgod, RoleName::m, M2_HOSTILE, M2_NASTY, M2_PEACEFUL, M2_STALK, M3_CLOSE, M3_INFRAVISION, M3_WAITFORU, M3_WANTSARTI, Role::malenum, Race::malenum, permonst::maligntyp, permonst::mflags2, permonst::mflags3, mons, MS_LEADER, MS_NEMESIS, permonst::msound, Role::name, Role::neminum, Role::ngod, NON_PM, flag::pantheon, pl_character, PL_CSIZ, plnamesuffix(), PM_MONK, randalign(), randrace(), randrole(), Role_if, str2role(), Strcpy, TRUE, validalign(), validgend(), validrace(), validrole(), Align::value, flag::vegan, and flag::vegetarian.
Referenced by newgame(), and restgamestate().
char* root_plselection_prompt | ( | char * | suppliedbuf, |
int | buflen, | ||
int | rolenum, | ||
int | racenum, | ||
int | gendnum, | ||
int | alignnum | ||
) |
References Conduct::adj, BP_ALIGN, BP_GEND, BP_RACE, BP_ROLE, BUFSZ, FALSE, name, Conduct::noun, NUM_BP, ok_race(), race_alignmentcount(), role_gendercount(), ROLE_NONE, ROLE_RANDOM, Strcat, Strcpy, TRUE, and validrole().
Referenced by build_plselection_prompt().
int str2align | ( | char * | str ) |
References Conduct::adj, ROLE_ALIGNS, ROLE_NONE, ROLE_RANDOM, strcmpi, and strncmpi().
Referenced by parseoptions(), and plnamesuffix().
int str2gend | ( | char * | str ) |
References Conduct::adj, ROLE_GENDERS, ROLE_NONE, ROLE_RANDOM, strcmpi, and strncmpi().
Referenced by parseoptions(), and plnamesuffix().
int str2race | ( | char * | str ) |
References Conduct::noun, Race::noun, ROLE_NONE, ROLE_RANDOM, strcmpi, and strncmpi().
Referenced by parseoptions(), plnamesuffix(), and score_wanted().
int str2role | ( | char * | str ) |
References RoleName::m, name, Role::name, ROLE_NONE, ROLE_RANDOM, strcmpi, and strncmpi().
Referenced by parse_config_line(), parseoptions(), plnamesuffix(), priestname(), readentry(), role_init(), and score_wanted().
boolean successful_cdt | ( | int | cdt ) |
References u_conduct::armoruses, CONDUCT_ATHEISM, CONDUCT_BLINDFOLDED, CONDUCT_FOODLESS, CONDUCT_ILLITERACY, CONDUCT_NUDISM, CONDUCT_PACIFISM, CONDUCT_SADISM, CONDUCT_THIEVERY, CONDUCT_VEGAN, CONDUCT_VEGETARIAN, FALSE, u_conduct::food, u_conduct::gnostic, u_conduct::killer, u_conduct::literate, num_genocides(), u_conduct::robbed, TRUE, u, you::uconduct, u_conduct::unblinded, u_conduct::unvegan, u_conduct::unvegetarian, and u_conduct::weaphit.
Referenced by dosacrifice(), failed_cdt(), show_conduct(), and superfluous_cdt().
boolean superfluous_cdt | ( | int | cdt ) |
References CONDUCT_FOODLESS, CONDUCT_THIEVERY, CONDUCT_VEGAN, CONDUCT_VEGETARIAN, FALSE, successful_cdt(), TRUE, u, and you::uevent.
Referenced by dosacrifice(), and show_conduct().
boolean validalign | ( | int | rolenum, |
int | racenum, | ||
int | alignnum | ||
) |
References ROLE_ALIGNMASK, and ROLE_ALIGNS.
Referenced by role_init().
boolean validgend | ( | int | rolenum, |
int | racenum, | ||
int | gendnum | ||
) |
References ROLE_GENDERS, and ROLE_GENDMASK.
Referenced by randgend(), and role_init().
boolean validrace | ( | int | rolenum, |
int | racenum | ||
) |
References ROLE_ALIGNMASK, ROLE_GENDMASK, ROLE_RACEMASK, and SIZE.
Referenced by randrace(), and role_init().
boolean validrole | ( | int | rolenum ) |
References SIZE.
Referenced by build_plselection_prompt(), rnd_gname(), role_gendercount(), role_init(), and root_plselection_prompt().
void violated | ( | int | cdt ) |
References A_WIS, adjalign(), APPLE, u_conduct::armoruses, u_roleplay::ascet, u_roleplay::blindfolded, CONDUCT_BLINDFOLDED, CONDUCT_FOODLESS, CONDUCT_ILLITERACY, CONDUCT_NUDISM, CONDUCT_PACIFISM, CONDUCT_THIEVERY, CONDUCT_VEGAN, CONDUCT_VEGETARIAN, done(), exercise(), FALSE, u_conduct::food, u_roleplay::illiterate, killer, u_conduct::killer, killer_format, u_conduct::literate, makemon(), mkclass(), mksobj_at(), mons, NO_KILLER_PREFIX, NO_MM_FLAGS, u_roleplay::nudist, u_roleplay::pacifist, pline(), PM_COBRA, PM_MONK, PM_ROGUE, QUIT, u_conduct::robbed, Role_if, you::roleplay, S_EYE, S_NYMPH, S_ZOMBIE, TRUE, u, you::uconduct, u_conduct::unblinded, u_conduct::unvegan, u_conduct::unvegetarian, you::ux, you::uy, u_roleplay::vegan, u_roleplay::vegetarian, and yn.
Referenced by Blindf_off(), damageum(), doeat(), domove(), doread(), dowrite(), eatcorpse(), engrave(), fpostfx(), gulpum(), opentin(), setworn(), still_chewing(), u_init(), violated_vegetarian(), and xkilled().
{ {"law", "lawful", "Law", ROLE_LAWFUL, A_LAWFUL}, {"balance", "neutral", "Neu", ROLE_NEUTRAL, A_NEUTRAL}, {"chaos", "chaotic", "Cha", ROLE_CHAOTIC, A_CHAOTIC}, {"evil", "unaligned", "Una", 0, A_NONE} }
Referenced by done(), get_compopt_value(), hack_artifacts(), newhp(), topten(), and u_init().
Referenced by dosacrifice(), and show_conduct().
{ {"male", "he", "him", "his", "Mal", ROLE_MALE}, {"female", "she", "her", "her", "Fem", ROLE_FEMALE}, {"neuter", "it", "it", "its", "Ntr", ROLE_NEUTER} }
Referenced by done(), get_compopt_value(), minimal_enlightenment(), topten(), and welcome().
STATIC_VAR char pa[NUM_BP] |
Referenced by mattackm(), and mdamagem().
STATIC_VAR char post_attribs |
Referenced by build_plselection_prompt(), and promptsep().
Referenced by get_compopt_value().
char NEARDATA randomstr[] = "random" [static] |
Referenced by classmon(), get_compopt_value(), rank_of(), readentry(), rnd_gname(), and title_to_mon().
{ "something", "undefined", "something", "Xxx", {0, 0}, NON_PM, NON_PM, NON_PM, NON_PM, 0, 0, 0, 0, { 3, 3, 3, 3, 3, 3 }, { STR18(100), 18, 18, 18, 18, 18 }, { 2, 0, 0, 2, 1, 0 }, { 1, 0, 2, 0, 2, 0 } }
Referenced by can_twoweapon(), cpostfx(), do_class_genocide(), do_genocide(), domonnoise(), done(), done_in_by(), dosacrifice(), ini_inv(), init_uasmon(), is_playermon_genocided(), load_qtlist(), lookat(), losexp(), minimal_enlightenment(), newhp(), newman(), pluslvl(), raceptr(), rehumanize(), spec_applies(), topten(), u_init(), and welcome().
{ {"Undefined", 0}, { {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} }, "L", "N", "C", "Xxx", "home", "locate", NON_PM, NON_PM, NON_PM, NON_PM, NON_PM, NON_PM, 0, 0, { 7, 7, 7, 7, 7, 7 }, { 20, 15, 15, 20, 20, 10 }, { 10, 0, 0, 8, 1, 0 }, { 2, 0, 0, 2, 0, 3 },14, 0, 10, 0, 0, 4, A_INT, 0, -3 }
Referenced by align_gname(), align_gtitle(), can_twoweapon(), change_sex(), convert_arg(), do_class_genocide(), do_genocide(), domonnoise(), done(), find_roll_to_hit(), guardname(), hack_artifacts(), homebase(), init_attr(), init_dungeons(), intermed(), is_playermon_genocided(), is_quest_artifact(), ldrname(), load_qtlist(), losexp(), makelevel(), max_rank_sz(), maybe_wail(), minimal_enlightenment(), mplayer_talk(), neminame(), newhp(), newuhs(), percent_success(), pet_type(), pluslvl(), priestname(), quest_info(), rank_of(), set_bonesfile_name(), skill_init(), topten(), u_init(), and welcome().