shield.c

foundation2_fluffos_v1/lib/domains/Examples/armour/shield.c · 1.0 KB

From the archive foundation2_fluffos_v1.zip

Download the archive   « Back to the archive contents

/*    /domains/Examples/armour/shield.c
 *    from the Foundation II LPC Library
 *    an example shield
 *    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("shield of damien");
    SetId( ({ "shield", "shield of damien" }) );
    SetShort("the shield of Damien");
    SetLong("The shield of Damien is very old. It looks like it once "
	    "used to be in good shape. There is a mysterious circle in " 
	    "%^GREEN%^green %^RESET%^drawn upon it." );
    SetDamagePoints(100);
    SetVendorType(VT_ARMOUR);
    SetMass(800);
    SetValue(150);
    SetArmourType(A_SHIELD);
    SetWear( (: eventWear :) );
    SetProtection(BLUNT, 5);
    SetProtection(BLADE, 3);
    SetProtection(KNIFE, 10);
}
 
int eventWear() {
    if( !high_mortalp(this_player()) ) {
	write("Perhaps you should come back in a few levels.");
	return 0;
    }
    return 1;
}

Site Stats

Snippets: 1791
Codebases: 571