Defines | Functions | Variables

wield.c File Reference

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

Defines

#define erodeable_wep(optr)
#define will_weld(optr)
#define NOT_WEAPON(obj)   (!is_weptool(obj) && obj->oclass != WEAPON_CLASS)

Functions

STATIC_DCL int FDECL (ready_weapon,(struct obj *))
void setuwep (struct obj *obj)
STATIC_OVL int ready_weapon (struct obj *wep)
void setuqwep (struct obj *obj)
void setuswapwep (struct obj *obj)
int dowield ()
int doswapweapon ()
int dowieldquiver ()
boolean wield_tool (struct obj *obj, const char *verb)
int can_twoweapon ()
void drop_uswapwep ()
int dotwoweapon ()
void uwepgone ()
void uswapwepgone ()
void uqwepgone ()
void untwoweapon ()
void erode_obj (struct obj *target, boolean acid_dmg, boolean fade_scrolls)
int chwepon (struct obj *otmp, int amount)
int welded (struct obj *obj)
void weldmsg (struct obj *obj)
void unwield_weapons_silently ()

Variables

static NEARDATA const char wield_objs []
static NEARDATA const char ready_objs []
static NEARDATA const char bullets []

Define Documentation

#define erodeable_wep (   optr )
Value:
((optr)->oclass == WEAPON_CLASS \
                                || is_weptool(optr) \
                                || (optr)->otyp == HEAVY_IRON_BALL \
                                || (optr)->otyp == IRON_CHAIN)
#define NOT_WEAPON (   obj )    (!is_weptool(obj) && obj->oclass != WEAPON_CLASS)

Referenced by can_twoweapon().

#define will_weld (   optr )
Value:
((optr)->cursed \
                                && (erodeable_wep(optr) \
                                   || (optr)->otyp == TIN_OPENER))

Referenced by ready_weapon(), and welded().


Function Documentation

int can_twoweapon (  )
int chwepon ( struct obj otmp,
int  amount 
)
int doswapweapon (  )

References can_twoweapon(), cantwield, monst::data, multi, pline(), prinv(), ready_weapon(), setuswapwep(), you::twoweap, u, untwoweapon(), uswapwep, uwep, welded(), weldmsg(), and youmonst.

Referenced by dowield(), and wield_tool().

Here is the call graph for this function:

Here is the caller graph for this function:

int dotwoweapon (  )

References A_DEX, ACURR, can_twoweapon(), rnd(), you::twoweap, u, and update_inventory.

Here is the call graph for this function:

int dowield (  )
int dowieldquiver (  )
void drop_uswapwep (  )

References aobjnam(), body_part(), BUFSZ, dropx(), HAND, makeplural(), Strcpy, and uswapwep.

Referenced by can_twoweapon(), and curse().

Here is the call graph for this function:

Here is the caller graph for this function:

void erode_obj ( struct obj target,
boolean  acid_dmg,
boolean  fade_scrolls 
)
STATIC_DCL int FDECL ( ready_weapon  ,
(struct obj *)   
)
STATIC_OVL int ready_weapon ( struct obj wep )
void setuqwep ( struct obj obj )
void setuswapwep ( struct obj obj )

References setworn(), update_inventory, and W_SWAPWEP.

Referenced by ballfall(), Blindf_on(), dip(), do_takeoff(), doputon(), doswapweapon(), dowear(), dowield(), dowieldquiver(), drop(), dropy(), glibr(), goto_level(), in_container(), ini_inv(), Ring_on(), ship_object(), and unwield_weapons_silently().

Here is the call graph for this function:

Here is the caller graph for this function:

void setuwep ( struct obj obj )
void untwoweapon (  )

References FALSE, you::twoweap, u, and update_inventory.

Referenced by attack(), doswapweapon(), dowield(), dowieldquiver(), drop_weapon(), oname(), polyman(), and wield_tool().

Here is the caller graph for this function:

void unwield_weapons_silently (  )

Unwields all weapons silently.

References FALSE, setuqwep(), setuswapwep(), setuwep(), you::twoweap, and u.

Referenced by finish_paybill().

Here is the call graph for this function:

Here is the caller graph for this function:

void uqwepgone (  )

References setworn(), update_inventory, uquiver, and W_QUIVER.

Referenced by eatspecial(), lava_effects(), obfree(), remove_worn_item(), and rot_corpse().

Here is the call graph for this function:

Here is the caller graph for this function:

void uswapwepgone (  )

References setworn(), update_inventory, uswapwep, and W_SWAPWEP.

Referenced by drop_weapon(), eatspecial(), Gloves_off(), lava_effects(), obfree(), remove_worn_item(), and rot_corpse().

Here is the call graph for this function:

Here is the caller graph for this function:

void uwepgone (  )

References artifact_light(), Blind, end_burn(), FALSE, pline(), setworn(), Tobjnam(), TRUE, unweapon, update_inventory, uwep, and W_WEP.

Referenced by cpostfx(), drop_weapon(), eatspecial(), Gloves_off(), hitmu(), hmon_hitmon(), lava_effects(), obfree(), remove_worn_item(), rot_corpse(), and use_misc().

Here is the call graph for this function:

Here is the caller graph for this function:

int welded ( struct obj obj )
void weldmsg ( struct obj obj )

References bimanual, body_part(), HAND, makeplural(), otense(), obj::owornmask, and xname().

Referenced by doputon(), doswapweapon(), dowield(), drop(), in_container(), and throw_obj().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean wield_tool ( struct obj obj,
const char *  verb 
)

Variable Documentation

NEARDATA const char bullets[] [static]
Initial value:
NEARDATA const char ready_objs[] [static]
Initial value:

Referenced by dowieldquiver().

NEARDATA const char wield_objs[] [static]
Initial value: