/
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/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/
/* shadow for 'hide in shadows' skills of thief */

inherit "obj/shadows/shadow";

object who;
int stealth;

void shadow_short(string alt_type) {
  if(this_player()->query_hide_in_shadows_object()) {
    destruct(this_object());
    return;
  }
  who   = this_player();
  if(!alt_type) alt_type = "stealth";
  stealth = (int)call_other(this_player(),"query_"+ alt_type) + 1;
  shadow_object(who);
}


status move_player(string dest_dir, mixed option_dest, status domain_safe) {
  status flag;

  tell_object(who,"You stop hiding and move out of the shadows...\n");
  flag = (status)who->move_player(dest_dir, option_dest, domain_safe);
  destruct(this_object());
  return flag;
}


string short(status wiz) {
  if(environment(this_player()) == environment(who)) {
    if(random(stealth) >= random((int)this_player()->query_intelligence()+1)) {
      return (wiz) ? "@"+ (string)who->short(wiz) : 0;
    }
  }
  if(wiz)
    return "@"+ (string)who->short(wiz);
  else
    return (string)who->short(wiz);
}

object query_hide_in_shadows_object() { return this_object(); }

int query_hide_in_shadows() { return stealth; }