#include "hack.h"
#include "edog.h"
Defines | |
#define | DIGTYP_UNDIGGABLE 0 |
#define | DIGTYP_ROCK 1 |
#define | DIGTYP_STATUE 2 |
#define | DIGTYP_BOULDER 3 |
#define | DIGTYP_DOOR 4 |
#define | DIGTYP_TREE 5 |
#define | BY_YOU (&youmonst) |
#define | BY_OBJECT ((struct monst *)0) |
Functions | |
STATIC_DCL boolean | NDECL (rm_waslit) |
STATIC_DCL void | FDECL (mkcavepos,(XCHAR_P, XCHAR_P, int, BOOLEAN_P, BOOLEAN_P)) |
STATIC_DCL void | FDECL (mkcavearea,(BOOLEAN_P)) |
STATIC_DCL int | FDECL (dig_typ,(struct obj *, XCHAR_P, XCHAR_P)) |
STATIC_DCL int | NDECL (dig) |
STATIC_DCL schar | FDECL (fillholetyp,(int, int)) |
STATIC_DCL void | NDECL (dig_up_grave) |
STATIC_OVL boolean | rm_waslit () |
STATIC_OVL void | mkcavepos (xchar x, xchar y, int dist, boolean waslit, boolean rockit) |
STATIC_OVL void | mkcavearea (boolean rockit) |
STATIC_OVL int | dig_typ (struct obj *otmp, xchar x, xchar y) |
boolean | is_digging () |
boolean | dig_check (struct monst *madeby, boolean verbose, int x, int y) |
STATIC_OVL int | dig () |
int | holetime () |
STATIC_OVL schar | fillholetyp (int x, int y) |
void | digactualhole (int x, int y, struct monst *madeby, int ttyp) |
boolean | dighole (boolean pit_only) |
STATIC_OVL void | dig_up_grave () |
int | use_pick_axe (struct obj *obj) |
int | use_pick_axe2 (struct obj *obj) |
void | watch_dig (struct monst *mtmp, xchar x, xchar y, boolean zap) |
boolean | mdig_tunnel (struct monst *mtmp) |
void | zap_dig () |
struct obj * | bury_an_obj (struct obj *otmp) |
void | bury_objs (int x, int y) |
void | unearth_objs (int x, int y) |
void | rot_organic (genericptr_t arg, long timeout) |
void | rot_corpse (genericptr_t arg, long timeout) |
Variables | |
static NEARDATA boolean | did_dig_msg |
#define BY_OBJECT ((struct monst *)0) |
Referenced by dig_check(), and digactualhole().
#define BY_YOU (&youmonst) |
Referenced by dig(), dig_check(), digactualhole(), and dighole().
#define DIGTYP_BOULDER 3 |
Referenced by dig_typ().
#define DIGTYP_ROCK 1 |
Referenced by dig(), dig_typ(), and use_pick_axe2().
#define DIGTYP_STATUE 2 |
Referenced by dig_typ().
#define DIGTYP_UNDIGGABLE 0 |
Referenced by dig_typ(), use_pick_axe(), and use_pick_axe2().
References add_to_buried(), CORPSE, end_burn(), is_ice(), is_organic, LEASH, o_unleash(), obfree(), obj_extract_self(), obj_resists(), pline(), POT_OIL, POTION_CLASS, rnd(), ROCK, ROT_ORGANIC, start_timer(), TIMER_OBJECT, TRUE, uball, uchain, unpunish(), and xname().
Referenced by bury_objs(), create_object(), and rot_organic().
void bury_objs | ( | int | x, |
int | y | ||
) |
References bury_an_obj(), del_engr_at(), level, newsym(), dlevel_t::objects, otmp, and pline().
Referenced by boulder_hits_pool(), dospinweb(), flooreffects(), moverock(), and zap_over_floor().
STATIC_OVL int dig | ( | ) |
References abon(), ACURRSTR, add_damage(), altar_wrath(), angry_priest(), b_trapped(), Blind, BOULDER, break_statue(), BY_YOU, closed_door(), CORR, cvt_sdoor_to_door(), D_BROKEN, D_NODOOR, D_TRAPPED, did_dig_msg, dig_check(), dig_typ(), digging, dighole(), DIGTYP_DOOR, DIGTYP_ROCK, DIGTYP_TREE, distu, d_level::dlevel, d_level::dnum, does_block(), DOOR, dig_info::down, dropx(), dig_info::effort, FALSE, feel_location(), dlevel_t::flags, fracture_rock(), Fumbling, greatest_erosion, HOLE, in_rooms(), in_town(), IS_ALTAR, is_axe, IS_DOOR, Is_earthlevel, is_pick, IS_ROCK, IS_TREE, IS_WALL, dig_info::lastdigtime, level, dig_info::level, levl, makemon(), may_dig(), mkcavearea(), mon_nam(), mons, moves, newsym(), NO_MM_FLAGS, obj_extract_self(), on_level(), otense(), pay_for_damage(), PIT, place_object(), pline(), PM_DWARF, PM_EARTH_ELEMENTAL, PM_XORN, dig_info::pos, dig_info::quiet, Race_if, RIGHT_SIDE, rn2(), rnd(), rnd_treefruit_at(), ROOM, SCORR, SDOOR, set_wounded_legs(), SHOPBASE, sobj_at(), obj::spe, SPIKED_PIT, STATUE, STONE, t_at(), the(), TRAPDOOR, TRUE, rm::typ, u, you::udaminc, unblock_point(), uwep, you::ux, you::uy, you::uz, welded(), nhcoord::x, xname(), and nhcoord::y.
Referenced by holetime(), is_digging(), and use_pick_axe2().
References BOULDER, BY_OBJECT, BY_YOU, Can_dig_down(), FALSE, Is_airlevel, IS_ALTAR, Is_astralevel, is_axe, is_lava(), is_pool(), IS_ROCK, Is_sanctum, IS_THRONE, Is_waterlevel, levl, MAGIC_PORTAL, On_stairs(), SDOOR, sobj_at(), surface(), t_at(), TRUE, u, uwep, you::uz, W_NONDIGGABLE, wall_info, xdnladder, and xupladder.
Referenced by dig(), and do_break_wand().
References BOULDER, closed_door(), DIGTYP_BOULDER, DIGTYP_DOOR, DIGTYP_ROCK, DIGTYP_STATUE, DIGTYP_TREE, DIGTYP_UNDIGGABLE, dlevel_t::flags, is_pick, IS_ROCK, IS_TREE, IS_WALL, level, levl, sobj_at(), and STATUE.
Referenced by dig(), use_pick_axe(), and use_pick_axe2().
STATIC_OVL void dig_up_grave | ( | ) |
References A_LAWFUL, A_WIS, adjalign(), obj::age, Blind, CORPSE, del_engr_at(), exercise(), FALSE, Hallucination, levl, makemon(), mk_tt_object(), mkclass(), newsym(), NO_MM_FLAGS, otmp, pline(), PM_ARCHEOLOGIST, PM_SAMURAI, align::record, rn2(), Role_if, ROOM, S_MUMMY, S_ZOMBIE, sgn(), align::type, u, you::ualign, you::ux, and you::uy.
Referenced by dighole().
void digactualhole | ( | int | x, |
int | y, | ||
struct monst * | madeby, | ||
int | ttyp | ||
) |
References assign_level(), BUFSZ, BY_OBJECT, BY_YOU, Can_dig_down(), cansee, canseemon, count_wsegs(), monst::data, defsyms, depth(), destroy_drawbridge(), d_level::dlevel, d_level::dnum, dogushforth(), DRAWBRIDGE_DOWN, dryup(), FALSE, find_drawbridge(), flags, Flying, get_level(), goto_level(), impact_drop(), in_rooms(), Is_botlevel(), IS_DOOR, is_drawbridge_wall(), is_floater, is_flyer, IS_FOUNTAIN, IS_GRAVE, IS_SINK, Is_stronghold, ledger_no(), level, Levitation, levl, m_at, make_angry_shk(), maketrap(), MIGR_RANDOM, migrate_to_level(), mintrap(), Monnam(), mons, permonst::msize, MZ_HUGE, newsym(), next_to_u(), dlevel_t::objects, Passes_walls, pay_for_damage(), pickup(), PIT, pline(), PM_WUMPUS, rn1, SET_FOUNTAIN_WARNED, SHOPBASE, shopdig(), spoteffects(), Strcpy, surface(), teleport_pet(), trap_to_defsym, TRUE, TT_INFLOOR, TT_PIT, trap::tx, trap::ty, rm::typ, u, you::ushops, you::ustuck, you::utrap, you::utraptype, you::ux, you::uy, you::uz, valley_level, flag::verbose, and vision_full_recalc.
Referenced by dighole(), and do_break_wand().
References BOULDER, BY_YOU, Can_dig_down(), DB_LAVA, DB_MOAT, DB_UNDER, delfloortrap(), delobj(), destroy_drawbridge(), dig_up_grave(), digactualhole(), DRAWBRIDGE_DOWN, DRAWBRIDGE_UP, drown(), FALSE, fillholetyp(), find_drawbridge(), Flying, HOLE, IS_ALTAR, is_drawbridge_wall(), IS_GRAVE, is_lava(), is_pool(), IS_ROCK, IS_THRONE, lava_effects(), LAVAPOOL, Levitation, levl, MAGIC_PORTAL, PIT, pline(), rn2(), ROOM, SDOOR, sobj_at(), SPIKED_PIT, surface(), t_at(), TRUE, rm::typ, u, unearth_objs(), you::ux, you::uy, you::uz, W_NONDIGGABLE, wake_nearby(), and Wwalking.
Referenced by dig(), and zap_dig().
STATIC_DCL void FDECL | ( | mkcavepos | , |
(XCHAR_P, XCHAR_P, int, BOOLEAN_P, BOOLEAN_P) | |||
) |
STATIC_DCL int FDECL | ( | dig_typ | , |
(struct obj *, XCHAR_P, XCHAR_P) | |||
) |
STATIC_DCL void FDECL | ( | mkcavearea | , |
(BOOLEAN_P) | |||
) |
STATIC_DCL schar FDECL | ( | fillholetyp | , |
(int, int) | |||
) |
STATIC_OVL schar fillholetyp | ( | int | x, |
int | y | ||
) |
int holetime | ( | ) |
References dig(), digging, dig_info::effort, u, and you::ushops.
Referenced by shk_move().
boolean is_digging | ( | ) |
References dig(), FALSE, and TRUE.
Referenced by watch_dig(), and watch_on_duty().
References add_damage(), BOULDER, closed_door(), CORR, cvt_sdoor_to_door(), D_BROKEN, D_NODOOR, D_TRAPPED, DOOR, FALSE, dlevel_t::flags, flags, in_rooms(), in_town(), IS_ROCK, IS_TREE, IS_WALL, level, levl, mb_trapped(), mksobj_at(), newsym(), rn2(), rnd(), rnd_treefruit_at(), ROCK, ROOM, SDOOR, SHOPBASE, sobj_at(), flag::soundok, TRUE, rm::typ, unblock_point(), flag::verbose, and W_NONDIGGABLE.
Referenced by m_move().
STATIC_OVL void mkcavearea | ( | boolean | rockit ) |
References CORR, delay_output, display_nhwindow, flush_screen(), levl, mkcavepos(), newsym(), pline(), rm_waslit(), ROOM, TRUE, u, you::ux, you::uy, vision_full_recalc, WIN_MESSAGE, xmax, xmin, ymax, and ymin.
Referenced by dig().
References Blind, COULD_SEE, monst::data, FALSE, feel_location(), IN_SIGHT, IS_ROCK, isok(), levl, m_at, newsym(), passes_walls, rloc(), ROOM, rm::seenv, STONE, t_at(), TRUE, rm::typ, unblock_point(), and viz_array.
Referenced by mkcavearea().
STATIC_DCL boolean NDECL | ( | rm_waslit | ) |
STATIC_DCL int NDECL | ( | dig | ) |
STATIC_DCL void NDECL | ( | dig_up_grave | ) |
STATIC_OVL boolean rm_waslit | ( | ) |
void rot_corpse | ( | genericptr_t | arg, |
long | timeout | ||
) |
References corpse_xname(), FALSE, flags, MON_NOWEP, MON_WEP, newsym(), nul, OBJ_FLOOR, OBJ_INVENT, OBJ_MINVENT, otense(), obj::owornmask, obj::ox, obj::oy, rot_organic(), setmnotwielded(), stop_occupation(), update_inventory, uquiver, uqwepgone(), uswapwep, uswapwepgone(), uwep, uwepgone(), flag::verbose, and obj::where.
void rot_organic | ( | genericptr_t | arg, |
long | timeout | ||
) |
References bury_an_obj(), obj::cobj, Has_contents, obfree(), obj_extract_self(), obj::ox, and obj::oy.
Referenced by rot_corpse().
void unearth_objs | ( | int | x, |
int | y | ||
) |
References dlevel_t::buriedobjlist, del_engr_at(), level, newsym(), obj::nobj, obj_extract_self(), otmp, obj::ox, obj::oy, place_object(), pline(), ROT_ORGANIC, stackobj(), stop_timer(), and obj::timed.
Referenced by dighole(), maketrap(), and melt_ice().
int use_pick_axe | ( | struct obj * | obj ) |
References dig_typ(), DIGTYP_UNDIGGABLE, you::dx, you::dy, you::dz, getdir(), iflags, is_pick, isok(), movecmd(), ndir, instance_flags::num_pad, pline(), QBUFSZ, sdir, Sprintf, TT_WEB, u, use_pick_axe2(), you::utrap, you::utraptype, uwep, you::ux, you::uy, and wield_tool().
Referenced by doapply().
int use_pick_axe2 | ( | struct obj * | obj ) |
References aobjnam(), assign_level(), attack(), flag::autodig, flag::botl, BOULDER, BUFSZ, can_reach_floor(), ceiling(), dig_info::chew, confdir(), Confusion, d(), dbon(), did_dig_msg, dig(), dig_typ(), digging, DIGTYP_ROCK, DIGTYP_UNDIGGABLE, dig_info::down, you::dx, you::dy, you::dz, dig_info::effort, FALSE, flags, IRONBARS, Is_airlevel, is_lava(), is_pick, is_pool(), IS_ROCK, IS_TREE, Is_waterlevel, isok(), KILLED_BY, dig_info::lastdigtime, dig_info::level, Levitation, levl, losehp(), m_at, MON_AT, moves, nomovemsg, nomul(), OBJ_NAME, objects, on_level(), pline(), dig_info::pos, dig_info::quiet, rn2(), rnd(), seetrap(), set_occupation(), shopdig(), sobj_at(), Sprintf, STATUE, Stunned, surface(), t_at(), TRUE, rm::typ, u, u_wipe_engr(), uhis, Underwater, you::ushops, you::ustuck, uwep, you::ux, you::uy, you::uz, wake_nearby(), dig_info::warned, WEB, nhcoord::x, nhcoord::y, and yname().
Referenced by dodown(), test_move(), and use_pick_axe().
References angry_guards(), closed_door(), couldsee, DEADMONSTER, digging, flags, fmon, in_town(), is_digging(), IS_DOOR, IS_FOUNTAIN, IS_ROCK, IS_TREE, IS_WALL, levl, m_canseeu, mons, PM_WATCH_CAPTAIN, PM_WATCHMAN, SDOOR, flag::soundok, stop_occupation(), TRUE, rm::typ, and dig_info::warned.
Referenced by do_break_wand(), still_chewing(), watch_on_duty(), and zap_dig().
void zap_dig | ( | ) |
References add_damage(), Blind, body_part(), cansee, ceiling(), closed_door(), cmap_to_glyph, CORR, D_NODOOR, monst::data, delay_output, dighole(), DISP_BEAM, DISP_END, DOOR, you::dx, you::dy, you::dz, expels(), FALSE, dlevel_t::flags, HEAD, in_rooms(), in_town(), Is_airlevel, is_animal, Is_earthlevel, is_metallic, IS_ROCK, IS_TREE, IS_WALL, Is_waterlevel, is_whirly, isok(), KILLED_BY_AN, level, levl, losehp(), may_dig(), mbodypart(), monst::mhp, mksobj_at(), mon_nam(), mons, newsym(), On_stairs(), otmp, pay_for_damage(), pline(), PM_JUIBLEX, rn1, rnd(), ROCK, ROOM, S_digbeam, s_suffix(), SCORR, SDOOR, SHOPBASE, stackobj(), STOMACH, STONE, tmp_at(), TRUE, rm::typ, u, uarmh, unblock_point(), Underwater, you::ustuck, you::ux, you::uy, you::uz, W_NONDIGGABLE, watch_dig(), xdnladder, xname(), and xupladder.
Referenced by weffects().
NEARDATA boolean did_dig_msg [static] |
Referenced by dig(), and use_pick_axe2().