#ifndef WH_OBJ_WEAPON_H_5df77d45_ #define WH_OBJ_WEAPON_H_5df77d45_ #include "structs.h" /* * APIs exported by obj-weapon.c. */ /* * To-hit bonus of a weapon. This performs all applicable rolls, * returning a number suitable for adding to the wielder's attack roll * in its attack method. * * In particular, this returns different numbers each call for a given * weapon. */ extern int weapon_hit_bonus(OBJ *); /* * Damage bonus of a weapon. This performs all applicable rolls, * returning a number suitable for adding to the wielder's damage roll * in its damage method. * * In particular, this returns different numbers each call for a given * weapon. */ extern int weapon_dmg_bonus(OBJ *); /* * Test whether a weapon is being wielded. */ extern int weapon_being_wielded(OBJ *); /* * Wield a weapon. */ extern void weapon_wield(MONST *, OBJ *); /* * Report what weapon(s), if any, the monster is wielding, in the form * of an inventory listing restricted by weapon_being_wielded (loosely * put). */ extern void weapon_show(MONST *); /* * Make a monster stop using a weapon. This is a no-op if the weapon * is not being wielded. It is a panic if the object is not a weapon, * if the monster is not carrying the object, or if the weapon is * wielded by any other monster. */ extern void weapon_stop_using(MONST *, INVOBJ *); /* * Set a weapon's plusses. First int is to-hit, second is damage. */ extern void weapon_set_plusses(OBJ *, int, int); /* * Set whether a weapon is cursed. */ extern void weapon_set_cursed(OBJ *, int); #endif