/
lib/banish/
lib/d/
lib/doc/
lib/doc/domains/
lib/doc/efun/
lib/doc/examples/
lib/doc/examples/armour/
lib/doc/examples/contain/
lib/doc/examples/food/
lib/doc/examples/magic/
lib/doc/examples/monster/
lib/doc/examples/room/
lib/doc/examples/weapons/
lib/function/
lib/include/
lib/include/fn_specs/
lib/include/skills/
lib/info/
lib/inherit/base/
lib/log/
lib/manuals/312/
lib/news/
lib/obj/party/
lib/objects/components/
lib/open/
lib/open/library/
lib/open/party/
lib/players/
lib/players/zilanthius/
lib/room/
lib/room/city/arena/
lib/room/city/creator/
lib/room/city/garden/monst/
lib/room/city/obj/
lib/room/city/shop/
lib/room/death/
lib/room/registry/
lib/secure/
lib/secure/UDP_CMD_DIR/
lib/skills/
lib/skills/fighter/
lib/skills/thief/
lib/usr/
lib/usr/creators/
lib/usr/players/
/* death curse */

inherit "inherit/base/base_obj";
inherit "inherit/timer";

int level;

void reset(status arg) {
  if(arg) return;
  set_alt_extra_long("You have cast death curse.\n");
  set_name("death curse");
  set_alias("guild_object");
  set_alt_name("spell");
}

void time_out() {
  tell_object(environment(), "The death curse spell fades....\n");
  ::time_out();
}

void dispel_magic() { time_out(); }


status cast_spell(object caster,object target,object prev,int time) {
  object curse;

  curse = present("death curse 2", target);
  if(curse) {
    write("You extent the time of your death curse.\n");
    curse->adj_time(time * 60);
    destruct(this_object());
    return 1;
  }
  write("The gods grant you you Death Curse.\n");
  level = time;
  adj_time(time * 60);
  return 1;
}


void player_death() {
  if(this_player() != environment()) {
    write("Death comes to get you personally.\n");
    this_player()->check_shout(environment()->query_name() +" death curses "+ 
                this_player()->query_name() +"!\n");
    if(this_player()->query_immunity("death")) {
      write("The curse has no effect on you.\n");
    }
    else if(random((int)this_player()->query_wisdom()) < random(level)) {
      this_player()->death(); /* curser gets no exp */
    }
  }
  else {
    write("The curse has no effect on you.\n");
  }
}



/* Native Mode Move */

#include <move.h>