/* Object : Titanium Sword Coded by : Kingbilly Date : 8th January 1993 */ inherit "inherit/weapon"; void reset(status arg) { if(arg) return; set_name("titanium sword"); set_alias("sword"); set_short("a titanium sword"); set_long( "This is a powerful sword, made from a silvery grey, light weight,\n"+ "metallic substance. It has intricate carvings on the hilt.\n"); set_value(2000); set_class(20); set_weight(1); set_type("slash"); set_read("There is nothing readable you can make out in the carvings.\n"); set_hit_func(this_object()); /* on special swords only */ } int weapon_hit(object attacker) { if(random(100) <= 25) { write("There is a flash from your sword.\n"); say("The sword flashes in "+ this_player()->query_name() +"'s hands.\n"); return (int)this_player()->query_dexterity(); } return 0; } status wield(string str) { if(this_player()->query_dexterity() > 15) { write("As you wield the sword you notice how easily "+ "you can work with it.\n"); } else if (this_player()->query_dexterity() > 10) { write("This sword feels a little difficult to handle, "+ "but will still serve\nyou well in battle.\n"); } else if (this_player()->query_dexterity() > 5) { write("Wielding the sword, you notice how much heavier it now seems,\n"+ "but you get the feeling you will still hit well with it.\n"); } else { write("The sword suddenly gets too heavy for you to wield.\n"); return 1; } return ::wield(str); }