yijinjing中的特攻代码:
mixed hit_ob(object me, object victim, int damage_bonus, int factor, string attack_skill)
{
int skill;
int i = 1,j;
if(!me->query_temp("fanzhen") && !me->query_temp("sl/jiuyang"))
return 1;
skill = me->query_skill("force");
i = damage_bonus * (skill+1) / 1000;
i = i/2+ random(i);
if(me->query_temp("weapon"))
i = i*3;
if(me->query_temp("apply/damage")>=100)
i = i/3;
if (i<1) i=1;
if(wizardp(me)) tell_object(me,sprintf("hit_ob: %d ",i));
j = me->query_skill("yijinjing",1)/20;
if (j<1) j=1;
if (random(2)==0)
{
message_vision(HIR"$N"+HIR+"高喧一声佛号,将体内九阳真气聚于双臂,狭雷霆之势攻向$n!\n" NOR, me,victim);
victim->receive_damage("qi", 10+3*random(j), me);
victim->receive_wound("qi", 10+3*random(j), me);
}
//i = i + ::force_hit(me,victim,damage_bonus,factor,attack_skill);
return i;
}
疑问是:i这个变量计算了半天,最后特攻函数返回i,究竟这个i是干什么的?
还有j,这个值是不是弄得太小了,就算600级的yijinjing,j才是30,造成的伤害简直太小了!
最关心的就是返回的那个i是干什么的?请hxsd看看!
|