#include "hack.h"
Defines | |
#define | DEVOUT 14 |
#define | STRIDENT 4 |
#define | Your_Own_Role(mndx) |
#define | Your_Own_Race(mndx) |
#define | REALLY 1 |
#define | PLAYER 2 |
#define | ONTHRONE 4 |
Functions | |
static void | FDECL (wand_explode,(struct obj *)) |
static void | NDECL (do_class_genocide) |
static void | FDECL (stripspe,(struct obj *)) |
static void | FDECL (p_glow1,(struct obj *)) |
static void | FDECL (p_glow2,(struct obj *, const char *)) |
static void | FDECL (randomize,(int *, int)) |
static void | FDECL (forget_single_object,(int)) |
static void | FDECL (forget,(int)) |
static void | FDECL (maybe_tame,(struct monst *, struct obj *)) |
STATIC_PTR void | FDECL (do_flood,(int, int, genericptr_t)) |
STATIC_PTR void | FDECL (undo_flood,(int, int, genericptr_t)) |
STATIC_PTR void | FDECL (set_lit,(int, int, genericptr_t)) |
int | doread () |
static void | stripspe (struct obj *obj) |
static void | p_glow1 (struct obj *otmp) |
static void | p_glow2 (struct obj *otmp, const char *color) |
boolean | is_chargeable (struct obj *obj) |
void | recharge (struct obj *obj, int curse_bless) |
static void | forget_single_object (int obj_id) |
static void | randomize (int *indices, int count) |
void | forget_objects (int percent) |
void | forget_map (int howmuch) |
void | forget_traps () |
void | forget_levels (int percent) |
static void | forget (int howmuch) |
static void | maybe_tame (struct monst *mtmp, struct obj *sobj) |
STATIC_PTR void | undo_flood (int x, int y, genericptr_t roomcnt) |
STATIC_PTR void | do_flood (int x, int y, genericptr_t poolcnt) |
int | seffects (struct obj *sobj) |
static void | wand_explode (struct obj *obj) |
STATIC_PTR void | set_lit (int x, int y, genericptr_t val) |
void | litroom (boolean on, struct obj *obj) |
static void | do_class_genocide () |
void | do_genocide (int how, boolean only_on_level) |
void | punish (struct obj *sobj) |
void | unpunish () |
boolean | cant_create (int *mtype, boolean revival) |
void | drop_boulder_on_player (boolean confused, boolean helmet_protects, boolean by_player, boolean drop_directly_to_floor) |
int | drop_boulder_on_monster (int x, int y, boolean confused, boolean by_player) |
Variables | |
boolean | known |
static NEARDATA const char | readable [] |
static const char | all_count [] = { ALLOW_COUNT, ALL_CLASSES, 0 } |
#define DEVOUT 14 |
#define ONTHRONE 4 |
Referenced by do_genocide().
#define PLAYER 2 |
Referenced by do_genocide().
#define REALLY 1 |
Referenced by do_genocide().
#define STRIDENT 4 |
#define Your_Own_Race | ( | mndx ) |
Referenced by do_class_genocide(), and do_genocide().
#define Your_Own_Role | ( | mndx ) |
Referenced by do_class_genocide(), and do_genocide().
References FALSE, PM_ALIGNED_PRIEST, PM_ANGEL, PM_GUARD, PM_HUMAN_ZOMBIE, PM_LONG_WORM, PM_LONG_WORM_TAIL, PM_SHOPKEEPER, and TRUE.
Referenced by revive().
static void do_class_genocide | ( | ) | [static] |
References BUFSZ, DEADMONSTER, def_char_to_monclass(), DEF_INVISIBLE, def_monsyms, done(), FALSE, fmon, G_GENO, G_GENOD, G_NOCORPSE, G_UNIQ, permonst::geno, GENOCIDED, getlin, ILLOBJ_SYM, kill_genocided_monsters(), KILLED_BY_AN, killer, killer_format, LOW_PM, makeplural(), makesingular(), Race::malenum, Role::malenum, you::mh, permonst::mlet, monexplain, mongone(), mons, MS_GUARDIAN, MS_LEADER, MS_NEMESIS, mungspaces(), mvitals::mvflags, monst::nmon, NUMMONS, pline(), plur, PM_HIGH_PRIEST, PM_NINJA, PM_SAMURAI, quest_info(), rehumanize(), reset_rndmonst(), Role_if, S_MIMIC, strcmpi, Strcpy, strstri(), thats_enough_tries, TRUE, type_is_pname, u, you::uhp, you::umonnum, Unchanging, update_inventory, Upolyd, urace, urole, wizard, Your_Own_Race, and Your_Own_Role.
STATIC_PTR void do_flood | ( | int | x, |
int | y, | ||
genericptr_t | poolcnt | ||
) |
References BOULDER, del_engr_at(), delfloortrap(), distmin(), FALSE, level, levl, m_at, minliquid(), newsym(), nexttodoor(), dlevel_t::objects, POOL, rn2(), ROOM, sobj_at(), t_at(), TRUE, u, you::ux, you::uy, water_damage(), trap::x, and trap::y.
Referenced by seffects().
void do_genocide | ( | int | how, |
boolean | only_on_level | ||
) |
only_on_level | if TRUE only genocide monsters on current level, not in the complete dungeon |
References adjalign(), BUFSZ, monst::data, DEADMONSTER, delayed_killer, done(), RoleName::f, flag::female, Race::femalenum, Role::femalenum, flags, fmon, G_EXTINCT, G_GENO, G_GENOD, G_NOCORPSE, G_UNIQ, permonst::geno, GENOCIDED, getlin, Hallucination, is_demon, is_human, kill_genocided_monsters(), kill_monster_on_level(), KILLED_BY, KILLED_BY_AN, killer, killer_format, lowc(), RoleName::m, makemon(), makeplural(), Race::malenum, Role::malenum, permonst::mname, mongone(), mons, monsndx(), mungspaces(), mvitals::mvflags, Role::name, name_to_mon(), monst::nmon, NO_MINVENT, NON_PM, nothing_happens, ONTHRONE, PLAYER, pline(), plur, PM_HIGH_PRIEST, REALLY, rehumanize(), reset_rndmonst(), rn1, rndmonst(), sgn(), flag::soundok, strcmpi, Strcpy, thats_enough_tries, align::type, type_is_pname, u, you::ualign, you::uhp, you::umonster, Unchanging, update_inventory, Upolyd, urace, urole, you::ux, you::uy, flag::verbose, wizard, youmonst, Your_Own_Race, and Your_Own_Role.
Referenced by dosit(), and seffects().
int doread | ( | ) |
References ART_ORB_OF_FATE, bcsign(), Blind, BUFSZ, BY_COOKIE, CAN_OF_GREASE, CANDY_BAR, check_capacity(), COIN_CLASS, CONDUCT_ILLITERACY, Confusion, CREDIT_CARD, monst::data, dealloc_obj(), docall(), FALSE, flags, FORTUNE_COOKIE, getobj(), greatest_erosion, Hallucination, u_roleplay::illiterate, is_silent, known, u_conduct::literate, MAGIC_MARKER, makeknown, MAX_ERODE, more_experienced(), obj::o_id, obj::oartifact, OBJ_DESCR, objects, objclass::oc_uname, obj::oclass, obj::otyp, outrumor(), pline(), PM_ARCHEOLOGIST, PM_ELF, obj::quan, Race_if, readable, Role_if, you::roleplay, RUNESWORD, SCR_BLANK_PAPER, SCR_MAIL, SCROLL_CLASS, seffects(), silly_thing_to, singular(), SIZE, SPBOOK_CLASS, SPE_BLANK_PAPER, SPE_BOOK_OF_THE_DEAD, Strcpy, study_book(), T_SHIRT, TIN, TRUE, u, you::ubirthday, you::uconduct, you::ugold, useup(), flag::verbose, violated(), what, wipeout_text(), xname(), and youmonst.
by_player | is boulder creation caused by player |
References amorphous, body_part(), BOULDER, cansee, canspotmon, monst::data, dmgval(), doname(), drop_boulder_on_player(), FALSE, flags, flooreffects(), HEAD, is_metallic, m_at, map_invisible(), mbodypart(), mhim, monst::mhp, mksobj(), mon_nam(), mondied(), Monnam(), monst::mx, monst::my, newsym(), noncorporeal, obfree(), obj::owt, passes_walls, place_object(), pline(), obj::quan, rn1, ROCK, s_suffix(), flag::soundok, stackobj(), STOMACH, TRUE, u, unsolid, you::ustuck, W_ARMH, weight(), which_armor(), xkilled(), and xname().
Referenced by drop_boulder_on_player(), seffects(), and use_offensive().
void drop_boulder_on_player | ( | boolean | confused, |
boolean | helmet_protects, | ||
boolean | by_player, | ||
boolean | drop_directly_to_floor | ||
) |
helmet_protects | if player is protected by a hard helmet |
by_player | is boulder creation caused by player |
drop_directly_to_floor | don't check if player is swallowed by a monster |
References amorphous, BOULDER, monst::data, dmgval(), doname(), drop_boulder_on_monster(), FALSE, flags, flooreffects(), is_metallic, KILLED_BY_AN, losehp(), mksobj(), newsym(), noncorporeal, obj::owt, Passes_walls, place_object(), pline(), obj::quan, rn1, ROCK, stackobj(), u, uarmh, unsolid, you::ux, you::uy, flag::verbose, weight(), xname(), and youmonst.
Referenced by drop_boulder_on_monster(), seffects(), and use_offensive().
static void FDECL | ( | p_glow1 | , |
(struct obj *) | |||
) | [static] |
static void FDECL | ( | forget | , |
(int) | |||
) | [static] |
static void FDECL | ( | p_glow2 | , |
(struct obj *, const char *) | |||
) | [static] |
STATIC_PTR void FDECL | ( | do_flood | , |
(int, int, genericptr_t) | |||
) |
STATIC_PTR void FDECL | ( | undo_flood | , |
(int, int, genericptr_t) | |||
) |
static void FDECL | ( | stripspe | , |
(struct obj *) | |||
) | [static] |
STATIC_PTR void FDECL | ( | set_lit | , |
(int, int, genericptr_t) | |||
) |
static void FDECL | ( | randomize | , |
(int *, int) | |||
) | [static] |
static void FDECL | ( | wand_explode | , |
(struct obj *) | |||
) | [static] |
static void FDECL | ( | forget_single_object | , |
(int) | |||
) | [static] |
static void forget | ( | int | howmuch ) | [static] |
References ALL_SPELLS, you::bc_felt, docrt(), forget_levels(), forget_map(), forget_objects(), forget_traps(), losespells(), Punished, rn2(), and u.
Referenced by seffects().
void forget_levels | ( | int | percent ) |
References linfo::flags, flags, forget_mapseen(), FORGOTTEN, ledger_no(), ledger_to_dnum(), level_info, maxledgerno(), MAXLINFO, randomize(), sokoban_dnum, u, you::uz, and VISITED.
Referenced by forget(), and hitmu().
void forget_map | ( | int | howmuch ) |
References ALL_MAP, cmap_to_glyph, COLNO, In_sokoban, known, levl, rn2(), ROWNO, S_stone, STONE, TRUE, u, and you::uz.
Referenced by forget(), and goto_level().
void forget_objects | ( | int | percent ) |
References forget_single_object(), NUM_OBJECTS, OBJ_DESCR, objects, and randomize().
Referenced by forget(), and hitmu().
static void forget_single_object | ( | int | obj_id ) | [static] |
References Dragon_mail_to_scales, Dragon_scales_to_mail, Is_dragon_mail, Is_dragon_scales, objects, objclass::oc_uname, and undiscover_object().
Referenced by forget_objects().
void forget_traps | ( | ) |
References ftrap, HOLE, trap::ntrap, trap::tx, trap::ty, u, you::ux, and you::uy.
Referenced by forget(), and goto_level().
References FALSE, is_weptool, objects, objclass::oc_uname, RING_CLASS, TOOL_CLASS, TRUE, and WAND_CLASS.
Referenced by getobj().
References artifact_light(), Blind, monst::data, do_clear_area(), mkroom::hx, mkroom::hy, invent, is_animal, Is_rogue_level, Is_waterlevel, is_whirly, levl, mbodypart(), Monnam(), move_bc(), obj::nobj, obj::oclass, otmp, obj::ox, obj::oy, pline(), Punished, mkroom::rlit, ROOMOFFSET, rooms, s_suffix(), SCROLL_CLASS, set_lit(), snuff_lit(), STOMACH, the(), u, uball, uchain, Underwater, you::ustuck, uwep, you::ux, you::uy, you::uz, vision_full_recalc, vision_recalc(), and xname().
Referenced by do_break_wand(), seffects(), and zapnodir().
References FALSE, make_happy_shk(), NOTELL, obj::oclass, resist(), setmangry(), STATIC_PTR, tamedog(), u, and you::uz.
Referenced by seffects().
static void NDECL | ( | do_class_genocide | ) | [static] |
static void p_glow1 | ( | struct obj * | otmp ) | [static] |
References Blind, otense(), and xname().
Referenced by recharge().
static void p_glow2 | ( | struct obj * | otmp, |
const char * | color | ||
) | [static] |
References Blind, hcolor(), nul, otense(), and xname().
Referenced by recharge(), and seffects().
void punish | ( | struct obj * | sobj ) |
References amorphous, BALL_CLASS, Blind, CHAIN_CLASS, monst::data, dropy(), is_whirly, mkobj(), newsym(), obj::owt, placebc(), pline(), Punished, set_bc(), setworn(), obj::spe, TRUE, u, uball, unsolid, you::ux, you::uy, W_BALL, W_CHAIN, and youmonst.
Referenced by angrygods(), and seffects().
static void randomize | ( | int * | indices, |
int | count | ||
) | [static] |
References rn2().
Referenced by forget_levels(), and forget_objects().
void recharge | ( | struct obj * | obj, |
int | curse_bless | ||
) |
References BAG_OF_TRICKS, BELL_OF_OPENING, Blind, BRASS_LANTERN, CAN_OF_GREASE, obj::cobj, CRYSTAL_BALL, currency(), d(), DRUM_OF_EARTHQUAKE, end_burn(), EXPENSIVE_CAMERA, FIRE_HORN, FROST_HORN, HORN_OF_PLENTY, if(), KILLED_BY_AN, LEFT_RING, losehp(), MAGIC_FLUTE, MAGIC_HARP, MAGIC_MARKER, makeknown, NH_BLUE, NH_WHITE, obj::nobj, NODIR, nothing_happens, obfree(), obj_extract_self(), objects, OIL_LAMP, otense(), otmp, p_glow1(), p_glow2(), pline(), RIGHT_RING, RING_CLASS, Ring_gone(), Ring_off(), Ring_on(), rn1, rn2(), rnd(), setworn(), shop_keeper(), obj::spe, stolen_value(), stripspe(), TINNING_KIT, Tobjnam(), TOOL_CLASS, TRUE, u, uleft, uright, useup(), you::ushops, you::ux, you::uy, WAN_WISHING, WAND_CLASS, wand_explode(), xname(), and yname().
Referenced by arti_invoke(), and seffects().
int seffects | ( | struct obj * | sobj ) |
References A_CON, A_DEX, A_INT, A_STR, A_WIS, ABON, adj_abon(), all_count, ALL_MAP, ALL_SPELLS, AMULET_CLASS, aobjnam(), ARMOR_CLASS, Armor_gone(), bcsign(), BLACK_DRAGON_SCALE_MAIL, BLACK_DRAGON_SCALES, BLACKMARKET, blessorcurse(), Blind, body_part(), Boots_off(), flag::botl, burn_away_slime(), cansee, ceiling(), change_luck(), chwepon(), Cloak_off(), closed_door(), COIN_CLASS, COLNO, Confusion, CORNUTHAUM, couldsee, create_critters(), create_gas_cloud(), cvt_sdoor_to_door(), d(), monst::data, DEADMONSTER, destroy_arm(), distu, do_clear_area(), do_flood(), do_genocide(), do_mapping(), drop_boulder_on_monster(), drop_boulder_on_player(), drown(), exercise(), EXPL_FIERY, explode(), FALSE, Fire_resistance, dlevel_t::flags, flags, Flying, fmon, FOOD_CLASS, food_detect(), forget(), GAUNTLETS_OF_DEXTERITY, GEM_CLASS, getobj(), getpos(), Gloves_off(), gold_detect(), goodpos(), GRAY_DRAGON_SCALE_MAIL, GRAY_DRAGON_SCALES, Hallucination, HAND, hcolor(), HConfusion, HEAD, HELM_OF_BRILLIANCE, Helmet_off(), HStun, identify_pack(), In_endgame, In_sokoban, invent, IS_AIR, is_boots, is_cloak, Is_earthlevel, is_elven_armor, is_gloves, is_helmet, IS_ROCK, Is_rogue_level, is_shield, is_weptool, isok(), KILLED_BY_AN, known, LEASH, level, level_tele(), Levitation, levl, litroom(), LOADSTONE, losehp(), Luck, m_at, make_confused(), make_stunned(), makeknown, makeplural(), maybe_tame(), permonst::mlet, monflee(), mons, more_experienced(), monst::mtame, monst::mx, monst::my, Never_mind, NH_BLACK, NH_GOLDEN, NH_PURPLE, NH_RED, NH_SILVER, monst::nmon, obj::nobj, NOTELL, nul, object_detect(), objects, obj::oclass, otense(), otmp, obj::otyp, obj::owornmask, p_glow2(), pline(), plname, PM_ACID_BLOB, PM_WIZARD, POTION_CLASS, punish(), Punished, recharge(), REINCARNATION, resist(), RING_CLASS, rn1, rn2(), rnd(), Role_if, ROWNO, S_HUMAN, SCR_BLANK_PAPER, SCR_CHARGING, SCR_CONFUSE_MONSTER, SCR_CREATE_MONSTER, SCR_DESTROY_ARMOR, SCR_EARTH, SCR_ENCHANT_ARMOR, SCR_ENCHANT_WEAPON, SCR_FIRE, SCR_FLOOD, SCR_FOOD_DETECTION, SCR_GENOCIDE, SCR_GOLD_DETECTION, SCR_IDENTIFY, SCR_LIGHT, SCR_MAGIC_MAPPING, SCR_MAIL, SCR_PUNISHMENT, SCR_REMOVE_CURSE, SCR_SCARE_MONSTER, SCR_STINKING_CLOUD, SCR_TAMING, SCR_TELEPORTATION, SCROLL_CLASS, SDOOR, setworn(), SHIELD_OF_REFLECTION, Shield_off(), shieldeff(), SILVER_DRAGON_SCALE_MAIL, SILVER_DRAGON_SCALES, SIZE, some_armor(), something, SPBOOK_CLASS, obj::spe, SPE_CAUSE_FEAR, SPE_CHARM_MONSTER, SPE_CONFUSE_MONSTER, SPE_CREATE_MONSTER, SPE_DETECT_FOOD, SPE_IDENTIFY, SPE_MAGIC_MAPPING, SPE_REMOVE_CURSE, strange_feeling(), strncmpi(), surface(), tele(), Teleport_control, TOOL_CLASS, trap_detect(), TRUE, you::twoweap, u, uarm, you::uen, you::uenmax, you::umconf, uncurse(), Underwater, undo_flood(), unpunish(), update_inventory, uquiver, useup(), uslinging, you::ustuck, uswapwep, uwep, you::ux, you::ux0, you::uy, you::uy0, you::uz, W_ARM, W_ART, W_ARTI, W_BALL, WAND_CLASS, WEAPON_CLASS, Wwalking, nhcoord::x, xname(), nhcoord::y, YELLOW_DRAGON_SCALES, yn, and youmonst.
Referenced by arti_invoke(), domagictrap(), doread(), and spelleffects().
STATIC_PTR void set_lit | ( | int | x, |
int | y, | ||
genericptr_t | val | ||
) |
References levl, and snuff_light_source().
Referenced by litroom().
static void stripspe | ( | struct obj * | obj ) | [static] |
References BRASS_LANTERN, nothing_happens, OIL_LAMP, otense(), pline(), and xname().
Referenced by recharge().
STATIC_PTR void undo_flood | ( | int | x, |
int | y, | ||
genericptr_t | roomcnt | ||
) |
void unpunish | ( | ) |
References dealloc_obj(), newsym(), obj_extract_self(), obj::ox, obj::oy, setworn(), obj::spe, uball, uchain, W_BALL, and W_CHAIN.
Referenced by bhito(), bury_an_obj(), chest_trap(), delallobj(), dog_eat(), doremove(), eatspecial(), fix_worst_trouble(), meatmetal(), polymon(), remove_worn_item(), seffects(), and use_bell().
static void wand_explode | ( | struct obj * | obj ) | [static] |
References A_STR, exercise(), FALSE, KILLED_BY_AN, losehp(), nhbell, rnd(), TRUE, u, you::uhpmax, useup(), and xname().
Referenced by recharge().
const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 } [static] |
Referenced by seffects().
Referenced by create_critters(), doread(), food_detect(), forget_map(), gold_detect(), seffects(), use_defensive(), and zapnodir().
NEARDATA const char readable[] [static] |
{ COIN_CLASS, ALL_CLASSES, SCROLL_CLASS, SPBOOK_CLASS, 0 }
Referenced by doread().