#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(); } } }