Merentha Website
- Overview
- About LPC Coding
- Header Files
- The Problem Sets
- Rooms
- Normal Rooms
- Monster Rooms
- Search Rooms
- Exit Rooms
- Door Rooms
- Monsters
- Normal Monster
- Random/Emote Monster
- Patrol/Talking Monster
- Skills/Interactive Monster
- Armour
- A Vest
- A Ring
- Cursed Armour
- Weapons
- Normal Staff
- Two Handed Sword
- Special Attack Weapon
- Cursed Weapon
- Talkin Weapon
- Lights
- A Match
- A Torch
- A Lantern
- Bags
- A Normal Bag
- A Backpack (wearable)
- An Expanding Bag
- Misc Objects
- A Leaf
- A Sea Shell
- A Key
- A Snowball
|
// Petrarch
#include
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;
}
}
|