Special Weapon

// Petrarch #include <std.h> inherit WEAPON; create() { ::create(); set_id(({"trident", "red trident"})); set_name("trident"); set_short("a red trident of the Merfolk"); set_long( "This red Trident seems to be a pretty good weapon."); set_mass(12+random(5)); set_value(400+random(40)); set_wc(15); set_ac(1); set_type("projectile"); set_hands(2); set_material(({"metal","steel"})); set_unwield("You unwield the trident grinning happily."); set_hit((:call_other, this_object(),"weapon_hit":)); set_skill_level(query_wc()*30/10); } int weapon_hit() { int result; object atk; atk = (object)this_player()->query_current_attacker(); if(random(102) > 85) { write("Your trident heals you with your opponent's blood."); say((string)this_player()->query_cap_name()+ "'s trident sucks some power from " +this_player()->query_possessive()+"."); result=(random(55+random(50)-random(50))*((this_player()->query_level()/20)+1)); result=random(result)+1; this_player()->add_hp(result); return result; } }