// jiuyang-shengong.c 九阳神功
#include <ansi.h>
inherit FORCE;
#include <combat_msg.h>
int valid_enable(string usage)
{
        return usage == "force";
}

/*int valid_learn(object me)
{
           return notify_fail("九阳神功只能通过读全部四册的《九阳真经》来提高。\n");
}*/

/*int practice_skill(object me)
{
           return notify_fail("九阳神功只能通过读全部四册的《九阳真经》来提高。\n");
}*/

string exert_function_file(string func)
{
        return __DIR__"jiuyang-shengong/" + func;
}

void skill_improved(object me)
{
         int i =1 +random(5);
         if( me->query_skill("jiuyang-shengong", 1) > 30){
             
             me->add("max_neili", i); 
             tell_object(me,HIR"\n随着九阳神功的提高，你感觉自己内力增加了"+chinese_number(i)+"点。\n"NOR);
         }
}

mapping exercise_msg(object me)
{
    return ([
      "status_msg" : HIR + me->name()+"呼翕九阳，进入人我两忘之境界" NOR,
      "start_my_msg" : "你盘膝而坐，运使九阳，气向下沉，由两肩收入脊骨，注于腰间，进入人我两忘之境界。\n",
      "start_other_msg" : me->name()+"盘膝而坐，运使九阳，气向下沉，由两肩收入脊骨，注于腰间，进入人我两忘之境界。\n",
      "halt_msg" : "$N周身微微颤动，长出口气，站了起来。\n",
      "end_my_msg" : "你呼翕九阳，抱一含元，缓缓睁开双眼，只觉得全身真气流动，体内阳气已然充旺之极。\n",
      "end_other_msg" : "只见"+me->name()+"呼翕九阳，抱一含元，缓缓睁开双眼，只觉得全身真气流动，体内阳气已然充旺之极。\n"
    ]);
}
/*
int ob_hit(object ob, object me, int damage)
{
	string msg;


	//if(random(5)>2 && me->query("neili") < me->query("max_neili"))
          if(random(5)>1)
	{
                    me->add("neili", 70);
                     msg = HIY "一股暖流发自丹田流向$N全身，$N只觉得全身真气流动，体内阳气已然充旺之极!\n"NOR;
                //   tell_object(me, HIY "\n一股暖流发自丹田流向全身，你只觉得全身真气流动，体内阳气已然充旺之极!\n\n" NOR);
            message_vision(msg, me, ob);
		
	}
}*/
mixed hit_ob(object me, object ob, int damage_bonus)
{
	string msg;


	if(random(5)>1 && me->query("neili")<me->query("max_neili"))
         // if(random(5)>1)
	{
                    me->add("neili", 70);
                     msg = HIY "一股暖流发自丹田流向$N全身，$N只觉得全身真气流动，体内阳气已然充旺之极!\n"NOR;
                  // tell_object(me, HIY "\n一股暖流发自丹田流向全身，你只觉得全身真气流动，体内阳气已然充旺之极!\n\n" NOR);
            message_vision(msg, me, ob);
		
	}
}