#include "hack.h"
#include "mfndpos.h"
#include "edog.h"
Defines | |
#define | DDIST(x, y) (dist2(x,y,omx,omy)) |
#define | SQSRCHRADIUS 5 |
#define | FARAWAY (COLNO + 2) |
#define | GDIST(x, y) (dist2(x,y,gx,gy)) |
Functions | |
STATIC_DCL boolean | FDECL (dog_hunger,(struct monst *, struct edog *)) |
STATIC_DCL int | FDECL (dog_invent,(struct monst *, struct edog *, int)) |
STATIC_DCL int | FDECL (dog_goal,(struct monst *, struct edog *, int, int, int)) |
STATIC_DCL struct obj * | FDECL (DROPPABLES,(struct monst *)) |
STATIC_DCL boolean | FDECL (can_reach_location,(struct monst *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)) |
STATIC_DCL boolean | FDECL (could_reach_item,(struct monst *, XCHAR_P, XCHAR_P)) |
STATIC_OVL boolean | FDECL (cursed_object_at,(int, int)) |
STATIC_PTR void | FDECL (wantdoor,(int, int, genericptr_t)) |
STATIC_OVL boolean | cursed_object_at (int x, int y) |
int | dog_nutrition (struct monst *mtmp, struct obj *obj) |
int | dog_eat (struct monst *mtmp, struct obj *obj, int x, int y, boolean devour) |
STATIC_OVL boolean | dog_hunger (struct monst *mtmp, struct edog *edog) |
STATIC_OVL int | dog_invent (struct monst *mtmp, struct edog *edog, int udist) |
STATIC_OVL int | dog_goal (struct monst *mtmp, struct edog *edog, int after, int udist, int whappr) |
int | dog_move (struct monst *mtmp, int after) |
STATIC_OVL boolean | could_reach_item (struct monst *mon, xchar nx, xchar ny) |
STATIC_OVL boolean | can_reach_location (struct monst *mon, xchar mx, xchar my, xchar fx, xchar fy) |
STATIC_PTR void | wantdoor (int x, int y, genericptr_t distance) |
Variables | |
boolean | notonhead |
STATIC_OVL struct obj *register struct monst * | mon |
STATIC_VAR xchar | gtyp |
STATIC_VAR xchar | gx |
STATIC_VAR xchar | gy |
#define DDIST | ( | x, | |
y | |||
) | (dist2(x,y,omx,omy)) |
Referenced by dog_goal().
#define FARAWAY (COLNO + 2) |
Referenced by dog_goal().
Referenced by dog_move(), move_special(), and shk_move().
#define SQSRCHRADIUS 5 |
Referenced by dog_goal(), and m_move().
STATIC_OVL boolean can_reach_location | ( | struct monst * | mon, |
xchar | mx, | ||
xchar | my, | ||
xchar | fx, | ||
xchar | fy | ||
) |
References could_reach_item(), D_CLOSED, D_LOCKED, dist2(), doormask, FALSE, IS_DOOR, IS_ROCK, isok(), levl, may_dig(), passes_walls, TRUE, and tunnels.
Referenced by dog_goal().
References BOULDER, FALSE, is_lava(), is_pool(), is_swimmer, likes_lava, sobj_at(), throws_rocks, and TRUE.
Referenced by can_reach_location(), dog_goal(), and dog_invent().
STATIC_OVL boolean cursed_object_at | ( | int | x, |
int | y | ||
) |
References FALSE, level, dlevel_t::objects, otmp, and TRUE.
Referenced by dog_goal(), and dog_move().
References addinv(), edog::apport, cansee, canseemon, carried, delobj(), distant_name(), dog_nutrition(), DOGFOOD, dogfood(), doname(), drainlevel, edog::dropdist, edog::droptime, dropy(), EDOG, FALSE, flags, FOOD_CLASS, freeinv(), grow_up(), edog::hungrytime, inv_cnt(), invent, is_pool(), is_vampiric, merge_choice(), mhealup, edog::mhpmax_penalty, mlevelgain, mon_visible, Monnam(), mons, monstermoves, newcham(), newsym(), noit_Monnam(), pline(), PM_RUST_MONSTER, polyfodder, singular(), splitobj(), uball, uchain, Underwater, unpunish(), flag::verbose, and weight().
Referenced by dog_invent(), dog_move(), and tamedog().
STATIC_OVL int dog_goal | ( | struct monst * | mtmp, |
struct edog * | edog, | ||
int | after, | ||
int | udist, | ||
int | whappr | ||
) |
References edog::apport, APPORT, can_carry(), can_reach_location(), COLNO, could_reach_item(), couldsee, cursed_object_at(), DDIST, do_clear_area(), DOGFOOD, dogfood(), FARAWAY, fobj, gettrack(), gx, gy, invent, IS_ROOM, levl, m_cansee, MANFOOD, edog::mhpmax_penalty, obj::nobj, edog::ogoal, obj::otyp, obj::ox, obj::oy, rn2(), ROWNO, SQSRCHRADIUS, u, UNDEF, you::ux, you::uy, wantdoor(), nhcoord::x, and nhcoord::y.
Referenced by dog_move().
References beg(), cansee, carnivorous, couldsee, FALSE, Hallucination, herbivorous, edog::hungrytime, mondied(), Monnam(), monstermoves, pline(), STEED, stop_occupation(), TRUE, u, and y_monnam().
Referenced by dog_move().
References ACCFOOD, AT_WEAP, attacktype(), CADAVER, can_carry(), cansee, could_reach_item(), distant_name(), dog_eat(), dogfood(), doname(), FALSE, flags, index, Is_sokoprize, level, m_dowear(), MAIL, mon_wield_item(), Monnam(), monstermoves, mpickobj(), NEED_HTH_WEAPON, NEED_WEAPON, newsym(), obj_extract_self(), dlevel_t::objects, obj::oclass, obj::otyp, obj::ox, obj::oy, pline(), relobj(), rn2(), SCR_MAIL, STATIC_OVL, TRUE, and flag::verbose.
Referenced by dog_move().
int dog_move | ( | struct monst * | mtmp, |
int | after | ||
) |
References ALLOW_BARS, ALLOW_DIG, ALLOW_M, ALLOW_ROCK, ALLOW_SANCT, ALLOW_SSM, ALLOW_TRAPS, ALLOW_U, ALLOW_WALL, BUSTDOOR, cansee, canspotmon, closed_door(), Conflict, cursed_object_at(), monst::data, distu, dog_eat(), dog_goal(), dog_hunger(), dog_invent(), dogfood(), dtoxy(), EDOG, enexto(), FALSE, flags, GDIST, goodpos(), haseyes, if(), is_axe, is_giant, is_pick, IS_ROCK, IS_TREE, level, levl, m_at, m_carrying(), m_in_out_region(), monst::m_lev, m_unleash(), MANFOOD, mattackm(), mattacku(), max_passive_dmg(), may_dig(), mfndpos(), mhis, mk_roamer(), monst::mlstmv, MM_AGR_DIED, MM_DEF_DIED, MM_HIT, MON_AT, MON_WEP, mon_wield_item(), mongone(), Monnam(), monnear(), mons, monstermoves, MS_GUARDIAN, MS_LEADER, permonst::msound, MTSZ, monst::mx, NEED_AXE, NEED_PICK_AXE, NEED_PICK_OR_AXE, needspick, newsym(), NO_WEAPON_WANTED, nohands, notonhead, dlevel_t::objects, onscary(), OPENDOOR, obj::otyp, passes_bars(), passes_walls, perceives, pline(), PM_ANGEL, PM_FLOATING_EYE, PM_GELATINOUS_CUBE, remove_monster(), resist(), resists_disint, resists_ston, RING_CLASS, rn2(), rnd(), set_apparxy(), sgn(), SKELETON_KEY, flag::soundok, sticks(), t_at(), throws_rocks, touch_petrifies, TRUE, tunnels, align::type, u, you::ualign, unstuck(), you::ustuck, you::ux, you::uy, verysmall, WEBB_DISINT, whimper(), edog::whistletime, nhcoord::x, xytod(), nhcoord::y, and youmonst.
Referenced by m_move().
References permonst::cnutrit, COIN_CLASS, CORPSE, obj::corpsenm, permonst::cwt, eaten_stat(), FOOD_CLASS, mons, MZ_GIGANTIC, MZ_HUGE, MZ_LARGE, MZ_MEDIUM, MZ_SMALL, MZ_TINY, objects, objclass::oc_delay, objclass::oc_nutrition, obj::oclass, obj::oeaten, obj::otyp, obj::owt, and obj::quan.
Referenced by dog_eat(), mdamagem(), and mon_consume_unstone().
STATIC_OVL boolean FDECL | ( | cursed_object_at | , |
(int, int) | |||
) |
STATIC_DCL boolean FDECL | ( | can_reach_location | , |
(struct monst *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P) | |||
) |
STATIC_PTR void FDECL | ( | wantdoor | , |
(int, int, genericptr_t) | |||
) |
STATIC_PTR void wantdoor | ( | int | x, |
int | y, | ||
genericptr_t | distance | ||
) |
Referenced by dog_goal(), gd_move(), invault(), m_move(), paygd(), pri_move(), and shk_move().
Referenced by dog_goal(), gd_move(), invault(), m_move(), paygd(), pri_move(), and shk_move().