Defines | Functions | Variables

dothrow.c File Reference

#include "hack.h"
#include "edog.h"
Include dependency graph for dothrow.c:

Defines

#define quest_arti_hits_leader(obj, mon)   (obj->oartifact && is_quest_artifact(obj) && (mon->data->msound == MS_LEADER))

Functions

STATIC_DCL int FDECL (throw_obj,(struct obj *, int))
STATIC_DCL void NDECL (autoquiver)
STATIC_DCL int FDECL (gem_accept,(struct monst *, struct obj *))
STATIC_DCL void FDECL (tmiss,(struct obj *, struct monst *))
STATIC_DCL int FDECL (throw_gold,(struct obj *))
STATIC_DCL void FDECL (check_shop_obj,(struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P))
STATIC_DCL void FDECL (breakobj,(struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P, BOOLEAN_P))
STATIC_DCL void FDECL (breakmsg,(struct obj *, BOOLEAN_P))
STATIC_DCL boolean FDECL (toss_up,(struct obj *, BOOLEAN_P))
STATIC_DCL boolean FDECL (throwing_weapon,(struct obj *))
STATIC_DCL void FDECL (sho_obj_return_to_u,(struct obj *obj))
STATIC_DCL boolean FDECL (mhurtle_step,(genericptr_t, int, int))
STATIC_OVL int throw_obj (struct obj *obj, int shotlimit)
int dothrow ()
static void autoquiver ()
int dofire ()
void hitfloor (struct obj *obj)
boolean walk_path (coord *src_cc, coord *dest_cc, check_proc, genericptr_t arg)
boolean hurtle_step (genericptr_t arg, int x, int y)
STATIC_OVL boolean mhurtle_step (genericptr_t arg, int x, int y)
void hurtle (int dx, int dy, int range, boolean verbose)
void mhurtle (struct monst *mon, int dx, int dy, int range)
STATIC_OVL void check_shop_obj (struct obj *obj, xchar x, xchar y, boolean broken)
STATIC_OVL boolean toss_up (struct obj *obj, boolean hitsroof)
STATIC_OVL boolean throwing_weapon (struct obj *obj)
STATIC_OVL void sho_obj_return_to_u (struct obj *obj)
void throwit (struct obj *obj, long wep_mask, boolean twoweap)
int omon_adj (struct monst *mon, struct obj *obj, boolean mon_notices)
STATIC_OVL void tmiss (struct obj *obj, struct monst *mon)
int thitmonst (struct monst *mon, struct obj *obj)
STATIC_OVL int gem_accept (struct monst *mon, struct obj *obj)
int hero_breaks (struct obj *obj, xchar x, xchar y, boolean from_invent)
int breaks (struct obj *obj, xchar x, xchar y)
STATIC_OVL void breakobj (struct obj *obj, xchar x, xchar y, boolean hero_caused, boolean from_invent)
boolean breaktest (struct obj *obj)
STATIC_OVL void breakmsg (struct obj *obj, boolean in_view)
STATIC_OVL int throw_gold (struct obj *obj)

Variables

static NEARDATA const char toss_objs []
static NEARDATA const char bullets []
struct objthrownobj = 0
boolean notonhead

Define Documentation

#define quest_arti_hits_leader (   obj,
  mon 
)    (obj->oartifact && is_quest_artifact(obj) && (mon->data->msound == MS_LEADER))

Referenced by thitmonst().


Function Documentation

static void autoquiver (  ) [static]

References ammo_and_launcher, FLINT, GEM_CLASS, GLASS, invent, is_ammo, is_missile, obj::nobj, obj::oartifact, objects, obj::oclass, otmp, obj::otyp, obj::owornmask, P_DAGGER, ROCK, setuqwep(), throwing_weapon(), uquiver, uslinging, uswapwep, uwep, and WEAPON_CLASS.

Referenced by dofire().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void breakmsg ( struct obj obj,
boolean  in_view 
)

References ACID_VENOM, BLINDING_VENOM, CREAM_PIE, CRYSTAL_BALL, CRYSTAL_PLATE_MAIL, Doname2(), EGG, EXPENSIVE_CAMERA, LENSES, MELON, MIRROR, pline(), POT_WATER, POTION_CLASS, RING_CLASS, something, and WAND_CLASS.

Referenced by breaks(), hero_breaks(), throwit(), and toss_up().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void breakobj ( struct obj obj,
xchar  x,
xchar  y,
boolean  hero_caused,
boolean  from_invent 
)
int breaks ( struct obj obj,
xchar  x,
xchar  y 
)

References Blind, breakmsg(), breakobj(), breaktest(), cansee, and FALSE.

Referenced by bhito(), hits_bars(), and scatter().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean breaktest ( struct obj obj )

References ACID_VENOM, BLINDING_VENOM, CREAM_PIE, EGG, EXPENSIVE_CAMERA, GEM_CLASS, GLASS, MELON, obj_resists(), objects, POT_WATER, and POTION_CLASS.

Referenced by breaks(), hero_breaks(), hmon_hitmon(), ship_object(), throwit(), and toss_up().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void check_shop_obj ( struct obj obj,
xchar  x,
xchar  y,
boolean  broken 
)

References costly_spot(), FALSE, in_rooms(), monst::mx, monst::my, sellobj(), shop_keeper(), SHOPBASE, stolen_value(), subfrombill(), u, you::ushops, you::ux, and you::uy.

Referenced by breakobj(), gem_accept(), thitmonst(), and throwit().

Here is the call graph for this function:

Here is the caller graph for this function:

int dofire (  )

References autoquiver(), flag::autoquiver, check_capacity(), monst::data, dothrow(), flags, multi, notake, prinv(), save_cm, throw_obj(), uquiver, and youmonst.

Here is the call graph for this function:

int dothrow (  )

References check_capacity(), monst::data, getobj(), multi, notake, save_cm, throw_obj(), uslinging, and youmonst.

Referenced by dofire().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void FDECL ( breakmsg  ,
(struct obj *, BOOLEAN_P)   
)
STATIC_DCL void FDECL ( tmiss  ,
(struct obj *, struct monst *)   
)
STATIC_DCL boolean FDECL ( toss_up  ,
(struct obj *, BOOLEAN_P)   
)
STATIC_DCL boolean FDECL ( throwing_weapon  ,
(struct obj *)   
)
STATIC_DCL int FDECL ( throw_gold  ,
(struct obj *)   
)
STATIC_DCL void FDECL ( sho_obj_return_to_u  ,
(struct obj *obj  
)
STATIC_DCL void FDECL ( check_shop_obj  ,
(struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P)   
)
STATIC_DCL boolean FDECL ( mhurtle_step  ,
(genericptr_t, int, int)   
)
STATIC_DCL int FDECL ( throw_obj  ,
(struct obj *, int)   
)
STATIC_DCL void FDECL ( breakobj  ,
(struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P, BOOLEAN_P)   
)
STATIC_DCL int FDECL ( gem_accept  ,
(struct monst *, struct obj *)   
)
STATIC_OVL int gem_accept ( struct monst mon,
struct obj obj 
)

References Blind, BUFSZ, change_luck(), check_shop_obj(), FALSE, GEMSTONE, Monnam(), mpickobj(), NEARDATA, objects, objclass::oc_uname, pline(), rloc(), rn2(), sgn(), Strcat, Strcpy, tele_restrict(), TRUE, align::type, u, you::ualign, and you::ushops.

Referenced by thitmonst().

Here is the call graph for this function:

Here is the caller graph for this function:

int hero_breaks ( struct obj obj,
xchar  x,
xchar  y,
boolean  from_invent 
)

References Blind, breakmsg(), breakobj(), breaktest(), and TRUE.

Referenced by bhito(), hitfloor(), hits_bars(), and kick_object().

Here is the call graph for this function:

Here is the caller graph for this function:

void hitfloor ( struct obj obj )

References container_impact_dmg(), doaltarobj(), Doname2(), dropy(), FALSE, hero_breaks(), IS_ALTAR, IS_SOFT, levl, pline(), ship_object(), surface(), TRUE, u, you::ux, and you::uy.

Referenced by drop(), throwit(), and toss_up().

Here is the call graph for this function:

Here is the caller graph for this function:

void hurtle ( int  dx,
int  dy,
int  range,
boolean  verbose 
)

References carried, change_luck(), hurtle_step(), multishot::i, In_sokoban, m_shot, multishot::n, nomul(), Punished, multishot::s, sgn(), surface(), TT_INFLOOR, TT_LAVA, TT_WEB, u, uball, you::ustuck, you::utrap, you::utraptype, you::ux, you::uy, you::uz, walk_path(), nhcoord::x, and nhcoord::y.

Referenced by dokick(), throwit(), and use_grapple().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean hurtle_step ( genericptr_t  arg,
int  x,
int  y 
)
void mhurtle ( struct monst mon,
int  dx,
int  dy,
int  range 
)

References mhurtle_step(), mon, MZ_HUGE, sgn(), u, you::ustuck, walk_path(), nhcoord::x, and nhcoord::y.

Referenced by hmon_hitmon().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean mhurtle_step ( genericptr_t  arg,
int  x,
int  y 
)

References FALSE, goodpos(), m_in_out_region(), mintrap(), mon, monst::mx, monst::my, newsym(), remove_monster(), set_apparxy(), and TRUE.

Referenced by mhurtle().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void NDECL ( autoquiver   )
int omon_adj ( struct monst mon,
struct obj obj,
boolean  mon_notices 
)

References BOULDER, GEM_CLASS, HEAVY_IRON_BALL, hitval(), is_weptool, MZ_MEDIUM, obj::oclass, obj::otyp, rn2(), uball, and WEAPON_CLASS.

Referenced by drag_ball(), ohitmon(), and thitmonst().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void sho_obj_return_to_u ( struct obj obj )

References bhitpos, delay_output, DISP_END, DISP_FLASH, you::dx, you::dy, obj_to_glyph, tmp_at(), u, you::ux, you::uy, nhcoord::x, and nhcoord::y.

Referenced by thitmonst(), and throwit().

Here is the call graph for this function:

Here is the caller graph for this function:

int thitmonst ( struct monst mon,
struct obj obj 
)

References A_DEX, A_STR, ACCFOOD, ACID_VENOM, ACURR, addinv(), ammo_and_launcher, BANANA, befriend_with_obj, bhitpos, BLINDING_VENOM, BOOMERANG, BOULDER, check_shop_obj(), CORPSE, CREAM_PIE, cutworm(), monst::data, delobj(), distmin(), dogfood(), EGG, ELVEN_BOW, encumber_msg(), exercise(), FALSE, find_mac(), finish_quest(), FOOD_CLASS, GAUNTLETS_OF_DEXTERITY, GAUNTLETS_OF_FUMBLING, GAUNTLETS_OF_POWER, gem_accept(), GEM_CLASS, greatest_erosion, HEAVY_IRON_BALL, hmon(), is_ammo, is_animal, is_elf, is_orc, is_unicorn, is_weptool, LEATHER_GLOVES, Luck, maybe_polyd, minstapetrify(), miss(), permonst::mlevel, mon_nam(), Monnam(), monnear(), mons, mpickobj(), obj::oartifact, obfree(), objects, oc_skill, omon_adj(), oresist_disintegration, obj::otyp, P_BOOMERANG, P_BOW, P_NONE, passive_obj(), pline(), PM_BABY_CROCODILE, PM_CAVEMAN, PM_CROCODILE, PM_ELF, PM_MONKEY, PM_RANGER, PM_ROGUE, PM_SAMURAI, PM_TOURIST, PM_WINTER_WOLF_CUB, POTION_CLASS, potionhit(), quest_arti_hits_leader, Race_if, rn2(), rnd(), rnl(), Role_if, s_suffix(), sho_obj_return_to_u(), obj::spe, spec_abon(), STRAT_WAITMASK, tamedog(), the(), throwing_weapon(), tmiss(), Tobjnam(), touch_petrifies, TOURIST, TRUE, u, uarmg, uball, you::uhitinc, you::ulevel, Upolyd, you::ushops, you::ustuck, uwep, you::ux, you::uy, wakeup(), WEAPON_CLASS, weapon_hit_bonus(), WEBB_DISINT, nhcoord::x, xname(), nhcoord::y, youmonst, your_race, and YUMI.

Referenced by kick_object(), throwit(), use_grapple(), and use_pole().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL int throw_gold ( struct obj obj )
STATIC_OVL int throw_obj ( struct obj obj,
int  shotlimit 
)
STATIC_OVL boolean throwing_weapon ( struct obj obj )

References AKLYS, is_blade, is_missile, is_spear, is_sword, objects, PIERCE, and WAR_HAMMER.

Referenced by autoquiver(), thitmonst(), and throwit().

Here is the caller graph for this function:

void throwit ( struct obj obj,
long  wep_mask,
boolean  twoweap 
)

References A_CON, A_DEX, ACURRSTR, addinv(), ammo_and_launcher, ARM, ART_MJOLLNIR, artifact_hit(), bhit(), bhitpos, Blind, body_part(), BOOMERANG, boomhit(), BOULDER, breakmsg(), breakobj(), breaktest(), calc_capacity(), cansee, ceiling(), check_shop_obj(), Confusion, container_impact_dmg(), delay_output, DISP_END, DISP_FLASH, drop_ball(), dropy(), you::dx, you::dy, you::dz, encumber_msg(), exercise(), FALSE, FDECL, flooreffects(), FOOT, Fumbling, GEM_CLASS, Hallucination, HEAVY_IRON_BALL, hitfloor(), hot_pursuit(), hurtle(), in_rooms(), index, inside_shop(), Is_airlevel, is_ammo, is_pick, IS_SOFT, Is_waterlevel, KILLED_BY, KILLED_BY_AN, Levitation, levl, losehp(), m_at, makeplural(), you::mh, you::mhmax, mon, Monnam(), MONST_P, mpickobj(), monst::mx, monst::my, newsym(), obj_is_pname(), OBJ_MINVENT, obj_no_longer_held(), OBJ_P, obj_sheds_light(), obj_to_glyph, P_SKILL, P_UNSKILLED, place_object(), pline(), PM_VALKYRIE, rn2(), rnd(), rnf(), Role_if, setuwep(), setworn(), ship_object(), sho_obj_return_to_u(), SHOPBASE, SLT_ENCUMBER, snuff_candle(), Something, stackobj(), Stunned, the(), thitmonst(), throwing_weapon(), THROWN_WEAPON, tmp_at(), Tobjnam(), toss_up(), TRUE, TT_INFLOOR, you::twoweap, u, uball, you::uhp, you::uhpmax, Underwater, Upolyd, you::ushops, you::ustuck, you::utrap, you::utraptype, uwep, you::ux, you::uy, you::uz, vision_full_recalc, weapon_type(), nhcoord::x, xname(), nhcoord::y, and youmonst.

Referenced by dospit(), and throw_obj().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void tmiss ( struct obj obj,
struct monst mon 
)

References canseemon, M_AP_MONSTER, monst::m_ap_type, miss(), mshot_xname(), otense(), pline(), rn2(), The(), and wakeup().

Referenced by thitmonst().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean toss_up ( struct obj obj,
boolean  hitsroof 
)
boolean walk_path ( coord src_cc,
coord dest_cc,
check_proc  ,
genericptr_t  arg 
)

References FALSE, TRUE, nhcoord::x, and nhcoord::y.

Referenced by hurtle(), jump(), and mhurtle().

Here is the caller graph for this function:


Variable Documentation

NEARDATA const char bullets[] [static]
Initial value:
struct obj* thrownobj = 0
NEARDATA const char toss_objs[] [static]
Initial value: