#include "hack.h"
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 erodeable_wep | ( | optr ) |
((optr)->oclass == WEAPON_CLASS \ || is_weptool(optr) \ || (optr)->otyp == HEAVY_IRON_BALL \ || (optr)->otyp == IRON_CHAIN)
Referenced by can_twoweapon().
#define will_weld | ( | optr ) |
((optr)->cursed \ && (erodeable_wep(optr) \ || (optr)->otyp == TIN_OPENER))
Referenced by ready_weapon(), and welded().
int can_twoweapon | ( | ) |
References attack::aatyp, Race::adj, an(), AT_WEAP, bimanual, body_part(), BUFSZ, cantwield, CORPSE, could_twoweap, monst::data, drop_uswapwep(), RoleName::f, FALSE, flag::female, flags, Glib, HAND, is_plural, RoleName::m, makeplural(), permonst::mattk, permonst::mname, mons, Role::name, NOT_WEAPON, Race::noun, otense(), otmp, P_BASIC, P_MAX_SKILL, P_TWO_WEAPON_COMBAT, pline(), Sprintf, Stone_resistance, Strcat, Strcpy, touch_petrifies, TRUE, uarmg, uarms, Upolyd, upstart(), urace, urole, uswapwep, uwep, Yname2(), and youmonst.
Referenced by attack(), doswapweapon(), and dotwoweapon().
int chwepon | ( | struct obj * | otmp, |
int | amount | ||
) |
References A_DEX, aobjnam(), ART_MAGICBANE, Blind, body_part(), BUFSZ, color, CRYSKNIFE, exercise(), HAND, hcolor(), is_elven_weapon, is_weptool, makeknown, makeplural(), NH_BLACK, NH_BLUE, obj::oartifact, obj::oclass, ONAME, otense(), obj::otyp, restrict_name(), rn2(), SCROLL_CLASS, obj::spe, Sprintf, strange_feeling(), STRANGE_OBJECT, TRUE, useupall(), uwep, WEAPON_CLASS, and WORM_TOOTH.
Referenced by seffects().
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().
int dotwoweapon | ( | ) |
References A_DEX, ACURR, can_twoweapon(), rnd(), you::twoweap, u, and update_inventory.
int dowield | ( | ) |
References cantwield, monst::data, doswapweapon(), FALSE, flags, getobj(), is_weptool, multi, obj::owornmask, pline(), flag::pushweapon, ready_weapon(), reset_remarm(), setuqwep(), setuswapwep(), STEED, untwoweapon(), unweapon, uquiver, uswapwep, uwep, W_AMUL, W_ARMOR, W_RING, W_TOOL, welded(), weldmsg(), youmonst, and zeroobj.
int dowieldquiver | ( | ) |
References FEATURE_NOTICE_VER, flags, getobj(), is_plural, multi, objects, obj::otyp, obj::owornmask, P_SLING, pline(), prinv(), ready_objs, setuqwep(), setuswapwep(), STEED, flag::suppress_alert, untwoweapon(), uquiver, uslinging, uswapwep, uwep, W_AMUL, W_ARMOR, W_QUIVER, W_RING, W_TOOL, and zeroobj.
void drop_uswapwep | ( | ) |
References aobjnam(), body_part(), BUFSZ, dropx(), HAND, makeplural(), Strcpy, and uswapwep.
Referenced by can_twoweapon(), and curse().
References aobjnam(), bhitpos, Blind, cansee, canseemon, carried, flags, grease_protect(), is_corrodeable, is_rustprone, MAIL, MAX_ERODE, mcarried, Monnam(), pline(), SCR_BLANK_PAPER, SCR_MAIL, SCROLL_CLASS, TRUE, flag::verbose, nhcoord::x, nhcoord::y, and youmonst.
Referenced by dotrap(), erode_armor(), mdamagem(), mintrap(), passive_obj(), passiveum(), zhitm(), and zhitu().
STATIC_DCL int FDECL | ( | ready_weapon | , |
(struct obj *) | |||
) |
STATIC_OVL int ready_weapon | ( | struct obj * | wep ) |
References an(), aobjnam(), arti_speak(), artifact_light(), BATTLE_AXE, begin_burn(), bimanual, Blind, body_part(), BUFSZ, change_luck(), CORPSE, FALSE, HAND, HANDED, inside_shop(), IRON, is_sword, makeplural(), permonst::mname, mons, objects, pline(), PM_ELF, prinv(), Race_if, setuwep(), shkname(), shop_keeper(), Sprintf, Stone_resistance, The(), Tobjnam(), touch_artifact(), touch_petrifies, TRUE, u, uarmg, uarms, uwep, you::ux, you::uy, W_WEP, will_weld, xname(), and youmonst.
Referenced by doswapweapon(), and dowield().
void setuqwep | ( | struct obj * | obj ) |
References setworn(), update_inventory, and W_QUIVER.
Referenced by autoquiver(), ballfall(), Blindf_on(), dip(), do_takeoff(), doputon(), dowear(), dowield(), dowieldquiver(), drop(), dropy(), goto_level(), hold_another_object(), in_container(), ini_inv(), Ring_on(), ship_object(), unwield_weapons_silently(), and wield_tool().
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().
void setuwep | ( | struct obj * | obj ) |
References artifact_light(), Blind, end_burn(), FALSE, is_ammo, is_launcher, is_missile, is_pole, is_weptool, pline(), setworn(), Tobjnam(), TRUE, u, unweapon, update_inventory, uwep, W_WEP, and WEAPON_CLASS.
Referenced by ballfall(), Blindf_on(), dip(), do_takeoff(), doputon(), dowear(), drop(), dropy(), glibr(), goto_level(), hmon_hitmon(), in_container(), ini_inv(), ready_weapon(), restgamestate(), Ring_on(), ship_object(), throwit(), unwield_weapons_silently(), and wield_tool().
void untwoweapon | ( | ) |
References FALSE, you::twoweap, u, and update_inventory.
Referenced by attack(), doswapweapon(), dowield(), dowieldquiver(), drop_weapon(), oname(), polyman(), and wield_tool().
void unwield_weapons_silently | ( | ) |
Unwields all weapons silently.
References FALSE, setuqwep(), setuswapwep(), setuwep(), you::twoweap, and u.
Referenced by finish_paybill().
void uqwepgone | ( | ) |
References setworn(), update_inventory, uquiver, and W_QUIVER.
Referenced by eatspecial(), lava_effects(), obfree(), remove_worn_item(), and rot_corpse().
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().
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().
int welded | ( | struct obj * | obj ) |
References TRUE, uwep, and will_weld.
Referenced by askchain(), canwearobj(), cursed(), dig(), doputon(), doswapweapon(), dountrap(), dowield(), drop(), emergency_disrobe(), fix_worst_trouble(), freehand(), getobj(), glibr(), in_container(), in_trouble(), menu_drop(), pleased(), select_off(), stuck_ring(), throw_obj(), use_misc(), wield_tool(), and worst_cursed_item().
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().
References bimanual, body_part(), BUFSZ, cantwield, monst::data, doname(), doswapweapon(), FALSE, flags, HAND, makeplural(), pline(), setuqwep(), setuwep(), shk_your(), strstri(), TRUE, you::twoweap, u, uarms, untwoweapon(), unweapon, uquiver, uswapwep, uwep, flag::verbose, W_AMUL, W_ARMOR, W_RING, W_TOOL, WEAPON_CLASS, welded(), what, xname(), and youmonst.
Referenced by dorub(), use_grapple(), use_pick_axe(), use_pole(), and use_whip().
NEARDATA const char bullets[] [static] |
{ ALL_CLASSES, ALLOW_NONE, GEM_CLASS, WEAPON_CLASS, 0 }
NEARDATA const char ready_objs[] [static] |
{ ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, 0 }
Referenced by dowieldquiver().
NEARDATA const char wield_objs[] [static] |
{ ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, TOOL_CLASS, 0 }