//
// riyue-lun.c 日月LUN法
// Designed by secret(秘密)
//
#include <ansi.h>;
inherit SKILL;
string *order = ({""HIY"", ""HIG"", ""RED"", ""MAG"", ""YEL"", ""HIC"", ""HIW"", ""HIR"",""HIB"", ""CYN"",""WHT"",""HIM"",""BLU""});
mapping *action = ({
([ "action" : "$N使一招"+(order[random(13)])+"「破竹势」"NOR",抡起手中的$w向$n的$l砸去 ",
"skill_name" : "破竹势",
"force" : 120,
"dodge" : 10,
"parry" : 10,
"lvl" : 0,
"damage" : 250,
"damage_type" : "挫伤",
]),
([ "action" : "$N使一招"+(order[random(13)])+"「隐山谷势」"NOR",双肩一沉,舞动手中$w向$n的$l横扫 ",
"skill_name" : "隐山谷势",
"force" : 160,
"dodge" : 20,
"parry" : 20,
"lvl" : 8,
"damage" : 255,
"damage_type" : "挫伤",
]),
([ "action" : "$N使一招"+(order[random(13)])+"「隐微势」"NOR",就地一滚,手中自下而上撩向$n的$l ",
"skill_name" : "隐微势",
"force" : 200,
"dodge" : 20,
"parry" : 10,
"lvl" : 16,
"damage" : 260,
"damage_type" : "挫伤",
]),
([ "action" : "$N使一招"+(order[random(13)])+"「擒纵势」"NOR",身形起伏之际$w扫向$n的$l ",
"skill_name" : "擒纵势",
"force" : 240,
"dodge" : 15,
"parry" : 15,
"lvl" : 24,
"damage" : 265,
"damage_type" : "挫伤",
]),
([ "action" : "$N使一招"+(order[random(13)])+"「圆满势」"NOR",$w如离弦之箭般直捣$n的$l ",
"skill_name" : "圆满势",
"force" : 280,
"dodge" : 10,
"parry" : 10,
"lvl" : 32,
"damage" : 270,
"damage_type" : "挫伤",
]),
([ "action" : "$N跃入半空,使一招"+(order[random(13)])+"「訪UN鼗允啤?NOR",高举$w敲向$n的$l ",
"skill_name" : "訪UN鼗允?,
"force" : 320,
"dodge" : 10,
"parry" : 10,
"lvl" : 40,
"damage" : 275,
"damage_type" : "挫伤",
]),
([ "action" : "$N使一招"+(order[random(13)])+"「捉月势」"NOR",斜举手中$w击向$n的$l ",
"skill_name" : "捉月势",
"force" : 360,
"dodge" : 15,
"parry" : 15,
"lvl" : 48,
"damage" : 280,
"damage_type" : "挫伤",
]),
([ "action" : "$N提一口真气,使出"+(order[random(13)])+"「显吉祥」"NOR",$w扫向$n的头部 ",
"skill_name" : "显吉祥",
"force" : 400,
"dodge" : 20,
"parry" : 15,
"lvl" : 56,
"damage" : 300,
"damage_type" : "挫伤",
]),
([ "action" : "$N一招"+(order[random(13)])+"「大赞叹光明势」"NOR",右手立掌念经,左手单臂抡起$w,夹杂着阵阵风声向$n的$l砸去",
"skill_name" : "大赞叹光明势",
"force" : 170,
"dodge" : 10,
"lvl" : 5,
"damage" : 370,
"damage_type" : "砸伤",
]),
([ "action" : "$N将手中$w抛上半空,跃起一掌砸在$w上,这式"+(order[random(13)])+"「大皈依光明势」"NOR"有如流星坠地,直轰$n",
"skill_name" : "大皈依光明势",
"force" : 190,
"dodge" : 10,
"lvl" : 25,
"damage" : 375,
"damage_type" : "瘀伤",
]),
([ "action" : "凭空闪出一道雪白的光幕,光电闪烁中$w挟"+(order[random(13)])+"「大功德光明势」"NOR"的无上劲力,从$N手中飞出砍向$n的$l",
"skill_name" : "大功德光明势",
"force" : 200,
"dodge" : 20,
"lvl" : 45,
"damage" : 320,
"damage_type" : "割伤",
]),
([ "action" : "$N双眼磕闭,全身衣物却在内劲冲击下涨如气球,那$w在这"+(order[random(13)])+"「大福德光明势」"NOR"的推动下,向$n缓缓压来",
"skill_name" : "大福德光明势",
"force" : 300,
"dodge" : 5,
"lvl" : 65,
"damage" : 365,
"damage_type" : "内伤",
]),
([ "action" : "$N双手画圈,越转越急,光幕宛如一LUN明月,将$P笼罩,这"+(order[random(13)])+"「大吉祥光明势」"NOR"的劲力带着$w以排山倒海之势飞旋而出",
"skill_name" : "大吉祥光明势",
"force" : 270,
"dodge" : 15,
"lvl" : 85,
"damage" : 360,
"damage_type" : "砸伤",
]),
([ "action" : "$N口中高唱「降魔咒」,一招"+(order[random(13)])+"「大三昧光明势」"NOR"挥出,$w幻化的漫天的LUN影犹如行云流水般涌向$n",
"skill_name" : "大三昧光明势",
"force" : 290,
"dodge" : 10,
"lvl" : 105,
"damage" : 295,
"damage_type" : "瘀伤",
]),
([ "action" : "$N一招"+(order[random(13)])+"「大般若光明势」"NOR",面带宝光,以无上降魔大法催动手$w,那舞动的光云慢慢移向$n,彷佛要笼罩一切妖魔",
"skill_name" : "大般若光明势",
"force" : 300,
"dodge" : 5,
"lvl" : 125,
"damage" : 310,
"damage_type" : "瘀伤",
]),
([ "action" : "$N提一口真气,使出"+(order[random(13)])+"「大智慧光明势」"NOR",手中$w上下翻飞,LUN番砸向$n,叫$p再也分不清哪个是真,哪个是假",
"skill_name" : "大智慧光明势",
"force" : 330,
"dodge" : 20,
"lvl" : 145,
"damage" : 310,
"damage_type" : "砸伤",
]),
([ "action" : "$N面带微笑,眼露慈光,全身所散发出的"+(order[random(13)])+"「大慈悲光明势」"NOR"气劲宛如惊涛骇浪,$w一层接一层地涌向$n",
"skill_name" : "大慈悲光明势",
"force" : 320,
"dodge" : 15,
"lvl" : 165,
"damage" : 290,
"damage_type" : "瘀伤",
]),
([ "action" : "$N双手高举$w,大喝一声使出"+(order[random(13)])+"「大圆满光明势」"NOR"自上而下斩向$n,其快绝无比,气势汹涌,已达圆满之境",
"skill_name" : "大圆满光明势",
"force" : 450,
"dodge" : 20,
"lvl" : 185,
"damage" : 400,
"damage_type" : "刺伤",
]),
});
string *parry_msg = ({
"$n不躲不避,手中$w摆开,在$P跟前形成了一道光幕,$N此招根本无法再进。\n",
"却见$n踏前一步,手中$w翻飞,其势甚巨,$N前进不能,只好闪身而退。\n",
"$nLUN法突变,$w带着风声飞舞出去,后发先至,在$N还没攻出时就破了$p的招数。\n",
"但见$n举$w硬挡,乒的一声架开了来势汹汹的$N。\n",
});
string *msg = ({
""+(order[random(13)])+"空中那五只$w对击,声若龙吟,悠悠不绝,就在$n一呆之际,$w飞砸了出去!"NOR"",
""+(order[random(13)])+"呜呜声响中,$w旋转飞舞着撞向$n,在$p便要挡隔时,却绕过他飞到了身後"NOR"",
""+(order[random(13)])+"$w连续掷出,连续飞回,绕著$n兜个圈子,忽高忽低,或正或斜,所发声音也是有轻有响,旁观众人均给扰得眼花撩乱,心神不定"NOR"",
""+(order[random(13)])+"一声「小心了!」,蓦然间$w五体归一,并排向$n撞去,势若五牛冲阵,威不可挡"NOR"",
""+(order[random(13)])+"只见$w绕著$n,上下翻飞,$w跳跃灵动,呜呜响声不绝,掀的阵阵狂风有如刀割,似要把$n从中劈开"NOR"",
""+(order[random(13)])+"突然,狂风乱起,激荡中那$w相碰相撞,五LUN归一,合并了向$n砸去"NOR"",
""+(order[random(13)])+"法LUN在$n身前环饶,猛地向$p迎头击下,接着又飞来一LUN,一抄一送,呜呜声响,兜向$n$l"NOR"",
""+(order[random(13)])+"呼呼飞啸声中,那五只$w或直飞、或斜飞、或回旋、或下坠、或上升,霎时间$n的全部退路已被封死"NOR"",
""+(order[random(13)])+"猛地里$w向$n$l飞砸下,在$p沉肩卸避之时,$w又突然上飞击出,砸向$p的$l"NOR"",
""+(order[random(13)])+"那$w飞旋砸到,$n却并不回头,听风辨器,一一挡开,但$w便如长上了眼睛一般,竟然又旋飞到了$n$l"NOR"",
});
int valid_enable(string usage) { return usage == "hammer" || usage == "parry"; }
void skill_improved(object me)
{
int skill = me->query_skill("riyue-lun", 1);
if(skill >= 200 && !me->query("ryl_add")){
me->set("ryl_add", 1);
tell_object(me, HIW"\n忽然,你感道体内内息越转越快,瞬时间功力已经上升到了一个新的境界!\n你的精力增加了!\n你的臂力增加了!\n"NOR);
me->add("max_neili", skill+random(skill));
me->add("str", 1);
}
}
int valid_learn(object me)
{
if ((int)me->query("max_neili") < 100)
return notify_fail("你的内力不够。\n");
if ((int)me->query_skill("longxiang", 1) >= 20 ||
(int)me->query_skill("xiaowuxiang", 1) >= 20)
return 1;
else if ((int)me->query_skill("longxiang", 1) < 20)
return notify_fail("你的龙象般若功火候太浅。\n");
else if ((int)me->query_skill("xiaowuxiang", 1) < 20)
return notify_fail("你的小无相功火候太浅。\n");
if ((int)me->query_skill("necromancy", 1) < 80)
return notify_fail("你的降伏法火候太浅。\n");
if ((int)me->query_skill("xiangmo-chu", 1) < 80)
return notify_fail("你的金刚降魔杵火候太浅。\n");
if ((int)me->query_skill("shenkong-xing", 1) < 80)
return notify_fail("你的身空行火候太浅。\n");
}
string query_skill_name(int level)
{
int i;
for(i = sizeof(action)-1; i >= 0; i--)
if(level >= action["lvl"])
return action["skill_name"];
}
mapping query_action(object me, object weapon)
{
int i, level;
string str, message;
level = (int) me->query_skill("riyue-lun",1);
if(
random(level) > 100
&& me->query("neili") > 500
&& random(10)>5
){
if(weapon->query("id") == "jin lun") str = "金LUN";
else if(weapon->query("id") == "yin lun") str = "银LUN";
else if(weapon->query("id") == "fa lun") str = "法LUN";
else str = weapon->name();
message = msg[random(sizeof(msg))];
message = replace_string(message, "$w", str);
switch(str){
case "金LUN" : message = HIY+message+NOR; break;
case "银LUN" : message = HIW+message+NOR; break;
case "法LUN" : message = HIC+message+NOR; break;
default : break;
}
return ([
"action":message,
"damage":(random(10)+1)*80,
"damage_type":random(2)?"砸伤":"瘀伤",
"parry": 35,
"dodge": 35,
"force":250+random(300)
]);
}
for(i = sizeof(action); i > 0; i--)
if(level > action[i-1]["lvl"])
return action[NewRandom(i, 20, level/5)];
}
string query_parry_msg()
{
object weapon;
if (objectp(weapon = this_player()->query_temp("weapon")) && weapon->query("skill_type") == "hammer")
return parry_msg[random(sizeof(parry_msg))];
}
string perform_action_file(string action)
{
return __DIR__"riyue-lun/" + action;
}
int practice_skill(object me)
{
object weapon;
if (!objectp(weapon = me->query_temp("weapon"))
|| (string)weapon->query("skill_type") != "hammer")
return notify_fail("你使用的武器不对。\n");
if ((int)me->query_skill("xiangmo-chu", 1) < 80)
return notify_fail("你的金刚降魔杵火候太浅。\n");
if ((int)me->query_skill("shenkong-xing", 1) < 80)
return notify_fail("你的身空行火候太浅。\n");
if ((int)me->query_skill("necromancy", 1) < 80)
return notify_fail("你的降伏法火候太浅。\n");
if ((int)me->query("qi") < 150)
return notify_fail("你的体力不够,练不了日月LUN法。\n");
me->receive_damage("qi", 50);
return 1;
}
mixed hit_ob(object me, object victim, int damage_bonus)
{
string msg;
object victim_w;
int i, level;
victim_w = victim->query_temp("weapon");
level = (int) me->query_skill("riyue-lun",1);
if (random(me->query_skill("riyue-lun",1)) > 100
&& random(2)==0)
{
msg = HIR"$N大呼酣战,口念密宗不动明王真言,运龙象之力朝$n击去!\n"NOR;
victim->receive_damage("qi", level/2);
victim->receive_wound("qi", level/2);
message_vision(msg,me,victim);
}
if (victim->query_temp("weapon") ||
victim->query_temp("secondary_weapon"))
{
if( (int)me->query_skill("riyue-lun", 1) < 20 )
return HIW "一阵兵刃相撞的声音过后,对方兵器居然完好无损。\n" NOR;
if( random(victim->query_temp("apply/damage")) <
random(me->query_skill("riyue-lun", 1)/2 )
&& random(2)==0 )
{
victim_w->unequip();
victim_w->reset_action();
victim_w->move(environment(victim));
victim_w->set("name", victim_w->query("name") + "的碎片");
victim_w->set("value", 0);
victim_w->set("weapon_prop", 0);
victim_w->set("long", "一堆破碎物事,好象是兵器碎片。\n");
return HIB "你听到"+(order[random(13)])+"「叮当」"NOR"一声兵刃破碎的声音,兵器碎片溅了一地!\n" NOR;
}
}
}
int ob_hit(object ob, object me, int damage)
{
object wp1,weapon;
string msg;
int p,j,skill, neili, neili1;
int level,level2,damage2;
level = (int) me->query_skill("unarmed",1);
level2= (int) me->query_skill("longxiang",1);
skill = me->query_skill("longxiang", 1);
neili = me->query("neili");
neili1 = ob->query("neili");
if ( level2<= 0) level2= (int) me->query_skill("xiaowuxiang",1);
damage2= (int) ob->query("neili",1)/10;
if (random(8)==0 && level2>=300 && (me->query_skill_mapped("force") == "longxiang" || me->query_skill_mapped("force") == "xiaowuxiang"))
{
j = -damage/2;
if (damage2> 5000) damage2=5000;
msg = HIM"$N 口中喃喃念起「降妖伏魔咒」,内力汹涌而至,一层一层的加强。$n心神一乱,内力尽然提不起来!\n"NOR;
ob->set_temp("apply/attack", 0);
ob->set_temp("apply/defense", 0);
if (random(2)==0)
{
msg += HIM"$N"+HIM+"默念大明六字真言,手结摩利支天愤怒印! $n心神一荡,吐出一口鲜血!"+NOR;
if (ob->query("qi") > damage2)
{
ob->receive_damage("qi", damage2/2);
ob->receive_wound("qi", damage2/2);
}
if (!ob->is_busy() && random(3)==0) ob->start_busy(2);
}
message_vision(msg, me, ob);
return j;
}
}
|