robes.c

./lib/doc/examples/magic/robes.c · 1.1 KB

From the archive heaven7_2v06.tar.gz

Download the archive   « Back to the archive contents

/* Robes from a Fire Mage */
/* Read armour.doc for armour guidelines */

#include <mudlib.h>
inherit MAGIC_ARMOUR;

void reset(status arg) {
  if(arg) return;
  /* normal armour */
  
  set_name("robes");  
  set_short("Robes");
  set_long("The robes look old and dusty.\n");
  set_ac(2);
  set_weight(3);
  set_value(500); /* value + charge modifier */
  set_type("armour");
  set_armour_material("cloth");
  set_listen("The cloth robes rustles as you move.\n");
  set_smell("The robes smell like they were worn by an orc that\n"+
            "has been dead for two weeks.\n");

  /* magic_armour additions */

  set_protection("fire");   /* immunity given when worn */

  /* spells castable when worn */

  add_spells(({ "fire ball", "fire shield", }));
  set_max_charges(50);               /* maximum charges */
  set_charges(50);                   /* charge robe */
  set_cast_level(14);                /* level spells cast at */
  set_class(({ "mage", "thief", })); /* class(es) able to use spells */ 

  /* use wands own info strings - dynamic information */
  set_info(query_wand_info());
}

Site Stats

Snippets: 1791
Codebases: 571