#include "hack.h"
Defines | |
#define | IS_SHOP(x) (rooms[x].rtype >= SHOPBASE) |
#define | goodtype(rno) |
Functions | |
STATIC_DCL void | NDECL (maybe_wail) |
STATIC_DCL int | NDECL (moverock) |
STATIC_DCL int | FDECL (still_chewing,(XCHAR_P, XCHAR_P)) |
STATIC_DCL boolean | FDECL (findtravelpath,(BOOLEAN_P)) |
STATIC_DCL boolean | FDECL (monstinroom,(struct permonst *, int)) |
STATIC_DCL void | FDECL (move_update,(BOOLEAN_P)) |
boolean | revive_nasty (int x, int y, const char *msg) |
STATIC_OVL int | moverock () |
STATIC_OVL int | still_chewing (xchar x, xchar y) |
void | movobj (struct obj *obj, xchar ox, xchar oy) |
boolean | may_dig (xchar x, xchar y) |
boolean | may_passwall (xchar x, xchar y) |
boolean | bad_rock (struct permonst *mdat, xchar x, xchar y) |
boolean | invocation_pos (xchar x, xchar y) |
boolean | test_move (int ux, int uy, int dx, int dy, int mode) |
static boolean | findtravelpath (boolean guess) |
void | domove () |
void | invocation_message () |
void | spoteffects (boolean pick) |
STATIC_OVL boolean | monstinroom (struct permonst *mdat, int roomno) |
char * | in_rooms (xchar x, xchar y, int typewanted) |
boolean | in_town (int x, int y) |
STATIC_OVL void | move_update (boolean newlev) |
void | check_special_room (boolean newlev) |
int | dopickup () |
void | lookaround () |
int | monster_nearby () |
void | nomul (int nval, const char *txt) |
void | unmul (char *msg_override) const |
STATIC_OVL void | maybe_wail () |
void | showdmg (int n, boolean you) |
void | losehp (int n, const char *knam, boolean k_format) |
void | losehp_how (int n, const char *knam, boolean k_format, int how) |
int | weight_cap () |
int | inv_weight () |
int | calc_capacity (int xtra_wt) |
int | near_capacity () |
int | max_capacity () |
boolean | check_capacity (char *str) const |
int | inv_cnt () |
Variables | |
static boolean | door_opened |
static int | wc |
#define goodtype | ( | rno ) |
(!typewanted || \ ((typefound = rooms[rno - ROOMOFFSET].rtype) == typewanted) || \ ((typewanted == SHOPBASE) && (typefound > SHOPBASE))) \
Referenced by in_rooms().
#define IS_SHOP | ( | x ) | (rooms[x].rtype >= SHOPBASE) |
Referenced by move_update().
References BOULDER, In_sokoban, IS_ROCK, levl, may_dig(), may_passwall(), needspick, passes_walls, sobj_at(), tunnels, u, and you::uz.
Referenced by domove(), hurtle_step(), mfndpos(), test_move(), and try_disarm().
int calc_capacity | ( | int | xtra_wt ) |
References inv_weight(), min, OVERLOADED, UNENCUMBERED, and wc.
Referenced by lift_object(), near_capacity(), pickup_object(), and throwit().
boolean check_capacity | ( | char * | str ) | const |
References EXT_ENCUMBER, near_capacity(), and pline().
Referenced by attack(), doapply(), doeat(), dofire(), doloot(), doread(), dotele(), dothrow(), dozap(), engrave(), help_monster_out(), and spelleffects().
void check_special_room | ( | boolean | newlev ) |
References ANTHOLE, ARMORY, BARRACKS, BEEHIVE, Blind, check_tutorial_message(), COCKNEST, COURT, monst::data, DEADMONSTER, DELPHI, dlevel_t::flags, fmon, GARDEN, Hello(), intemple(), LEMUREPIT, LEPREHALL, level, locomotion(), midnight(), mons, monstinroom(), MORGUE, move_update(), monst::nmon, OROOM, pline(), plname, PM_CAPTAIN, PM_LIEUTENANT, PM_ORACLE, PM_SERGEANT, PM_SOLDIER, QT_T_ORACLE, rn2(), ROOMOFFSET, rooms, mkroom::rtype, search_special(), Stealth, SWAMP, TEMPLE, u, u_entered_shop(), u_left_shop(), you::uentered, you::ushops0, you::ushops_entered, you::ushops_left, youmonst, and ZOO.
Referenced by after_shk_move(), goto_level(), move_special(), newgame(), and spoteffects().
void domove | ( | ) |
References A_CON, A_DEX, abuse_dog(), adjalign(), ART_STING, AT_EXPL, attack(), attacktype(), bad_rock(), bhitpos, bigmonst, Blind, body_part(), flag::botl, BOULDER, BUFSZ, canspotmon, check_leash(), clear_nhwindow, Cold_resistance, CONDUCT_PACIFISM, confdir(), Conflict, Confusion, curr_mon_load(), curs_on_u(), monst::data, defsyms, delay_output, display_nhwindow, distu, DO_MOVE, drag_ball(), you::dx, you::dy, exercise(), expl, symdef::explanation, fall_asleep(), FALSE, fill_pit(), find_skates(), findtravelpath(), flags, Flying, flag::forcefight, FROMOUTSIDE, gethungry(), glyph_is_invisible, growl(), Hallucination, HFumbling, hides_under, HVY_ENCUMBER, iflags, in_out_region(), In_sokoban, invocation_message(), Is_airlevel, is_clinger, IS_DOOR, is_floater, IS_FURNITURE, is_hider, is_ice(), is_lava(), is_pool(), IS_ROCK, is_safepet, Is_waterlevel, is_whirly, isok(), LEG, Levitation, levl, locomotion(), M_AP_FURNITURE, M_AP_NOTHING, M_AP_OBJECT, monst::m_ap_type, m_at, m_monnam(), m_unleash(), you::mh, you::mhmax, minliquid(), mintrap(), permonst::mlet, permonst::mmove, mon_nam(), mon_visible, flag::move, move_bc(), moves, monst::mtame, multi, monst::mx, monst::my, near_capacity(), newsym(), nomovemsg, nomul(), flag::nopick, obj::oartifact, OBJ_AT, obj::otyp, OVERLOADED, instance_flags::paranoid_trap, PIT, pline(), Protection_from_shape_changers, Punished, rehumanize(), remove_monster(), reset_occupations(), resists_cold, rn2(), rnd(), flag::run, RUN_CRAWL, RUN_LEAP, RUN_TPORT, instance_flags::runmode, S_EEL, seemimic(), sensemon, SLT_ENCUMBER, sobj_at(), SPIKED_PIT, spoteffects(), Sprintf, STEED, sticks(), Strcpy, stumble_onto_mimic(), Stunned, surface(), t_at(), test_move(), flag::time, TIMEOUT, trap_to_defsym, flag::travel, instance_flags::travel1, TRUE, TT_INFLOOR, TT_LAVA, TT_PIT, TT_WEB, trap::tx, trap::ty, rm::typ, u, u_wipe_engr(), uarmf, you::ugangr, you::uhp, you::uhpmax, you::umoved, Underwater, unmap_object(), Upolyd, upstart(), you::ustuck, you::utrap, you::utraptype, uwep, you::ux, you::ux0, you::uy, you::uy0, you::uz, flag::verbose, violated(), vision_full_recalc, vision_recalc(), water_friction(), WIN_MESSAGE, trap::x, nhcoord::x, trap::y, nhcoord::y, y_monnam(), yelp(), yn, and youmonst.
Referenced by moveloop(), and rhack().
int dopickup | ( | ) |
References Blind, Breathless, can_reach_floor(), monst::data, Flying, is_animal, is_clinger, is_floater, is_lava(), is_pool(), likes_lava, loot_mon(), monst::minvent, mon_nam(), multi, OBJ_AT, P_BASIC, P_SKILL, pickup(), PIT, pline(), s_suffix(), save_cm, something, SPIKED_PIT, surface(), t_at(), TT_PIT, u, Underwater, you::ustuck, you::utrap, you::utraptype, you::ux, you::uy, Wwalking, y_monnam(), and youmonst.
STATIC_DCL boolean FDECL | ( | findtravelpath | , |
(BOOLEAN_P) | |||
) |
STATIC_DCL int FDECL | ( | still_chewing | , |
(XCHAR_P, XCHAR_P) | |||
) |
STATIC_DCL void FDECL | ( | move_update | , |
(BOOLEAN_P) | |||
) |
References Blind, BOULDER, can_ooze(), closed_door(), COLNO, couldsee, dist2(), distmin(), you::dx, you::dy, FALSE, flags, iflags, isok(), levl, nomul(), Passes_walls, PM_GRID_BUG, ROWNO, flag::run, sgn(), sobj_at(), TEST_MOVE, test_move(), TEST_TRAV, instance_flags::travel1, instance_flags::travelcc, TRUE, you::tx, you::ty, u, you::umonnum, you::ux, you::uy, nhcoord::x, xdir, nhcoord::y, ydir, and youmonst.
Referenced by domove().
References COLNO, goodtype, index, levl, NO_ROOM, ROOMOFFSET, ROWNO, SHARED, SHARED_PLUS, and step.
Referenced by add_damage(), attack(), bhit(), block_door(), block_entry(), breakobj(), ceiling(), check_shop_obj(), chest_trap(), container_impact_dmg(), costly_cancel(), costly_gold(), costly_spot(), create_altar(), dig(), digactualhole(), do_break_wand(), do_earthquake(), dokick(), doname_base(), doorlock(), dosdoor(), gd_move(), get_cost_of_shop_item(), histemple_at(), impact_drop(), in_your_sanctuary(), inhishop(), kick_object(), m_move(), maketrap(), mbhit(), mbhitm(), mdig_tunnel(), mfndpos(), mon_arrive(), monstinroom(), move_update(), pay_for_damage(), pick_obj(), picklock(), poly_obj(), potionhit(), priest_talk(), remote_burglary(), remove_damage(), restdamage(), rloco(), sellobj(), set_trap(), ship_object(), shop_object(), still_chewing(), stolen_value(), throwit(), u_entered_shop(), u_teleport_mon(), untrap(), useupf(), zap_dig(), and zap_over_floor().
boolean in_town | ( | int | x, |
int | y | ||
) |
References FALSE, s_level::flags, mkroom::hx, inside_room(), Is_special(), mkroom::nsubrooms, rooms, TRUE, u, and you::uz.
Referenced by dig(), dipfountain(), dokick(), dryup(), mdig_tunnel(), still_chewing(), watch_dig(), watch_on_duty(), and zap_dig().
int inv_cnt | ( | ) |
References invent, and obj::nobj.
Referenced by damageum(), dog_eat(), emergency_disrobe(), hold_another_object(), lift_object(), steal(), touchfood(), and use_container().
int inv_weight | ( | ) |
References BOULDER, COIN_CLASS, monst::data, invent, obj::nobj, obj::oclass, obj::otyp, obj::owt, obj::quan, throws_rocks, u, you::ugold, weight_cap(), and youmonst.
Referenced by calc_capacity(), dokick(), help_monster_out(), hurtle_step(), kick_monster(), max_capacity(), moverock(), nh_timeout(), test_move(), try_disarm(), and u_init().
void invocation_message | ( | ) |
References Blind, body_part(), BUFSZ, CANDELABRUM_OF_INVOCATION, carrying(), distu, Flying, FOOT, inv_pos, Invocation_lev(), invocation_pos(), Levitation, makeplural(), nomul(), On_stairs(), pline(), obj::spe, Sprintf, Strcpy, The(), u, you::ux, you::uy, you::uz, nhcoord::x, xname(), nhcoord::y, and y_monnam().
Referenced by domove(), and teleds().
References inv_pos, Invocation_lev(), u, you::uz, nhcoord::x, and nhcoord::y.
Referenced by deadbook(), invocation_message(), occupied(), use_bell(), and use_candelabrum().
void lookaround | ( | ) |
References Blind, closed_door(), CORR, monst::data, dist2(), you::dx, you::dy, flags, Flying, IS_AIR, is_clinger, is_lava(), is_pool(), IS_ROCK, isok(), you::last_str_turn, Levitation, levl, M_AP_FURNITURE, M_AP_OBJECT, monst::m_ap_type, m_at, monst::mappearance, monst::mtame, nomul(), PM_GRID_BUG, ROOM, flag::run, S_hcdoor, S_vcdoor, See_invisible, STONE, t_at(), u, you::umonnum, you::ux, you::uy, trap::x, trap::y, and youmonst.
Referenced by moveloop().
void losehp | ( | int | n, |
const char * | knam, | ||
boolean | k_format | ||
) |
References DIED, and losehp_how().
Referenced by b_trapped(), backfire(), bagotricks(), ballfall(), boulder_hits_pool(), chest_trap(), corpse_chance(), cursed_book(), destroy_item(), dip(), do_break_wand(), do_earthquake(), do_improvisation(), dochug(), doeat(), dofiretrap(), dokick(), doloot(), dosit(), dotrap(), dozap(), drag_down(), drinkfountain(), drop_ball(), drop_boulder_on_player(), drown(), eatcorpse(), float_down(), flooreffects(), get_wet(), goto_level(), hurtle_step(), in_container(), inside_gas_cloud(), jump(), lava_effects(), mbhitm(), peffects(), poisoned(), polyself(), potionhit(), prayer_done(), recharge(), seffects(), spelleffects(), thitu(), throwit(), toss_up(), touch_artifact(), use_crystal_ball(), use_grapple(), use_offensive(), use_pick_axe2(), use_whip(), wand_explode(), zap_dig(), zap_updown(), and zhitu().
void losehp_how | ( | int | n, |
const char * | knam, | ||
boolean | k_format, | ||
int | how | ||
) |
References flag::botl, done(), flags, killer, killer_format, maybe_wail(), you::mh, you::mhmax, rehumanize(), showdmg(), TRUE, u, you::uhp, you::uhpmax, Unchanging, and Upolyd.
Referenced by losehp(), and poisoned().
int max_capacity | ( | ) |
References inv_weight().
Referenced by carry_count(), and pickup_object().
References IS_STWALL, levl, and W_NONDIGGABLE.
Referenced by bad_rock(), can_reach_location(), dig(), dog_move(), m_move(), mfndpos(), still_chewing(), and zap_dig().
References IS_STWALL, levl, and W_NONPASSWALL.
Referenced by bad_rock(), badpos(), figurine_location_checks(), goodpos(), hurtle_step(), mfndpos(), and test_move().
STATIC_OVL void maybe_wail | ( | ) |
References COLD_RES, DISINT_RES, FAST, FIRE_RES, if(), INTRINSIC, prop::intrinsic, INVIS, RoleName::m, moves, Role::name, pline(), PM_ELF, PM_VALKYRIE, PM_WIZARD, POISON_RES, Race_if, Role_if, SEE_INVIS, SHOCK_RES, SIZE, SLEEP_RES, STEALTH, TELEPORT, TELEPORT_CONTROL, u, you::uhp, you::uprops, urole, and wailmsg.
Referenced by losehp_how().
int monster_nearby | ( | ) |
References canspotmon, monst::data, Hallucination, is_hider, isok(), M_AP_FURNITURE, M_AP_OBJECT, monst::m_ap_type, m_at, noattacks(), onscary(), u, you::ux, you::uy, trap::x, and trap::y.
Referenced by moveloop().
References monst::data, DEADMONSTER, FALSE, fmon, in_rooms(), index, monst::mx, monst::my, monst::nmon, ROOMOFFSET, and TRUE.
Referenced by check_special_room().
STATIC_OVL void move_update | ( | boolean | newlev ) |
References in_rooms(), index, IS_SHOP, ROOMOFFSET, Strcpy, u, you::uentered, you::urooms, you::urooms0, you::ushops, you::ushops0, you::ushops_entered, you::ushops_left, you::ux, and you::uy.
Referenced by check_special_room().
STATIC_OVL int moverock | ( | ) |
References a_monnam(), A_STR, add_to_migration(), Blind, blow_up_landmine(), BOULDER, boulder_hits_pool(), bury_objs(), cansee, canspotmon, change_luck(), closed_door(), D_BROKEN, D_NODOOR, monst::data, delobj(), deltrap(), depth(), d_level::dlevel, d_level::dnum, doormask, you::dx, you::dy, exercise(), feel_location(), fill_pit(), flags, flooreffects(), fobj, get_level(), glyph_is_invisible, HOLE, In_endgame, IN_SIGHT, In_sokoban, inv_weight(), invent, IRONBARS, Is_airlevel, IS_DOOR, IS_ROCK, Is_rogue_level, isok(), LANDMINE, level, LEVEL_TELEP, Levitation, levl, m_at, map_invisible(), MIGR_RANDOM, moves, movobj(), NEARDATA, newsym(), nomul(), noncorporeal, nul, obj_extract_self(), dlevel_t::objects, otense(), otmp, obj::owornmask, obj::ox, obj::oy, P_BASIC, P_SKILL, flag::pickup, PIT, place_object(), pline(), random_teleport_level(), REINCARNATION, remove_object(), revive_nasty(), rloco(), rn2(), seetrap(), sobj_at(), SPIKED_PIT, STEED, surface(), t_at(), TELEP_TRAP, The(), the(), throws_rocks, Tobjnam(), TRAPDOOR, TRUE, u, unblock_point(), unmap_object(), upstart(), you::ux, you::uy, you::uz, flag::verbose, verysmall, viz_array, xname(), y_monnam(), and youmonst.
Referenced by test_move().
References newsym(), place_object(), and remove_object().
Referenced by drop_ball(), float_down(), move_bc(), and moverock().
STATIC_DCL void NDECL | ( | maybe_wail | ) |
STATIC_DCL int NDECL | ( | moverock | ) |
int near_capacity | ( | ) |
References calc_capacity().
Referenced by bot2(), check_capacity(), dokick(), domove(), dountrap(), doup(), drag_ball(), emergency_disrobe(), encumber_msg(), exerper(), find_roll_to_hit(), gethungry(), goto_level(), hold_another_object(), in_trouble(), jump(), lift_object(), maybe_tutorial(), out_container(), pickup_object(), and worst_cursed_item().
void nomul | ( | int | nval, |
const char * | txt | ||
) |
References BUFSZ, FALSE, flags, iflags, multi, multi_txt, flag::mv, flag::run, flag::travel, instance_flags::travel1, u, and you::usleep.
Referenced by armoroff(), bagotricks(), breamu(), buzz(), buzzmu(), cast_cleric_spell(), castmu(), check_here(), chest_trap(), cpostfx(), do_break_wand(), do_storms(), doapply(), dogaze(), domonnoise(), domove(), done1(), done2(), dopray(), dosacrifice(), dosave(), dosearch0(), dotrap(), doturn(), dowear(), drag_ball(), fall_asleep(), findtravelpath(), ghost_from_bottle(), growl(), gulpum(), hitmu(), hurtle(), intemple(), interrupt_multi(), invault(), invocation_message(), jump(), launch_obj(), learn(), lookaround(), m_throw(), mattacku(), Mb_hit(), mbhitm(), moveloop(), moverock(), newuhs(), nh_timeout(), passive(), peffects(), pickup(), pickup_object(), potionbreathe(), read_engr_at(), rehumanize(), reset_faint(), rottenfood(), scatter(), slime_dialogue(), spitmu(), steal(), still_chewing(), stoned_dialogue(), stop_occupation(), study_book(), teleds(), thrwmu(), use_bell(), use_container(), use_crystal_ball(), use_mirror(), use_pick_axe2(), vomit(), whimper(), and yelp().
boolean revive_nasty | ( | int | x, |
int | y, | ||
const char * | msg | ||
) |
References CORPSE, obj::corpsenm, monst::data, enexto(), FALSE, goodpos(), is_rider, level, m_at, mons, dlevel_t::objects, otmp, obj::otyp, PM_WIZARD_OF_YENDOR, revive_corpse(), rloc_to(), nhcoord::x, and nhcoord::y.
Referenced by close_drawbridge(), moverock(), and open_drawbridge().
void showdmg | ( | int | n, |
boolean | you | ||
) |
Print the amount n of damage inflicted. In contrast to Slash'Em, in UnNetHack the damage is only shown in Wizard mode.
n | Print the amount n of damage inflicted. In contrast to Slash'Em, in UnNetHack the damage is only shown in Wizard mode. amount of damage inflicted |
you | Print the amount n of damage inflicted. In contrast to Slash'Em, in UnNetHack the damage is only shown in Wizard mode. true, if you are hit |
References iflags, pline(), instance_flags::showdmg, and wizard.
Referenced by buzz(), damageum(), explode(), hmon_hitmon(), kickdmg(), losehp_how(), and mdamageu().
void spoteffects | ( | boolean | pick ) |
References a_monnam(), Amonnam(), ARTICLE_A, Blind, ceiling(), check_special_room(), d(), monst::data, docrt(), dotrap(), drown(), FALSE, Flying, Half_physical_damage, in_steed_dismounting, Is_airlevel, is_clinger, is_floater, is_flyer, is_ice(), is_lava(), is_metallic, is_pool(), IS_SINK, Is_waterlevel, lava_effects(), Levitation, levl, m_at, mdamageu(), permonst::mlet, mnexto(), monst::mtame, pickup(), PIT, pline(), rnd(), S_PIERCER, sensemon, something, SPIKED_PIT, t_at(), TRUE, u, you::uac, uarmh, Underwater, you::ustuck, you::ux, you::uy, you::uz, vision_full_recalc, Wwalking, and x_monnam().
Referenced by arti_invoke(), Boots_off(), Boots_on(), digactualhole(), do_entity(), domove(), drag_ball(), drop_ball(), expels(), float_up(), melt_ice(), move_into_trap(), peffects(), polyman(), polymon(), Ring_on(), teleds(), use_grapple(), and xkilled().
References ACURRSTR, add_damage(), assign_level(), b_trapped(), block_point(), BOULDER, dig_info::chew, closed_door(), CONDUCT_FOODLESS, CORR, D_BROKEN, D_NODOOR, D_TRAPPED, delobj(), digging, DOOR, dig_info::down, dig_info::effort, FALSE, dlevel_t::flags, flags, in_rooms(), in_town(), IS_DOOR, IS_ROCK, IS_TREE, IS_WALL, level, dig_info::level, levl, may_dig(), newsym(), nomul(), on_level(), pay_for_damage(), dig_info::pos, rnd(), ROOM, SDOOR, SHOPBASE, sobj_at(), TRUE, rm::typ, u, you::udaminc, you::uhunger, unblock_point(), you::uz, flag::verbose, violated(), dig_info::warned, watch_dig(), nhcoord::x, and nhcoord::y.
Referenced by test_move().
boolean test_move | ( | int | ux, |
int | uy, | ||
int | dx, | ||
int | dy, | ||
int | mode | ||
) |
References A_DEX, ACURR, amorphous, flag::autodig, bad_rock(), bigmonst, Blind, block_door(), block_entry(), BOULDER, can_ooze(), carrying(), closed_door(), Confusion, D_BROKEN, monst::data, DO_MOVE, DWARVISH_MATTOCK, exercise(), FALSE, feel_location(), flags, Flying, Fumbling, Hallucination, iflags, In_sokoban, inv_weight(), invent, IRONBARS, is_clinger, is_db_wall(), IS_DOOR, is_lava(), is_pick, is_pool(), IS_ROCK, Is_rogue_level, Is_stronghold, Levitation, levl, may_passwall(), flag::move, moverock(), needspick, flag::nopick, objects, obj::otyp, passes_bars(), Passes_walls, PICK_AXE, pline(), REINCARNATION, flag::run, sobj_at(), still_chewing(), Stunned, t_at(), TEST_TRAV, TRUE, tunnels, rm::typ, u, use_pick_axe2(), uwep, you::ux, you::uy, you::uz, WAN_DIGGING, weight_cap(), y_monnam(), and youmonst.
Referenced by bhit(), click_to_cmd(), domove(), and findtravelpath().
void unmul | ( | char * | msg_override ) | const |
References BUFSZ, multi, multi_txt, nomovemsg, pline(), u, you::usleep, and You_can_move_again.
Referenced by drown(), invault(), mattacku(), moveloop(), polyman(), polymon(), and steal().
int weight_cap | ( | ) |
References A_CON, ACURR, ACURRSTR, permonst::cwt, monst::data, EWounded_legs, Flying, Is_airlevel, LEFT_SIDE, Levitation, MAX_CARR_CAP, permonst::mlet, permonst::msize, MZ_HUMAN, RIGHT_SIDE, S_NYMPH, strongmonst, u, Upolyd, you::uz, WT_HUMAN, and youmonst.
Referenced by dokick(), hurtle_step(), inv_weight(), kick_monster(), litter(), test_move(), try_disarm(), and try_lift().
boolean door_opened [static] |
int wc [static] |
Referenced by calc_capacity(), and try_lift().