[Package Index | Mudlib Index | Effect Index]
Written by Pinkfish.
.
varargs int add_attack(string a_name,
int chance,
int * damage,
string type,
string skill,
mixed func,
mixed bogus_1,
mixed bogus_2)
This method adds an attack onto the object. The name of the attack
must be unique on each object.
void add_attack_message(string name,
string type,
string * data)
This method adds a special attack message set onto the weapon. The type
and name are around this way to correspond
to the parameters to add_attack.
inherit "/obj/weapon";
void setup() {
...
add_attack_message("gumboot", "blunt", ({
0, "$N gumboot$s at $I with $D",
20, "$N lightly gumboot$s $I in the $z with $D",
60, "$N gumboot$s $I in the $z with $D",
5000, "$N heavily gumboot$s $I in the $z with $D" }));
...
} /* setup() */
void attack_function(string a_name,
int damage,
object attack_ob,
object attack_by)
int calc_attack(int number,
int percent)
int modify_damage(int damage,
string attack_name)
mixed * query_attack_data()
mixed * query_attack_message(string name,
string type)
This method returns the attack message associated with the
type and name. The type and name are around this way to correspond
to the parameters to add_attack.
string * query_attack_names()
string * query_attack_types()
mapping query_special_messages()
string query_weapon_type()This method attempts to work out what type of weapon this is.
void remove_attack(string a_name)This method removes the attack of the given name.
mixed * weapon_attacks(int percent,
object target)
This function returns 0 or more attacks for this weapon against the
given target.