cube.c

skylib_mudos_v1/mudlib/obj/misc/cube.c · 997 B

From the archive skylib_mudos_v1.tar.gz

Download the archive   « Back to the archive contents

#define PATH "/obj/misc/"
inherit "/std/object";

object shadow_cube, player;

void setup()
{

   set_name("cube");

   add_adjective("glowing");

   set_short("Mithal's cube");

   set_long("a cube of invulnerability, about the size of a matchbox, "+
   "it is made of a translucent, milky white substance that is harder "+
   "than obsidian. The magic runes inscribed on it tell you that it "+
   "will grant invulnerability to anyone holding it.\n");

}

void dest_me()
{
   if( shadow_cube )
   {
      shadow_cube->dest_cubeshadow();
   }

   ::dest_me();
}

void init()
{
   if( this_player() == environment( this_object() ) )
   {
      if( (player != this_player()) && shadow_cube)
      {
         shadow_cube->dest_cubeshadow();
      }

      player = this_player();

      shadow_cube = clone_object( PATH+"shadowcube");

      shadow_cube->setup_cubeshadow( this_player() );
   }
   else
   {
      if( shadow_cube )
      {

         shadow_cube->dest_cubeshadow();

      }
   }

}

Site Stats

Snippets: 1791
Codebases: 571