痴心情长剑代码
其中的特攻部分:
int yunwu(object me, object victim, object weapon, int damage)
{
if (!victim) return 0;
if (!me) return 0;
if(damage==RESULT_DODGE || damage==RESULT_PARRY) return 1;
else if ( !living(victim) && victim->query_skill("force") > 100 ) {
message_vision(HIR"\n?见$n伤口中一道血箭如涌泉般向上喷出,原来$p中剑后内力未消,将鲜血逼得从伤口中急喷而出,既诡异,又可怖。\n" NOR, me,victim);
me->delete_temp("yunwu");
return 1;
}
else{
if (!victim) return 0;
if (!me) return 0;
if (me->is_busy() ) return 0;
//if (victim=me) return 0;
me->add("neili", -30);
victim->start_busy(2);
victim->receive_damage("qi", random(30)+20);
me->set_temp("yunwu_hit", 1);
if(victim && me)
{
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"));
}
}
}
mixed hit_ob(object me, object victim, int damage_bonus)
{
string msg;
int j, k;
int level;
j = me->query_skill("chixin-jian", 1);
k = me->query_skill("qimen-wuxing",1);
level = (int) me->query_skill("bibo-shengong",1);
if (random(6)==0 && level>=300 && me->query_skill_mapped("force") == "bibo-shengong")
{
if (victim->query("qi") > 600)
victim->add("qi",-250+random(200));
victim->add("eff_qi",-(50+random(200)));
me->add("neili", -20);
if (!victim->is_busy()) victim->start_busy(1);
return HIR "$N施展开奇门五行,$n心神一乱,被打中$l。结果鲜血狂奔!!\n";
}
if( random(10) >= 5
&& !me->is_busy()
&& !victim->is_busy()
&& j > 120
&& k > 120
&& me->query_skill_mapped("parry") == "chixin-jian"
&& j > random(victim->query_skill("dodge",1))){
switch(random(3)){
case 0 :
msg = HIW"$N施展开奇门剑路,剑剑不依照常规!\n"NOR;
msg+= HIW"$n连连後退,全力招架,无力还招!\n"NOR;
victim->start_busy(3);
message_vision(msg, me, victim);
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"), 2);
break;
case 1 :
msg = HIW"$N脚下踩著奇门步法,一下子刺出好几剑!\n"NOR;
msg+= HIW"$n根本分不清楚那一剑是虚,那一剑是实,?好停下攻势,严守门户。\n"NOR;
victim->start_busy(2);
message_vision(msg, me, victim);
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"), 0);
break;
case 2 :
msg = HIW"$N风驰电掣的绕著$n快跑,忽东忽西,简直像是足不点地的飞行一般!\n"NOR;
msg+= HIW"$n随着$N转来转去,?弄得眼花缭乱,摇摇欲坠。\n"NOR;
victim->start_busy(3);
message_vision(msg, me, victim);
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"), 1);
break;
}
}
}
其中函数yunwu部分
if(victim && me)
{
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"));
}
而函数hit_ob部分
switch(random(3)){
case 0 :
msg = HIW"$N施展开奇门剑路,剑剑不依照常规!\n"NOR;
msg+= HIW"$n连连後退,全力招架,无力还招!\n"NOR;
victim->start_busy(3);
message_vision(msg, me, victim);
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"), 2);
break;
case 1 :
msg = HIW"$N脚下踩著奇门步法,一下子刺出好几剑!\n"NOR;
msg+= HIW"$n根本分不清楚那一剑是虚,那一剑是实,?好停下攻势,严守门户。\n"NOR;
victim->start_busy(2);
message_vision(msg, me, victim);
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"), 0);
break;
case 2 :
msg = HIW"$N风驰电掣的绕著$n快跑,忽东忽西,简直像是足不点地的飞行一般!\n"NOR;
msg+= HIW"$n随着$N转来转去,?弄得眼花缭乱,摇摇欲坠。\n"NOR;
victim->start_busy(3);
message_vision(msg, me, victim);
COMBAT_D->do_attack(me, victim, me->query_temp("weapon"), 1);
break;
}
请注意前后的两种COMBAT_D->do_attack
前面的COMBAT_D->do_attack(me, victim, me->query_temp("weapon"));
后面的COMBAT_D->do_attack(me, victim, me->query_temp("weapon"), 1);
请问后面的多了一个参数 1 ,这个参数是判断什么的呢?
发现这个剑法可能会造成超多的连招,厉害啊!嘿嘿!
|