/* /domains/Examples/armour/armour.c * from the Foundation II LPC Library * a sample armour type object * created by Lassondra@Nightmare */ #include <lib.h> #include <armour_types.h> #include <damage_types.h> #include <vendor_types.h> inherit LIB_ARMOUR; int eventWear(); static void create() { armour::create(); SetKeyName("stone armour"); SetId( ({ "armour", "stone armour" }) ); SetAdjectives( ({ "stone" }) ); SetShort("a suit of stone armour"); SetLong( "The stone armour looks very strong and solid. It is " "a pale grey color, and looks very heavy." ); SetVendorType(VT_ARMOUR); SetMass(1000); SetValue(350); SetDamagePoints(1000); SetProtection(BLUNT, 5); SetProtection(BLADE, 5); SetProtection(KNIFE, 5); SetProtection(HEAT, 1); SetProtection(COLD, 5); SetRestrictLimbs( ({ "torso", "right arm", "left arm" }) ); SetArmourType(A_ARMOUR); SetWear( (: eventWear :) ); } int eventWear() { if( !high_mortalp(this_player()) ) { write("Perhaps you should come back in a few levels."); return 0; } else { write("After much work you manage to put on the stone armour."); return 1; } }