//create by huarong 2003.11
#include <ansi.h>

inherit F_CLEAN_UP;

int exert(object me, object target)
{
        object *ob;
        int i, skill,howlong, damage, force,time;
       string str;
        mapping action; 

     if(!wizardp(me)) return 0;

        if( !target
        || !target->is_character()
        || target->is_corpse()
        || target==me)
                return notify_fail("你想要对着谁发呆？\n");

        if( target == me ) return notify_fail("看来也只有自己对着自己发呆了？\n");

        if (me->query_skill("idle-force",1)<80)
                return notify_fail("你的发呆大法还不够。\n");
//           if( target->query("id")=="huarong" ) return notify_fail("你怎么可以对天狼星大人无礼呢？\n");
        howlong=me->query_skill("idle-skill",1)/40;
        message_vision(HIC "\n$N使出发呆大法,痴痴的朝$n望去。\n"NOR,me,target);
        if (me->query_skill("idle-force",1)<500)
         {
          if ( random(me->query("force")) > target->query("force")/2 )
             {
               message_vision(HIC "\n$N一下惊呆了，茫然不知所措。\n"NOR,target);
              target->start_busy(howlong+1+random(2));
               me->start_busy(1);
               str="听说"+target->name()+"被"+me->name()+"用发呆大法袭击成功！";
               message("channel:rumor",HIM"【空穴来风】某人："+str+"\n"NOR,users());
              }
          else
             {
               message_vision(HIC "\n$N不屑一眼，根本不理。\n"NOR,target);
              me->start_busy(howlong+random(2));
             }
          }
       else 
         {
           message_vision(HIC "\n$N一下惊呆了，当场昏迷.\n"NOR,target);
           target->unconcious();
           me->start_busy(8);
           str="听说"+target->name()+HIM+"中了"+me->name()+HIM+"的绝技"+HIY+"『乾坤一呆』"+HIM+"，当场昏倒，不省人事！";
           message("channel:rumor",HIM"【空穴来风】某人："+str+"\n"NOR,users());
         }
        me->set("actions",action);
        me->reset_action();
        if( !target->is_fighting(me) )
         {
          if( living(target) ) 
             {
                  if( userp(target) ) target->fight_ob(me);
                  else target->kill_ob(me);
              }
          }
        return 1;
}


