NAME simple_weapon.c - a simple weapon INHERITS basic_thing.c (see basic_thing.doc for more info) SETUP FUNCTIONS set_class set_type set_hit_line_object QUERY FUNCTIONS query_wielded query_class query_type query_magic SPECIAL PROPERTIES cursed prevents the weapon from being dropped or unwielded once wielded __default_extra_look the property __extra_look is only used when the object is wielded, __default_extra_look is used when it isn't two_handed prevents shields from being worn while wielding the weapon. magical makes the weapon appear 'magical' no_multi_attacks prevents weapon_hit to be called more than once/heartbeat __remote see below ======================================================================= NAME set_class - set how good the weapon is SYNTAX void set_class(int class); DESCRIPTION Set the weapon_class, see /doc/RULES/weapon.r for a list of acceptable values. ======================================================================= NAME set_type - set type of weapon SYNTAX void set_type(string type); DESCRIPTION Set the type of weapon, currently these types are available: chop, slash, pierce, crush, Other types may appear in the future, just ask. ======================================================================= NAME set_hit_line_object - set object to get hit messages from. SYNTAX void set_hit_line_object(mixed obj); DESCRIPTION The function get_hit_lines will be called in the object given to this function every time someone hits something with this weapon. The arguments to get_hit_lines are: damage, the damage done defender, the person who are being hit attacker, the person using the weapon type, the type of the weapon The function is then supposed to return an array with three messages, the first one goes to the attacker, the second to the defender and the third one to everybody else in that room. ======================================================================= NAME remote object SYNTAX void add_property("__remote",string remote_file_name); void add_property("__remote",object remote_object); DESCRIPTION The remote object is used to add side effect and extra messages to this weapon, the following functions are used in that object: int remote_weapon_hit(object attacker) called every time someone hits with this weapon, returns extra damage, or "miss". The damage is added to the normal weapon_class, if "miss" is returned, no damage is done. The object 'attacker' is the wielders opponent. int remote_prevent_wield(object weapon) called when someone tries to wield the weapon, write a message and return 1 to prevent weapon from being wielded. void remote_do_wield(object weapon) called when someone wields the weapon. void remote_do_unwield(object weapon, object wielded_by) called when someone unvwields the weapon. NOTE If the remote_object_file_name is given as a string, the functions are called in the master object. If you want them to be called in a clone, you must give an object. =======================================================================