if( userp(ob) || undefinedp(my["max_jing"]) )
{
if( my["age"] <= 14 ) my["max_jing"] = 100;
else if( my["age"] <= 30 ) my["max_jing"] = 100 + (my["age"] - 14) * my["int"];
else my["max_jing"] = my["int"] * 16 + 100;
if( my["age"] > 60 ) my["max_jing"] -= (my["age"] - 60) * 5 ;
// 道家保精:
// if(my["age"] > 20 && ob->query("ob->query("breakup"))
// {
// my["max_jing"] += 1000;
// }
if(my["age"] > 20 && (int)ob->query("breakup") == 1)
{
my["max_jing"] += 1000;
}
if(my["age"] > 60 && (int)ob->query_skill("taoism", 1) >= 120)
{
my["max_jing"] += (my["age"] - 60) * 5;
}
// 佛家养精:30岁前补精,30岁后长精
if((xism_age=(int)ob->query_skill("buddhism", 1)) > 39)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_jing"] += xism_age *((int)ob->query_skill("hunyuan-yiqi", 1)/10);
}
if( my["max_jingli"] > 0 ) my["max_jing"] += my["max_jingli"] / 2;
if(my["age"] > 20 && (int)ob->query("breakup") == 1)
{
my["max_jingli"] += 100;
}
}
if( userp(ob) || undefinedp(my["max_qi"]) )
{
if( my["age"] <= 14 ) my["max_qi"] = 100;
else if( my["age"] <= 30 ) my["max_qi"] = 100 + (my["age"] - 14) * my["con"];
else my["max_qi"] = my["con"] * 16 + 100;
if( my["age"] > 60 ) my["max_qi"] -= (my["age"] - 60) * 5;
// 佛家保气:
if(my["age"] > 60 && (int)ob->query_skill("buddhism", 1) >= 120)
{
my["max_qi"] += (my["age"] - 60) * 5;
}
// 道家练气:30岁前补气,30岁后长气
if((xism_age=(int)ob->query_skill("taoism", 1)) > 39)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("taiji-shengong", 1)/10);
}
// 毒技练气:30岁前补气,30岁后长气
if((xism_age=(int)ob->query_skill("poison", 1)) > 39)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("huagong-dafa", 1)/15);
}
//baituo
if((xism_age=(int)ob->query_skill("training", 1)) > 139
&& (int)ob->query_skill("hamagong", 1)> 1 )
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("hamagong", 1)/18);
}
//dali
else if((xism_age=(int)ob->query_skill("buddhism", 1)) > 139
&& (int)ob->query_skill("kurong-changong", 1) > 1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("kurong-changong", 1)/18);
}
//emei
else if((xism_age=(int)ob->query_skill("mahayana", 1)) > 139
&& (int)ob->query_skill("linji-zhuang", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("linji-zhuang", 1)/15);
}
//qingcheng
else if((xism_age=(int)ob->query_skill("taoism", 1)) > 139
&& (int)ob->query_skill("qingming-xuangong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (ob->query("family/family_name")=="青城派")
{
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("qingming-xuangong", 1)/15);
}
}
//henshan
else if((xism_age=(int)ob->query_skill("buddhism", 1)) > 139
&& (int)ob->query_skill("huiyan-xinfa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (ob->query("family/family_name")=="恒山派")
{
if (xism_age > 0) my["max_jing"] += xism_age *((int)ob->query_skill("huiyan-xinfa", 1)/15);
}
}
//hujia
else if((xism_age=(int)ob->query_skill("martial-cognize", 1)) > 139
&& (int)ob->query_skill("lengyue-shengong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (ob->query("family/family_name")=="关外胡家")
{
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("martial-cognize", 1)/15);
}
}
//meizhuang
else if((xism_age=(int)ob->query_skill("piaoyibu", 1)) > 139
&& (int)ob->query_skill("wuzheng-xinfa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (ob->query("family/family_name")=="梅庄")
{
if (xism_age > 0) my["max_jing"] += xism_age *((int)ob->query_skill("wuzheng-xinfa", 1)/18);
}
}
//gaibang
else if((xism_age=(int)ob->query_skill("begging", 1)) > 139
&& (int)ob->query_skill("huntian-qigong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("huntian-qigong", 1)/20);
}
//mr
else if((xism_age=(int)ob->query_skill("douzhuan-xingyi", 1)) > 139
&& (int)ob->query_skill("shenyuan-gong", 1)>1 )
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("shenyuan-gong", 1)/18);
}
//gumu
else if((xism_age=(int)ob->query_skill("qufeng", 1)) > 139
&& (int)ob->query_skill("yunv-xinfa", 1) > 1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("yunv-xinfa", 1)/15);
}
//huashan
else if((xism_age=(int)ob->query_skill("zhengqijue", 1)) > 139
&&(int)ob->query_skill("zixia-shengong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("zixia-shengong", 1)/20);
if ((int)ob->query_skill("huashan-neigong", 1)>(int)ob->query_skill("zixia-shengong", 1))
{
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("huashan-neigong", 1)/20);
}
if(((int)ob->query_skill("ziyunyin", 1)) > 1 && ob->query("family/family_name")=="华山派")
{
if (xism_age > 0) my["max_jing"] += xism_age *((int)ob->query_skill("ziyunyin", 1)/20);
}
}
//kl
else if((xism_age=(int)ob->query_skill("art", 1)) > 139
&& (int)ob->query_skill("xuantian-wuji", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("xuantian-wuji", 1)/16);
}
//lj
else if((xism_age=(int)ob->query_skill("yangyanshu", 1)) > 139
&& (int)ob->query_skill("bahuang-gong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("bahuang-gong", 1)/15);
}
//mz
else if((xism_age=(int)ob->query_skill("lamaism", 1)) > 139
&& (int)ob->query_skill("longxiang", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("longxiang", 1)/20);
}
//mj
else if((xism_age=(int)ob->query_skill("shenghuo-shengong", 1)) > 139
&& (int)ob->query_skill("jiuyang-shengong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("jiuyang-shengong", 1)/18);
}
//qz
else if((xism_age=(int)ob->query_skill("taoism", 1)) > 139
&& (int)ob->query_skill("xiantian-qigong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("xiantian-qigong", 1)/18);
}
//ry
else if((xism_age=(int)ob->query_skill("kuihua-xinfa", 1)) > 139
&& (int)ob->query_skill("tmdafa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("tmdafa", 1)/18);
}
//sl
else if((xism_age=(int)ob->query_skill("yijinjing", 1)) > 139
&& (int)ob->query_skill("hunyuan-yiqi", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("hunyuan-yiqi", 1)/20);
}
//shenlong
else if((xism_age=(int)ob->query_skill("yangsheshu", 1)) > 139
&& (int)ob->query_skill("shenlong-xinfa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("shenlong-xinfa", 1)/15);
}
//taohua
else if((xism_age=(int)ob->query_skill("count", 1)) > 139
&& (int)ob->query_skill("bibo-shengong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("bibo-shengong", 1)/15);
}
//tiandi
else if((xism_age=(int)ob->query_skill("yunlong-shenfa", 1)) > 139
&& (int)ob->query_skill("yunlong-shengong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("yunlong-shengong", 1)/15);
}
//tz
else if((xism_age=(int)ob->query_skill("shuishangpiao", 1)) > 139
&& (int)ob->query_skill("guiyuan-tunafa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("guiyuan-tunafa", 1)/15);
}
//xiaoyao
else if((xism_age=(int)ob->query_skill("yangyanshu", 1)) > 139
&& (int)ob->query_skill("beiming-shengong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("beiming-shengong", 1)/15);
}
//lingxiao
else if((xism_age=(int)ob->query_skill("snowstep", 1)) > 139
&& (int)ob->query_skill("bingxue-xinfa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("bingxue-xinfa", 1)/18);
}
//wudu
else if((xism_age=(int)ob->query_skill("duji", 1)) > 139
&& (int)ob->query_skill("wudu-shengong", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("wudu-shengong", 1)/18);
}
//
//唐门
else if((xism_age=(int)ob->query_skill("throwing", 1)) > 139
&& (int)ob->query_skill("biyun-xinfa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("biyun-xinfa", 1)/18);
}
//
//飞天
else if((xism_age=(int)ob->query_skill("shayi", 1)) > 139
&& (int)ob->query_skill("shayi-xinfa", 1)>1)
{
xism_age = xism_age/2;
if (my["age"] <= 30) xism_age -= my["age"];
else xism_age -= 30;
if (xism_age > 0) my["max_qi"] += xism_age *((int)ob->query_skill("shayi-xinfa", 1)/18);
}
if(((int)ob->query_skill("chengzi18po", 1)) >= 100)
{
my["max_qi"] += ((int)ob->query_skill("chengzi18po", 1)*3);
}
if(((int)ob->query_skill("qingzi9da", 1)) >= 100)
{
my["max_jing"] += ((int)ob->query_skill("qingzi9da", 1)*2);
}
if(((int)ob->query_skill("dramaturgy", 1)) >= 100)
{
my["max_jing"] += ((int)ob->query_skill("dramaturgy", 1)*2);
}
if(((int)ob->query_skill("goplaying", 1)) >= 100)
{
my["max_jing"] += ((int)ob->query_skill("goplaying", 1)*2);
}
if(((int)ob->query_skill("horticulture", 1)) >= 100)
{
my["max_qi"] += ((int)ob->query_skill("horticulture", 1)*3);
}
if(((int)ob->query_skill("luteplaying", 1)) >= 100)
{
my["max_qi"] += ((int)ob->query_skill("luteplaying", 1)*3);
}
if(((int)ob->query_skill("medicine", 1)) >= 100)
{
my["max_qi"] += ((int)ob->query_skill("medicine", 1)*3);
}
if(((int)ob->query_skill("miaoshouhuichun", 1)) >= 100)
{
my["max_jing"] += ((int)ob->query_skill("miaoshouhuichun", 1)*2);
}
if(((int)ob->query_skill("painting", 1)) >= 100)
{
my["max_jing"] += ((int)ob->query_skill("painting", 1)*2);
}
if(((int)ob->query_skill("construction", 1)) >= 100)
{
my["max_jing"] += ((int)ob->query_skill("construction", 1)*2);
}
if(((int)ob->query_skill("martial-cognize", 1)) >= 100)
{
my["max_jing"] += ((int)ob->query_skill("martial-cognize", 1)*2);
my["max_qi"] += ((int)ob->query_skill("martial-cognize", 1)*2);
}
if(((int)ob->query("max_jingli", 1)) >= 10)
{
jingli=(int)ob->query("max_jingli", 1)*2;
if (jingli>= 5000) jingli=5000;
my["max_jing"] += jingli;
}
//
if( my["max_neili"] > 0 ) my["max_qi"] += my["max_neili"] / 2;
}
ob->set_default_object(__FILE__);
if( !ob->query_weight() ) ob->set_weight(BASE_WEIGHT + (my["str"] - 10)*2000);
if (userp(ob))
{
//冲穴效果
cal_anatemp(ob);
//精气如果有增加,则增加的数值是force的1/50
if ((int)ob->query_temp("ana_t/jing")>=1 && (int)ob->query_skill("force",1)>1)
{
ob->add("max_jing",ob->query_skill("force",1)*2 /50 *(int)ob->query_temp("ana_t/jing"));
ob->add("eff_jing",ob->query_skill("force",1)*2 /50 *(int)ob->query_temp("ana_t/jing"));
}
if ((int)ob->query_temp("ana_t/qi")>=1 && (int)ob->query_skill("force",1)>1)
{
ob->add("max_qi",ob->query_skill("force",1)*2 /50 *(int)ob->query_temp("ana_t/qi"));
ob->add("eff_qi",ob->query_skill("force",1)*2 /50 *(int)ob->query_temp("ana_t/qi"));
}
}
} |