www.pudn.com > wap-wscs.rar > pk.class.asp, change:2014-08-10,size:55519b

```﻿<%
Function pk(uid,pid,p1hp,p2hp,lianji,fmsg,p1nq,p2nq)
p1chp=p1hp
'fmsg=fmsg&"p1生命"&p1chp
p2chp=p2hp
'fmsg=fmsg&"p2生命"&p2chp
Randomize '放置一个随机种子
'fmsg=fmsg&"随机数:"&rnd,1)
max=100
min=1
mode=Int((max-min+1)*Rnd+min)
If mode>50 Then'玩家1首先攻击
'fmsg=fmsg&"p1top2"
If lianji="p1" Then
If p1nq<0 Then p1nq=0
If p2nq<0 Then p2nq=0
'fmsg=fmsg&"1 u="&uid&" p="&pid&" p1="&p1chp&" p2="&p2chp&" l="&lianji&" p1n="&p1nq&" p2n="&p2nq
Call p1top2(uid,pid,p1chp,p2chp,lianji,fmsg,p1nq,p2nq)'玩家1攻击玩家2 连击
Else
If p1nq<0 Then p1nq=0
If p2nq<0 Then p2nq=0
'fmsg=fmsg&"2 u="&uid&" p="&pid&" p1="&p1chp&" p2="&p2chp&" l="&lianji&" p1n="&p1nq&" p2n="&p2nq
Call p1top2(uid,pid,p1chp,p2chp,lianji,fmsg,p1nq,p2nq)'玩家1攻击玩家2
End If
Else'玩家2首先攻击
'fmsg=fmsg&"p2top1"
If lianji="p2" Then
'fmsg=fmsg&"<font color=red>连击</font>"
If p1nq<0 Then p1nq=0
If p2nq<0 Then p2nq=0
'fmsg=fmsg&"3 u="&uid&" p="&pid&" p1="&p1chp&" p2="&p2chp&" l="&lianji&" p1n="&p1nq&" p2n="&p2nq
Call p2top1(uid,pid,p1chp,p2chp,lianji,fmsg,p1nq,p2nq)'玩家2攻击玩家1 连击
Else
If p1nq<0 Then p1nq=0
If p2nq<0 Then p2nq=0
'fmsg=fmsg&"4 u="&uid&" p="&pid&" p1="&p1chp&" p2="&p2chp&" l="&lianji&" p1n="&p1nq&" p2n="&p2nq
Call p2top1(uid,pid,p1chp,p2chp,lianji,fmsg,p1nq,p2nq)'玩家2攻击玩家1
End If
End If
If p2hp<=0 Then pk=uid
If p1hp<=0 Then pk=pid
End Function

Sub p2top1(uid,pid,p1chp,p2chp,lianji,fmsg,p1nq,p2nq)'uid=p1 pid=p2 p2攻击P1 对手ID 本人ID 对手生命 本人生命 本人攻击对手
'初始化
'获取对手属性
Set usinfo=New userinfo
p1name=usinfo.uinfo(uid,"nickname")'玩家名字
p1lvl=usinfo.uinfo(uid,"lvl")'等级
p1hp=usinfo.uinfo(uid,"hp")'总生命值
p1sb=usinfo.uinfo(uid,"sb")'闪避率
p1ap=usinfo.uinfo(uid,"ap")'攻击力
p1dp=usinfo.uinfo(uid,"dp")'防御力
p1gd=usinfo.uinfo(uid,"gd")'格挡率
p1bj=usinfo.uinfo(uid,"bj")'暴击率
p1kill=usinfo.uinfo(uid,"kill")'获取击杀数
If p1kill>=30 Then p1kill=30
wq=usinfo.uinfo(uid,"wq")'武器
wqconlvl=getconsozb(wq,"lvl",uid)'强化等级
If wqconlvl>0 Then
wqconap=getconsozb(wq,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
wqcondp=getconsozb(wq,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
wqconhp=getconsozb(wq,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
wqconsb=getconsozb(wq,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
wqcongd=getconsozb(wq,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
wqconbj=getconsozb(wq,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
wqap=usinfo.zbinfo("wq",wq,"ap",uid)'武器攻击力
wqdp=usinfo.zbinfo("wq",wq,"dp",uid)'武器防御力
wqhp=usinfo.zbinfo("wq",wq,"hp",uid)'武器生命值
'fmsg=fmsg&"武器"&uid&"增加生命力="&wqhp&"<br/>"
wqsb=usinfo.zbinfo("wq",wq,"sb",uid)'武器闪避
wqgd=usinfo.zbinfo("wq",wq,"gd",uid)'武器格挡
wqbj=usinfo.zbinfo("wq",wq,"bj",uid)'武器暴击
'If wq=0 Then wq="无"
yf=usinfo.uinfo(uid,"yf")'衣服
yfconlvl=getconsozb(yf,"lvl",uid)'强化等级
If yfconlvl>0 Then
yfconap=getconsozb(yf,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
yfcondp=getconsozb(yf,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
yfconhp=getconsozb(yf,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
yfconsb=getconsozb(yf,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
yfcongd=getconsozb(yf,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
yfconbj=getconsozb(yf,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
yfap=usinfo.zbinfo("yf",yf,"ap",uid)'衣服攻击力
yfdp=usinfo.zbinfo("yf",yf,"dp",uid)'衣服防御力
yfhp=usinfo.zbinfo("yf",yf,"hp",uid)'衣服生命值
yfsb=usinfo.zbinfo("yf",yf,"sb",uid)'衣服闪避
yfgd=usinfo.zbinfo("yf",yf,"gd",uid)'衣服格挡
yfbj=usinfo.zbinfo("yf",yf,"bj",uid)'衣服暴击
'If yf=0 Then yf="无"
xz=usinfo.uinfo(uid,"xz")'鞋子
xzconlvl=getconsozb(xz,"lvl",uid)'强化等级
If xzconlvl>0 Then
xzconap=getconsozb(xz,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
xzcondp=getconsozb(xz,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
xzconhp=getconsozb(xz,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
xzconsb=getconsozb(xz,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
xzcongd=getconsozb(xz,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
xzconbj=getconsozb(xz,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
xzap=usinfo.zbinfo("xz",xz,"ap",uid)'鞋子攻击力
xzdp=usinfo.zbinfo("xz",xz,"dp",uid)'鞋子防御力
xzhp=usinfo.zbinfo("xz",xz,"hp",uid)'鞋子生命值
xzsb=usinfo.zbinfo("xz",xz,"sb",uid)'鞋子闪避
xzgd=usinfo.zbinfo("xz",xz,"gd",uid)'鞋子格挡
xzbj=usinfo.zbinfo("xz",xz,"bj",uid)'鞋子暴击
'If xz=0 Then xz="无"
tk=usinfo.uinfo(uid,"tk")'头盔
tkconlvl=getconsozb(tk,"lvl",uid)'强化等级
If tkconlvl>0 Then
tkconap=getconsozb(tk,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
tkcondp=getconsozb(tk,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
tkconhp=getconsozb(tk,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
tkconsb=getconsozb(tk,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
tkcongd=getconsozb(tk,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
tkconbj=getconsozb(tk,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
tkap=usinfo.zbinfo("tk",tk,"ap",uid)'头盔攻击力
tkdp=usinfo.zbinfo("tk",tk,"dp",uid)'头盔防御力
tkhp=usinfo.zbinfo("tk",tk,"hp",uid)'头盔生命值
tksb=usinfo.zbinfo("tk",tk,"sb",uid)'头盔闪避
tkgd=usinfo.zbinfo("tk",tk,"gd",uid)'头盔格挡
tkbj=usinfo.zbinfo("tk",tk,"bj",uid)'头盔暴击
'If tk=0 Then tk="无"
fq=usinfo.uinfo(uid,"fq")'法器
fqconlvl=getconsozb(fq,"lvl",uid)'强化等级
If fqconlvl>0 Then
fqconap=getconsozb(fq,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
fqcondp=getconsozb(fq,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
fqconhp=getconsozb(fq,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
fqconsb=getconsozb(fq,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
fqcongd=getconsozb(fq,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
fqconbj=getconsozb(fq,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&fqconbj,1)
End If
fqap=usinfo.zbinfo("fq",fq,"ap",uid)'法器攻击力
fqdp=usinfo.zbinfo("fq",fq,"dp",uid)'法器防御力
fqhp=usinfo.zbinfo("fq",fq,"hp",uid)'法器生命值
fqsb=usinfo.zbinfo("fq",fq,"sb",uid)'法器闪避
fqgd=usinfo.zbinfo("fq",fq,"gd",uid)'法器格挡
fqbj=usinfo.zbinfo("fq",fq,"bj",uid)'法器暴击
'If fq=0 Then fq="无"
p1zbap=wqap+yfap+xzap+tkap+fqap
p1zbdp=wqdp+yfdp+xzap+tkdp+fqdp
p1zbhp=wqhp+yfhp+xzhp+tkhp+fqhp
p1zbsb=wqsb+yfsb+xzsb+tksb+fqsb
p1zbgd=wqgd+yfgd+xzgd+tkgd+fqgd
p1zbbj=wqbj+yfbj+xzbj+tkbj+fqbj

p1buffap=usinfo.buffinfo(uid,"ap")'buff ap
p1buffdp=usinfo.buffinfo(uid,"dp")'buff dp
p1buffhp=usinfo.buffinfo(uid,"hp")'buff hp
p1buffsb=usinfo.buffinfo(uid,"sb")'buff sb
p1buffgd=usinfo.buffinfo(uid,"gd")'buff gd
p1buffbj=usinfo.buffinfo(uid,"bj")'buff bj

p1ap=p1ap+p1zbap
p1ap=p1ap+int((p1ap)*(p1buffap/100))
p1ap=p1ap+int(((wqconap+yfconap+xzconap+tkconap+fqconap)*0.01)*p1ap)

'Call echo(p1name&"攻击:"&p1ap,1)
p1dp=p1dp+p1zbdp
p1dp=p1dp+int((p1dp)*(p1buffdp/100))
p1dp=p1dp+int(((wqcondp+yfcondp+xzcondp+tkcondp+fqcondp)*0.01)*p1dp)

'Call echo(p1name&"防御:"&p1dp,1)
p1hp=p1hp+p1zbhp
p1hp=p1hp+int((p1hp)*(p1buffhp/100))
p1hp=p1hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p1hp)
p1hhp=p1hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p1hp)
If p1chp<>"" Then
p1hp=p1chp
Else
fmsg=fmsg&"["&p1name&"]HP:"&p1hp&" "
End If
'Call echo(p1name&"生命:"&p1hp,1)
p1sb=p1sb+p1zbsb
p1sb=p1sb+p1buffsb
p1sb=p1sb+wqconsb+yfconsb+xzconsb+tkconsb+fqconsb
If p1sb>60 Then p1sb=60

'Call echo(p1name&"闪避:"&p1sb,1)
p1gd=p1gd+p1zbgd
p1gd=p1gd+p1buffgd
p1gd=p1gd+wqcongd+yfcongd+xzcongd+tkcongd+fqcongd
If p1gd>60 Then p1gd=60

'Call echo(p1name&"格挡:"&p1gd,1)
p1bj=p1bj+p1zbbj
p1bj=p1bj+p1buffbj
p1bj=p1bj+wqconbj+yfconbj+xzconbj+tkconbj+fqconbj
If p1bj>60 Then p1bj=60
'fmsg=fmsg&"p1资料获取完毕"
'Call echo(p1name&"暴击:"&p1bj,1)
Set usinfo=Nothing

'获取本人属性
Set usinfo=New userinfo
p2name=usinfo.uinfo(pid,"nickname")'玩家名字
p2lvl=usinfo.uinfo(pid,"lvl")'等级
p2hp=usinfo.uinfo(pid,"hp")'总生命值
p2sb=usinfo.uinfo(pid,"sb")'闪避率
p2ap=usinfo.uinfo(pid,"ap")'攻击力
p2dp=usinfo.uinfo(pid,"dp")'防御力
p2gd=usinfo.uinfo(pid,"gd")'格挡率
p2bj=usinfo.uinfo(pid,"bj")'暴击率
p2kill=usinfo.uinfo(pid,"kill")'获取击杀数
If p2kill>=30 Then p2kill=30
wq=usinfo.uinfo(pid,"wq")'武器
wqconlvl=getconsozb(wq,"lvl",pid)'强化等级
If wqconlvl>0 Then
wqconap=getconsozb(wq,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
wqcondp=getconsozb(wq,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
wqconhp=getconsozb(wq,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
wqconsb=getconsozb(wq,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
wqcongd=getconsozb(wq,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
wqconbj=getconsozb(wq,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
wqap=usinfo.zbinfo("wq",wq,"ap",pid)'武器攻击力
wqdp=usinfo.zbinfo("wq",wq,"dp",pid)'武器防御力
wqhp=usinfo.zbinfo("wq",wq,"hp",pid)'武器生命值
'fmsg=fmsg&"武器"&pid&"增加生命力="&wqhp&"<br/>"
wqsb=usinfo.zbinfo("wq",wq,"sb",pid)'武器闪避
wqgd=usinfo.zbinfo("wq",wq,"gd",pid)'武器格挡
wqbj=usinfo.zbinfo("wq",wq,"bj",pid)'武器暴击
'If wq=0 Then wq="无"
yf=usinfo.uinfo(pid,"yf")'衣服
yfconlvl=getconsozb(yf,"lvl",pid)'强化等级
If yfconlvl>0 Then
yfconap=getconsozb(yf,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
yfcondp=getconsozb(yf,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
yfconhp=getconsozb(yf,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
yfconsb=getconsozb(yf,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
yfcongd=getconsozb(yf,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
yfconbj=getconsozb(yf,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
yfap=usinfo.zbinfo("yf",yf,"ap",pid)'衣服攻击力
yfdp=usinfo.zbinfo("yf",yf,"dp",pid)'衣服防御力
yfhp=usinfo.zbinfo("yf",yf,"hp",pid)'衣服生命值
yfsb=usinfo.zbinfo("yf",yf,"sb",pid)'衣服闪避
yfgd=usinfo.zbinfo("yf",yf,"gd",pid)'衣服格挡
yfbj=usinfo.zbinfo("yf",yf,"bj",pid)'衣服暴击
'If yf=0 Then yf="无"
xz=usinfo.uinfo(pid,"xz")'鞋子
xzconlvl=getconsozb(xz,"lvl",pid)'强化等级
If xzconlvl>0 Then
xzconap=getconsozb(xz,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
xzcondp=getconsozb(xz,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
xzconhp=getconsozb(xz,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
xzconsb=getconsozb(xz,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
xzcongd=getconsozb(xz,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
xzconbj=getconsozb(xz,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
xzap=usinfo.zbinfo("xz",xz,"ap",pid)'鞋子攻击力
xzdp=usinfo.zbinfo("xz",xz,"dp",pid)'鞋子防御力
xzhp=usinfo.zbinfo("xz",xz,"hp",pid)'鞋子生命值
xzsb=usinfo.zbinfo("xz",xz,"sb",pid)'鞋子闪避
xzgd=usinfo.zbinfo("xz",xz,"gd",pid)'鞋子格挡
xzbj=usinfo.zbinfo("xz",xz,"bj",pid)'鞋子暴击
'If xz=0 Then xz="无"
tk=usinfo.uinfo(pid,"tk")'头盔
tkconlvl=getconsozb(tk,"lvl",pid)'强化等级
If tkconlvl>0 Then
tkconap=getconsozb(tk,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
tkcondp=getconsozb(tk,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
tkconhp=getconsozb(tk,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
tkconsb=getconsozb(tk,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
tkcongd=getconsozb(tk,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
tkconbj=getconsozb(tk,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
tkap=usinfo.zbinfo("tk",tk,"ap",pid)'头盔攻击力
tkdp=usinfo.zbinfo("tk",tk,"dp",pid)'头盔防御力
tkhp=usinfo.zbinfo("tk",tk,"hp",pid)'头盔生命值
tksb=usinfo.zbinfo("tk",tk,"sb",pid)'头盔闪避
tkgd=usinfo.zbinfo("tk",tk,"gd",pid)'头盔格挡
tkbj=usinfo.zbinfo("tk",tk,"bj",pid)'头盔暴击
'If tk=0 Then tk="无"
fq=usinfo.uinfo(pid,"fq")'法器
fqconlvl=getconsozb(fq,"lvl",pid)'强化等级
If fqconlvl>0 Then
fqconap=getconsozb(fq,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
fqcondp=getconsozb(fq,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
fqconhp=getconsozb(fq,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
fqconsb=getconsozb(fq,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
fqcongd=getconsozb(fq,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
fqconbj=getconsozb(fq,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&fqconbj,1)
End If
fqap=usinfo.zbinfo("fq",fq,"ap",pid)'法器攻击力
fqdp=usinfo.zbinfo("fq",fq,"dp",pid)'法器防御力
fqhp=usinfo.zbinfo("fq",fq,"hp",pid)'法器生命值
fqsb=usinfo.zbinfo("fq",fq,"sb",pid)'法器闪避
fqgd=usinfo.zbinfo("fq",fq,"gd",pid)'法器格挡
fqbj=usinfo.zbinfo("fq",fq,"bj",pid)'法器暴击
'If fq=0 Then fq="无"
p2zbap=wqap+yfap+xzap+tkap+fqap
p2zbdp=wqdp+yfdp+xzap+tkdp+fqdp
p2zbhp=wqhp+yfhp+xzhp+tkhp+fqhp
p2zbsb=wqsb+yfsb+xzsb+tksb+fqsb
p2zbgd=wqgd+yfgd+xzgd+tkgd+fqgd
p2zbbj=wqbj+yfbj+xzbj+tkbj+fqbj

p2buffap=usinfo.buffinfo(pid,"ap")'buff ap
p2buffdp=usinfo.buffinfo(pid,"dp")'buff dp
p2buffhp=usinfo.buffinfo(pid,"hp")'buff hp
p2buffsb=usinfo.buffinfo(pid,"sb")'buff sb
p2buffgd=usinfo.buffinfo(pid,"gd")'buff gd
p2buffbj=usinfo.buffinfo(pid,"bj")'buff bj

p2ap=p2ap+p2zbap
p2ap=p2ap+int((p2ap)*(p2buffap/100))
p2ap=p2ap+int(((wqconap+yfconap+xzconap+tkconap+fqconap)*0.01)*p2ap)

'Call echo(p1name&"攻击:"&p1ap,1)
p2dp=p2dp+p2zbdp
p2dp=p2dp+int((p2dp)*(p2buffdp/100))
p2dp=p2dp+int(((wqcondp+yfcondp+xzcondp+tkcondp+fqcondp)*0.01)*p2dp)

'Call echo(p1name&"防御:"&p1dp,1)
p2hp=p2hp+p2zbhp
p2hp=p2hp+int((p2hp)*(p2buffhp/100))
p2hp=p2hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p2hp)
p2hhp=p2hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p2hp)
If p2chp<>"" Then
p2hp=p2chp
Else
fmsg=fmsg&"["&p2name&"]HP:"&p2hp&" "
End If
'Call echo(p1name&"生命:"&p1hp,1)
p2sb=p2sb+p2zbsb
p2sb=p2sb+p2buffsb
p2sb=p2sb+wqconsb+yfconsb+xzconsb+tkconsb+fqconsb
If p2sb>60 Then p2sb=60

'Call echo(p1name&"闪避:"&p1sb,1)
p2gd=p2gd+p2zbgd
p2gd=p2gd+p2buffgd
p2gd=p2gd+wqcongd+yfcongd+xzcongd+tkcongd+fqcongd
If p2gd>60 Then p2gd=60

'Call echo(p1name&"格挡:"&p1gd,1)
p2bj=p2bj+p2zbbj
p2bj=p2bj+p2buffbj
p2bj=p2bj+wqconbj+yfconbj+xzconbj+tkconbj+fqconbj
If p2bj>60 Then p2bj=60
'fmsg=fmsg&"p2资料获取完毕"
'Call echo(p1name&"暴击:"&p1bj,1)
Set usinfo=Nothing

'进入圆桌事件
Randomize '放置一个随机种子
'fmsg=fmsg&"随机数:"&rnd,1)
dim max,min
max=100
min=0.1
mode=Int((max-min+1)*Rnd+min)
mode1=Int((10-20+1)*Rnd+20)
'p2攻击P1
'格挡 暴击 闪避 普攻
if mode<=p1gd Then'格挡
fmsg=fmsg&"<div style=""background:#FFFAF0; border-top:1px solid #ccc; "">"
If lianji="p2" Then
If p2kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p2kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p2ap/2)-(p1dp/4)-mode1)/2)*(p2kill/100))+p2kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=int(((p2ap/2)-(p1dp/4)-mode1)/2)+int(int(((p2ap/2)-(p1dp/4)-mode1)/2)*(p2kill/100))+p2kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font color=red>格挡</font>]"&p2name&"发起攻击,"&p1name&"死死地挡了下来,受到"&mhit&"伤害"
fmsg=fmsg&"</div>"
'怒气
p1nq=p1nq+1
p2nq=p2nq+1
Call echo("<!--"&p1name&"怒气"&p1nq&"-->",0)
ElseIf mode>p1gd And mode<=(p1gd+30) Then '技能
'fmsg=fmsg&"<br/>"&p2name&"触发技能 进入技能攻击事件<br/>"
mhit=p2skillp1(pid,uid,p2ap,p1dp,mode1,p2kill,p2nq,p1nq,p2hp,p1hp,p2name,p1name,lianji,p2hhp)'p2攻击p1 参数:p2id p1id p2攻击 p1防御 随机修正值 p2暴怒 p2hp p1hp p2怒气 p1怒气 p2总生命
ElseIf mode<=((p1gd + p2bj)+30) And mode<=((p1gd + p2bj + p1sb)) Then'闪避
fmsg=fmsg&"<div style=""background:#FFFAF0; border-top:1px solid #ccc; "">"
If lianji="p2" Then
If p2kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p2kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:对方闪避-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=0
p1nq=p1nq+1
fmsg=fmsg&"[<font color=red>闪避</font>]"&p2name&"发起攻击,但是"&p1name&"轻轻一闪,躲过了"
fmsg=fmsg&"</div>"
ElseIf mode>(p1gd+30) And mode<=(p1gd+30+p2bj) Then'暴击
fmsg=fmsg&"<div style=""background:#FFFAF0; border-top:1px solid #ccc; "">"
If lianji="p2" Then
If p2kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p2kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p2ap/2)-(p1dp/4)-mode1)*2)*(p2kill/100))+p2kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=int(((p2ap/2)-(p1dp/4)-mode1)*2)+int(int(((p2ap/2)-(p1dp/4)-mode1)*2)*(p2kill/100))+p2kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font color=red>暴击</font>]"&p2name&"抓住破绽,一击打中要害,"&p1name&"受到"&mhit&"伤害"
fmsg=fmsg&"</div>"
'怒气
p1nq=p1nq+2
Call echo("<!--"&p1name&"怒气"&p1nq&"-->",0)
Else'普攻
fmsg=fmsg&"<div style=""background:#FFFAF0; border-top:1px solid #ccc; "">"
If lianji="p2" Then
If p2kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p2kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p2ap/2)-(p1dp/4)-mode1))*(p2kill/100))+p2kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=int(((p2ap/2)-(p1dp/4)-mode1))+int(int(((p2ap/2)-(p1dp/4)-mode1))*(p2kill/100))+p2kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font>普攻</font>]"&p2name&"发起攻击,"&p1name&"受到"&mhit&"伤害"
fmsg=fmsg&"</div>"
'怒气
p1nq=p1nq+1
Call echo("<!--"&p1name&"怒气"&p1nq&"-->",0)
End If
p1hp=p1hp-mhit
If p1hp<=0 Then p1hp=0
'fmsg=fmsg&"--["&p1name&"]HP"&p1hp
'fmsg=fmsg&"--"&p1name&"怒气"&p1nq
'Call echo("<!--"&p2name&"血量剩余:"&p2hp&"-->",0)
'Call echo("<!--"&p1name&"血量剩余:"&p1hp&"-->",0)
If p1hp>0 Then
'Call p1top2(uid,pid,p1hp,p2hp)
Call pk(uid,pid,p1hp,p2hp,"p2",fmsg,p1nq,p2nq)
ElseIf p1hp=0 And p2hp>0 Then
fmsg=fmsg&"<div style=""background:#FFFFCC; border-top:1px solid #ccc; "">"
fmsg=fmsg&"["&p1name&"]HP:"&p1hp
fmsg=fmsg&"["&p2name&"]HP:"&p2hp
fmsg=fmsg&"</div>"
Call win2los(uid,pid,pid,p1name,p2name,p1lvl,p2lvl,fmsg)
End If
'Call upptom(mhit,mochp)'更新怪物血量
End Sub

Sub p1top2(uid,pid,p1chp,p2chp,lianji,fmsg,p1nq,p2nq)'uid=p1 pid=p2
'初始化
'获取对手属性
Set usinfo=New userinfo
p1name=usinfo.uinfo(uid,"nickname")'玩家名字
p1lvl=usinfo.uinfo(uid,"lvl")'等级
p1hp=usinfo.uinfo(uid,"hp")'总生命值
p1sb=usinfo.uinfo(uid,"sb")'闪避率
p1ap=usinfo.uinfo(uid,"ap")'攻击力
p1dp=usinfo.uinfo(uid,"dp")'防御力
p1gd=usinfo.uinfo(uid,"gd")'格挡率
p1bj=usinfo.uinfo(uid,"bj")'暴击率
p1kill=usinfo.uinfo(uid,"kill")'获取击杀数
If p1kill>=30 Then p1kill=30
wq=usinfo.uinfo(uid,"wq")'武器
wqconlvl=getconsozb(wq,"lvl",uid)'强化等级
If wqconlvl>0 Then
wqconap=getconsozb(wq,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
wqcondp=getconsozb(wq,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
wqconhp=getconsozb(wq,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
wqconsb=getconsozb(wq,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
wqcongd=getconsozb(wq,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
wqconbj=getconsozb(wq,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
wqap=usinfo.zbinfo("wq",wq,"ap",uid)'武器攻击力
wqdp=usinfo.zbinfo("wq",wq,"dp",uid)'武器防御力
wqhp=usinfo.zbinfo("wq",wq,"hp",uid)'武器生命值
'fmsg=fmsg&"武器"&uid&"增加生命力="&wqhp&"<br/>"
wqsb=usinfo.zbinfo("wq",wq,"sb",uid)'武器闪避
wqgd=usinfo.zbinfo("wq",wq,"gd",uid)'武器格挡
wqbj=usinfo.zbinfo("wq",wq,"bj",uid)'武器暴击
'If wq=0 Then wq="无"
yf=usinfo.uinfo(uid,"yf")'衣服
yfconlvl=getconsozb(yf,"lvl",uid)'强化等级
If yfconlvl>0 Then
yfconap=getconsozb(yf,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
yfcondp=getconsozb(yf,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
yfconhp=getconsozb(yf,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
yfconsb=getconsozb(yf,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
yfcongd=getconsozb(yf,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
yfconbj=getconsozb(yf,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
yfap=usinfo.zbinfo("yf",yf,"ap",uid)'衣服攻击力
yfdp=usinfo.zbinfo("yf",yf,"dp",uid)'衣服防御力
yfhp=usinfo.zbinfo("yf",yf,"hp",uid)'衣服生命值
yfsb=usinfo.zbinfo("yf",yf,"sb",uid)'衣服闪避
yfgd=usinfo.zbinfo("yf",yf,"gd",uid)'衣服格挡
yfbj=usinfo.zbinfo("yf",yf,"bj",uid)'衣服暴击
'If yf=0 Then yf="无"
xz=usinfo.uinfo(uid,"xz")'鞋子
xzconlvl=getconsozb(xz,"lvl",uid)'强化等级
If xzconlvl>0 Then
xzconap=getconsozb(xz,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
xzcondp=getconsozb(xz,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
xzconhp=getconsozb(xz,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
xzconsb=getconsozb(xz,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
xzcongd=getconsozb(xz,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
xzconbj=getconsozb(xz,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
xzap=usinfo.zbinfo("xz",xz,"ap",uid)'鞋子攻击力
xzdp=usinfo.zbinfo("xz",xz,"dp",uid)'鞋子防御力
xzhp=usinfo.zbinfo("xz",xz,"hp",uid)'鞋子生命值
xzsb=usinfo.zbinfo("xz",xz,"sb",uid)'鞋子闪避
xzgd=usinfo.zbinfo("xz",xz,"gd",uid)'鞋子格挡
xzbj=usinfo.zbinfo("xz",xz,"bj",uid)'鞋子暴击
'If xz=0 Then xz="无"
tk=usinfo.uinfo(uid,"tk")'头盔
tkconlvl=getconsozb(tk,"lvl",uid)'强化等级
If tkconlvl>0 Then
tkconap=getconsozb(tk,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
tkcondp=getconsozb(tk,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
tkconhp=getconsozb(tk,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
tkconsb=getconsozb(tk,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
tkcongd=getconsozb(tk,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
tkconbj=getconsozb(tk,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
tkap=usinfo.zbinfo("tk",tk,"ap",uid)'头盔攻击力
tkdp=usinfo.zbinfo("tk",tk,"dp",uid)'头盔防御力
tkhp=usinfo.zbinfo("tk",tk,"hp",uid)'头盔生命值
tksb=usinfo.zbinfo("tk",tk,"sb",uid)'头盔闪避
tkgd=usinfo.zbinfo("tk",tk,"gd",uid)'头盔格挡
tkbj=usinfo.zbinfo("tk",tk,"bj",uid)'头盔暴击
'If tk=0 Then tk="无"
fq=usinfo.uinfo(uid,"fq")'法器
fqconlvl=getconsozb(fq,"lvl",uid)'强化等级
If fqconlvl>0 Then
fqconap=getconsozb(fq,"ap",uid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
fqcondp=getconsozb(fq,"dp",uid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
fqconhp=getconsozb(fq,"hp",uid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
fqconsb=getconsozb(fq,"sb",uid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
fqcongd=getconsozb(fq,"gd",uid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
fqconbj=getconsozb(fq,"bj",uid)'武器强化暴击
'Call echo("强化攻击力:"&fqconbj,1)
End If
fqap=usinfo.zbinfo("fq",fq,"ap",uid)'法器攻击力
fqdp=usinfo.zbinfo("fq",fq,"dp",uid)'法器防御力
fqhp=usinfo.zbinfo("fq",fq,"hp",uid)'法器生命值
fqsb=usinfo.zbinfo("fq",fq,"sb",uid)'法器闪避
fqgd=usinfo.zbinfo("fq",fq,"gd",uid)'法器格挡
fqbj=usinfo.zbinfo("fq",fq,"bj",uid)'法器暴击
'If fq=0 Then fq="无"
p1zbap=wqap+yfap+xzap+tkap+fqap
p1zbdp=wqdp+yfdp+xzap+tkdp+fqdp
p1zbhp=wqhp+yfhp+xzhp+tkhp+fqhp
p1zbsb=wqsb+yfsb+xzsb+tksb+fqsb
p1zbgd=wqgd+yfgd+xzgd+tkgd+fqgd
p1zbbj=wqbj+yfbj+xzbj+tkbj+fqbj

p1buffap=usinfo.buffinfo(uid,"ap")'buff ap
p1buffdp=usinfo.buffinfo(uid,"dp")'buff dp
p1buffhp=usinfo.buffinfo(uid,"hp")'buff hp
p1buffsb=usinfo.buffinfo(uid,"sb")'buff sb
p1buffgd=usinfo.buffinfo(uid,"gd")'buff gd
p1buffbj=usinfo.buffinfo(uid,"bj")'buff bj

p1ap=p1ap+p1zbap
p1ap=p1ap+int((p1ap)*(p1buffap/100))
p1ap=p1ap+int(((wqconap+yfconap+xzconap+tkconap+fqconap)*0.01)*p1ap)

'Call echo(p1name&"攻击:"&p1ap,1)
p1dp=p1dp+p1zbdp
p1dp=p1dp+int((p1dp)*(p1buffdp/100))
p1dp=p1dp+int(((wqcondp+yfcondp+xzcondp+tkcondp+fqcondp)*0.01)*p1dp)

'Call echo(p1name&"防御:"&p1dp,1)
p1hp=p1hp+p1zbhp
p1hp=p1hp+int((p1hp)*(p1buffhp/100))
p1hp=p1hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p1hp)
p1hhp=p1hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p1hp)
If p1chp<>"" Then
p1hp=p1chp
Else
fmsg=fmsg&"["&p1name&"]HP:"&p1hp&" "
End If
'Call echo(p1name&"生命:"&p1hp,1)
p1sb=p1sb+p1zbsb
p1sb=p1sb+p1buffsb
p1sb=p1sb+wqconsb+yfconsb+xzconsb+tkconsb+fqconsb
If p1sb>60 Then p1sb=60

'Call echo(p1name&"闪避:"&p1sb,1)
p1gd=p1gd+p1zbgd
p1gd=p1gd+p1buffgd
p1gd=p1gd+wqcongd+yfcongd+xzcongd+tkcongd+fqcongd
If p1gd>60 Then p1gd=60

'Call echo(p1name&"格挡:"&p1gd,1)
p1bj=p1bj+p1zbbj
p1bj=p1bj+p1buffbj
p1bj=p1bj+wqconbj+yfconbj+xzconbj+tkconbj+fqconbj
If p1bj>60 Then p1bj=60
'fmsg=fmsg&"p1资料获取完毕"
'Call echo(p1name&"暴击:"&p1bj,1)
Set usinfo=Nothing

'获取本人属性
Set usinfo=New userinfo
p2name=usinfo.uinfo(pid,"nickname")'玩家名字
p2lvl=usinfo.uinfo(pid,"lvl")'等级
p2hp=usinfo.uinfo(pid,"hp")'总生命值
p2sb=usinfo.uinfo(pid,"sb")'闪避率
p2ap=usinfo.uinfo(pid,"ap")'攻击力
p2dp=usinfo.uinfo(pid,"dp")'防御力
p2gd=usinfo.uinfo(pid,"gd")'格挡率
p2bj=usinfo.uinfo(pid,"bj")'暴击率
p2kill=usinfo.uinfo(pid,"kill")'获取击杀数
If p2kill>=30 Then p2kill=30
wq=usinfo.uinfo(pid,"wq")'武器
wqconlvl=getconsozb(wq,"lvl",pid)'强化等级
If wqconlvl>0 Then
wqconap=getconsozb(wq,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
wqcondp=getconsozb(wq,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
wqconhp=getconsozb(wq,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
wqconsb=getconsozb(wq,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
wqcongd=getconsozb(wq,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
wqconbj=getconsozb(wq,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
wqap=usinfo.zbinfo("wq",wq,"ap",pid)'武器攻击力
wqdp=usinfo.zbinfo("wq",wq,"dp",pid)'武器防御力
wqhp=usinfo.zbinfo("wq",wq,"hp",pid)'武器生命值
'fmsg=fmsg&"武器"&pid&"增加生命力="&wqhp&"<br/>"
wqsb=usinfo.zbinfo("wq",wq,"sb",pid)'武器闪避
wqgd=usinfo.zbinfo("wq",wq,"gd",pid)'武器格挡
wqbj=usinfo.zbinfo("wq",wq,"bj",pid)'武器暴击
'If wq=0 Then wq="无"
yf=usinfo.uinfo(pid,"yf")'衣服
yfconlvl=getconsozb(yf,"lvl",pid)'强化等级
If yfconlvl>0 Then
yfconap=getconsozb(yf,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
yfcondp=getconsozb(yf,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
yfconhp=getconsozb(yf,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
yfconsb=getconsozb(yf,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
yfcongd=getconsozb(yf,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
yfconbj=getconsozb(yf,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
yfap=usinfo.zbinfo("yf",yf,"ap",pid)'衣服攻击力
yfdp=usinfo.zbinfo("yf",yf,"dp",pid)'衣服防御力
yfhp=usinfo.zbinfo("yf",yf,"hp",pid)'衣服生命值
yfsb=usinfo.zbinfo("yf",yf,"sb",pid)'衣服闪避
yfgd=usinfo.zbinfo("yf",yf,"gd",pid)'衣服格挡
yfbj=usinfo.zbinfo("yf",yf,"bj",pid)'衣服暴击
'If yf=0 Then yf="无"
xz=usinfo.uinfo(pid,"xz")'鞋子
xzconlvl=getconsozb(xz,"lvl",pid)'强化等级
If xzconlvl>0 Then
xzconap=getconsozb(xz,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
xzcondp=getconsozb(xz,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
xzconhp=getconsozb(xz,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
xzconsb=getconsozb(xz,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
xzcongd=getconsozb(xz,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
xzconbj=getconsozb(xz,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
xzap=usinfo.zbinfo("xz",xz,"ap",pid)'鞋子攻击力
xzdp=usinfo.zbinfo("xz",xz,"dp",pid)'鞋子防御力
xzhp=usinfo.zbinfo("xz",xz,"hp",pid)'鞋子生命值
xzsb=usinfo.zbinfo("xz",xz,"sb",pid)'鞋子闪避
xzgd=usinfo.zbinfo("xz",xz,"gd",pid)'鞋子格挡
xzbj=usinfo.zbinfo("xz",xz,"bj",pid)'鞋子暴击
'If xz=0 Then xz="无"
tk=usinfo.uinfo(pid,"tk")'头盔
tkconlvl=getconsozb(tk,"lvl",pid)'强化等级
If tkconlvl>0 Then
tkconap=getconsozb(tk,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
tkcondp=getconsozb(tk,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
tkconhp=getconsozb(tk,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
tkconsb=getconsozb(tk,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
tkcongd=getconsozb(tk,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
tkconbj=getconsozb(tk,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&wqbj,1)
End If
tkap=usinfo.zbinfo("tk",tk,"ap",pid)'头盔攻击力
tkdp=usinfo.zbinfo("tk",tk,"dp",pid)'头盔防御力
tkhp=usinfo.zbinfo("tk",tk,"hp",pid)'头盔生命值
tksb=usinfo.zbinfo("tk",tk,"sb",pid)'头盔闪避
tkgd=usinfo.zbinfo("tk",tk,"gd",pid)'头盔格挡
tkbj=usinfo.zbinfo("tk",tk,"bj",pid)'头盔暴击
'If tk=0 Then tk="无"
fq=usinfo.uinfo(pid,"fq")'法器
fqconlvl=getconsozb(fq,"lvl",pid)'强化等级
If fqconlvl>0 Then
fqconap=getconsozb(fq,"ap",pid)'武器强化攻击
'Call echo("强化攻击力:"&wqap,1)
fqcondp=getconsozb(fq,"dp",pid)'武器强化防御
'Call echo("强化攻击力:"&wqdp,1)
fqconhp=getconsozb(fq,"hp",pid)'武器强化生命
'Call echo("强化攻击力:"&wqhp,1)
fqconsb=getconsozb(fq,"sb",pid)'武器强化闪避
'Call echo("强化攻击力:"&wqsb,1)
fqcongd=getconsozb(fq,"gd",pid)'武器强化格挡
'Call echo("强化攻击力:"&wqgd,1)
fqconbj=getconsozb(fq,"bj",pid)'武器强化暴击
'Call echo("强化攻击力:"&fqconbj,1)
End If
fqap=usinfo.zbinfo("fq",fq,"ap",pid)'法器攻击力
fqdp=usinfo.zbinfo("fq",fq,"dp",pid)'法器防御力
fqhp=usinfo.zbinfo("fq",fq,"hp",pid)'法器生命值
fqsb=usinfo.zbinfo("fq",fq,"sb",pid)'法器闪避
fqgd=usinfo.zbinfo("fq",fq,"gd",pid)'法器格挡
fqbj=usinfo.zbinfo("fq",fq,"bj",pid)'法器暴击
'If fq=0 Then fq="无"
p2zbap=wqap+yfap+xzap+tkap+fqap
p2zbdp=wqdp+yfdp+xzap+tkdp+fqdp
p2zbhp=wqhp+yfhp+xzhp+tkhp+fqhp
p2zbsb=wqsb+yfsb+xzsb+tksb+fqsb
p2zbgd=wqgd+yfgd+xzgd+tkgd+fqgd
p2zbbj=wqbj+yfbj+xzbj+tkbj+fqbj

p2buffap=usinfo.buffinfo(pid,"ap")'buff ap
p2buffdp=usinfo.buffinfo(pid,"dp")'buff dp
p2buffhp=usinfo.buffinfo(pid,"hp")'buff hp
p2buffsb=usinfo.buffinfo(pid,"sb")'buff sb
p2buffgd=usinfo.buffinfo(pid,"gd")'buff gd
p2buffbj=usinfo.buffinfo(pid,"bj")'buff bj

p2ap=p2ap+p2zbap
p2ap=p2ap+int((p2ap)*(p2buffap/100))
p2ap=p2ap+int(((wqconap+yfconap+xzconap+tkconap+fqconap)*0.01)*p2ap)

'Call echo(p1name&"攻击:"&p1ap,1)
p2dp=p2dp+p2zbdp
p2dp=p2dp+int((p2dp)*(p2buffdp/100))
p2dp=p2dp+int(((wqcondp+yfcondp+xzcondp+tkcondp+fqcondp)*0.01)*p2dp)

'Call echo(p1name&"防御:"&p1dp,1)
p2hp=p2hp+p2zbhp
p2hp=p2hp+int((p2hp)*(p2buffhp/100))
p2hp=p2hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p2hp)
p2hhp=p2hp+int(((wqconhp+yfconhp+xzconhp+tkconhp+fqconhp)*0.01)*p2hp)

If p2chp<>"" Then
p2hp=p2chp
Else
fmsg=fmsg&"["&p2name&"]HP:"&p2hp&" "
End If
'Call echo(p1name&"生命:"&p1hp,1)
p2sb=p2sb+p2zbsb
p2sb=p2sb+p2buffsb
p2sb=p2sb+wqconsb+yfconsb+xzconsb+tkconsb+fqconsb
If p1sb>60 Then p2sb=60

'Call echo(p1name&"闪避:"&p1sb,1)
p2gd=p2gd+p2zbgd
p2gd=p2gd+p2buffgd
p2gd=p2gd+wqcongd+yfcongd+xzcongd+tkcongd+fqcongd
If p2gd>60 Then p2gd=60

'Call echo(p1name&"格挡:"&p1gd,1)
p2bj=p2bj+p2zbbj
p2bj=p2bj+p2buffbj
p2bj=p2bj+wqconbj+yfconbj+xzconbj+tkconbj+fqconbj
If p2bj>60 Then p2bj=60
'fmsg=fmsg&"p2资料获取完毕"
'Call echo(p1name&"暴击:"&p1bj,1)
Set usinfo=Nothing

'进入圆桌事件
Randomize '放置一个随机种子
'fmsg=fmsg&"随机数:"&rnd,1)
dim max,min
max=100
min=0.1
mode=Int((max-min+1)*Rnd+min)
mode1=Int((10-20+1)*Rnd+20)
'p1攻击P2
'格挡 暴击 闪避 普攻
if mode<=p2gd Then'格挡
fmsg=fmsg&"<div style=""background:; border-top:1px solid #ccc; "">"
If lianji="p1" Then
If p1kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p1kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p1ap/2)-(p2dp/4)-mode1)/2)*(p1kill/100))+p1kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=int(((p1ap/2)-(p2dp/4)-mode1)/2)+int(int(((p1ap/2)-(p2dp/4)-mode1)/2)*(p1kill/100))+p1kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font color=red>格挡</font>]"&p1name&"发起攻击,"&p2name&"死死地挡了下来,受到"&mhit&"伤害"
fmsg=fmsg&"</div>"
'怒气
p2nq=p2nq+1
p1nq=p1nq+1
Call echo("<!--"&p1name&"怒气"&p2nq&"-->",0)
ElseIf mode>p2gd And mode<=(p2gd +30) Then '技能
'fmsg=fmsg&"<br/>"&p1name&"触发技能 进入技能攻击事件<br/>"
mhit=p1skillp2(uid,pid,p1ap,p2dp,mode1,p1kill,p1nq,p2nq,p1hp,p2hp,p1name,p2name,lianji,p1hhp)'p1攻击p2 参数:p1id p2id p1攻击 p2防御 随机修正值 p1暴怒 p1怒气 p2怒气 连击 p1昵称 p2昵称 p1总生命
ElseIf mode>((p2gd + p1bj)+30) And mode<=((p2gd + p1bj + p2sb)) Then'闪避
fmsg=fmsg&"<div style=""background:; border-top:1px solid #ccc; "">"
If lianji="p1" Then
If p1kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p1kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:对方闪避-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=0
p1nq=p1nq+1
fmsg=fmsg&"[<font color=red>闪避</font>]"&p1name&"发起攻击,但是"&p2name&"轻轻一闪,躲过了"
fmsg=fmsg&"</div>"
ElseIf mode>(p2gd +30) And mode<=(p2gd+30+ p1bj) Then'暴击
fmsg=fmsg&"<div style=""background:; border-top:1px solid #ccc; "">"
If lianji="p1" Then
If p1kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p1kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p1ap/2)-(p2dp/4)-mode1)*2)*(p1kill/100))+p1kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=int(((p1ap/2)-(p2dp/4)-mode1)*2)+int(int(((p1ap/2)-(p2dp/4)-mode1)*2)*(p1kill/100))+p1kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font color=red>暴击</font>]"&p1name&"抓住破绽,一击打中要害,"&p2name&"受到"&mhit&"伤害"
fmsg=fmsg&"</div>"
'怒气
p2nq=p2nq+2
Call echo("<!--"&p1name&"怒气"&p2nq&"-->",0)
Else'普攻
fmsg=fmsg&"<div style=""background:; border-top:1px solid #ccc; "">"
If lianji="p1" Then
If p1kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p1kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
mhit=int(((p1ap/2)-(p2dp/4)-mode1))+int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font>普攻</font>]"&p1name&"发起攻击,"&p2name&"受到"&mhit&"伤害"
fmsg=fmsg&"</div>"
'怒气
p2nq=p2nq+1
Call echo("<!--"&p1name&"怒气"&p2nq&"-->",0)
End If
p2hp=p2hp-mhit
If p2hp<=0 Then p2hp=0
'fmsg=fmsg&"--["&p2name&"]HP"&p2hp
'fmsg=fmsg&"--"&p2name&"怒气"&p2nq
'Call echo("<!--"&p2name&"血量剩余:"&p2hp&"-->",0)
'Call echo("<!--"&p1name&"血量剩余:"&p1hp&"-->",0)
If p2hp>0 Then
'Call p2top1(uid,pid,p1hp,p2hp)
Call pk(uid,pid,p1hp,p2hp,"p1",fmsg,p1nq,p2nq)
ElseIf p2hp=0 And p1hp>0 Then
fmsg=fmsg&"<div style=""background:; border-top:1px solid #ccc; "">"
fmsg=fmsg&"["&p1name&"]HP:"&p1hp
fmsg=fmsg&"["&p2name&"]HP:"&p2hp
fmsg=fmsg&"</div>"
Call win2los(uid,pid,uid,p1name,p2name,p1lvl,p2lvl,fmsg)
End If
'Call upptom(mhit,mochp)'更新怪物血量
End Sub

Sub win2los(uid,pid,wid,p1name,p2name,p1lvl,p2lvl,fmsg)
Call echo(fmsg,0)
t=int(request.querystring("t"))
Set usinfo=New userinfo
userid=usinfo.usinfo(gsid,"userid")'玩家自己的ID
Set usinfo=Nothing
sql="select * from pklist where uid="&uid&" and pid="&pid&" and pktime='"&Date()&"'"
rs.open sql,conn,1,3
sql1="delete from pklist where pktime<>'"&Date()&"'"
conn.execute sql1
If Not rs.eof Then
'存在记录
Call echo("<div style=""background:#FFFFCC; border-top:1px solid #ccc; "">",0)
If userid=wid And pid=wid Then
Call adddongtai(userid,"我挑战<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>成功,<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>被打败  [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call adddongtai(uid,"<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>挑战我成功,<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>胜利  [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call echo("恭喜你赢得胜利,继续加油挑战吧<!--1-->",0)
Else
Call adddongtai(userid,"我挑战<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>失败,<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>胜利  [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call adddongtai(uid,"<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>挑战我失败,<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>被我打败  [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call echo("很不幸你已经战败,要继续努力哟<!--1-->",0)
End If
Call echo("今天已经挑战过"&p1name&",不记录战绩",0)
Call echo("</div>",0)
Else
pkra=(p1lvl-p2lvl)'被挑战者等级高于挑战者
'Call echo("挑战者等级:"&p2lvl,1)
'Call echo("被挑战者等级:"&p1lvl,1)
If pkra<=0 Then '如果挑战者等级高
pkra=1
Else
pkra=pkra*2
End If
'不存在记录
If Not tdpkli(uid,pid) Then
ujb=getinfo(uid,"jb")'获取对方金币
mjb=getinfo(pid,"jb")'获取我的金币
If ujb>=50 Then
ujb=ujb-50
mjb=mjb+50
If ujb>0 Then
Call echo("你从"&p1name&"身上掠夺了50个金币",1)
Call chinfo(uid,"jb",ujb)
Call chinfo(pid,"jb",mjb)
End If
End If
End If
rs("uid")=uid
rs("pid")=pid
rs("winer")=wid
rs("pktime")=Date()
rs.update
Call echo("<div style=""background:#FFFFCC; border-top:1px solid #ccc; "">",0)
If userid=wid And pid=wid Then
Call pkrank(pid,1,pkra)
Call pkrank(uid,0,pkra)
Call adddongtai(userid,"我挑战<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>成功,<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>被打败 [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call adddongtai(uid,"<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>挑战我成功,<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>胜利 [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call echo("恭喜你赢得胜利,继续加油挑战吧<!--2-->",1)
Else
If (p1lvl-p2lvl)<=0 Then
Call pkrank(pid,0,pkra)
Else
Call pkrank(pid,0,1)
End If
If (p1lvl-p2lvl)<=0 Then
Call pkrank(uid,1,pkra)
Else
Call pkrank(uid,1,1)
End If
Call adddongtai(userid,"我挑战<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>失败,<a href=""../user/userinfo.asp?id="&uid&"&gsid=[gsid]&t=[t]"">"&p1name&"</a>胜利 [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call adddongtai(uid,"<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>挑战我失败,<a href=""../user/userinfo.asp?id="&pid&"&gsid=[gsid]&t=[t]"">"&p2name&"</a>被打败 [<a href=""../action/fighteven.asp?uid="&uid&"&gsid=[gsid]&t=[t]&fightime="&t&""">查看详细</a>]",time())
Call echo("很不幸你已经战败,要继续努力哟<!--2-->",1)
End If
Call echo("</div>",0)
End If
rs.close
Set rs=Nothing
sql="select * from fighteven"
rs.open sql,conn,1,3
rs("fighteven")=fmsg
rs("uid")=uid
rs("fightime")=t
rs.update
rs.close
Set rs=Nothing
session("pktime")=now()
End Sub

Sub pkrank(wid,lowi,pkra)
sql="select * from pkrank where userid="&wid
rs.open sql,conn,1,3
If Not rs.eof Then
If lowi=1 Then '胜利
rs("winer")=rs("winer")+pkra
Else
If (rs("winer")-pkra)<=0 Then
rs("winer")=0
Else
rs("winer")=rs("winer")-pkra
End If
End If
'fmsg=fmsg&"积分已经记录"
rs.update
Else
rs("userid")=wid
If lowi=1 Then '胜利
rs("winer")=pkra
Else
rs("winer")=0
End If
'fmsg=fmsg&"积分已经记录1"
rs.update
End If
rs.close
Set rs=Nothing
End Sub

sql1="select * from jhuser where userid="&p2id
rs1.open sql1,conn,1,3
If Not rs1.eof Then
kill=rs1("kill")
rs1("kill")=0
rs1.update
End If
rs1.close
Set rs1=Nothing

sql="select * from jhuser where userid="&userid
rs.open sql,conn,1,3
If Not rs.eof Then
kill=rs("kill")+1
rs("kill")=rs("kill")+1
rs.update
Select Case kill
Case 0
Case 1
Case 2
Case 3
Case 4
Case 5
Case 6
Case 7
Case 8
Case 9
Case 10
Case Else
End Select
Else
Call echo("人物信息获取错误,请重新登录",1)
Exit Function
End If
rs.close
Set rs=Nothing
End Function

Function p1skillp2(p1id,p2id,p1ap,p2dp,mode1,p1kill,p1nq,p2nq,p1hp,p2hp,p1name,p2name,lianji,p1hhp)'p1攻击p2 参数:p1攻击 p2防御 随机修正值 p1暴怒 p1hp p2hp p1怒气 p2怒气 连击
'Call echo("p1skillp2"&p1name&"攻击"&p2name&" "&p1name&"血量:"&p1hhp,1)
fmsg=fmsg&"<!--"&p1id&"技能攻击-->"
fmsg=fmsg&"<div style=""background:#FFF8DC; border-top:1px solid #ccc; "">"
If lianji="p1" Then
If p1kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p1kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
'mhit=int(((p1ap/2)-(p2dp/4)-mode1))+int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill
'If mhit<=0 Then mhit=1
'fmsg=fmsg&"[<font>普攻</font>]"&p1name&"发起攻击,"&p2name&"受到"&mhit&"伤害"
'fmsg=fmsg&p1name&"进入技能选择事件 "&p1name&"当前怒气值为"&p1nq&" "
Set usinfo=New userinfo
skillid=usinfo.skillinfo(p1id,p1nq,"skillid")'玩家技能名字
If skillid<>0 Then
If p1nq>0 Then
skillname=usinfo.skinfo(p1id,skillid,"skillname")
skilltypes=usinfo.skinfo(p1id,skillid,"types")'技能类型
skillval=usinfo.skinfo(p1id,skillid,"skillval")'技能数值
skillnq=usinfo.skinfo(p1id,skillid,"sknq")'技能怒气
fmsg=fmsg&p1name&"发动[<font color=red>"&skillname&"</font>]"
Select Case skilltypes
Case "kill"'伤害加深技能
fmsg=fmsg&"提高伤害"&skillval&"%"
skillmit=int(((p1ap/2)-(p2dp/4)-mode1)*(skillval*0.01))
mhit=int(((p1ap/2)-(p2dp/4)-mode1))+int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill+skillmit
fmsg=fmsg&" 对"&p2name&"造成"&skillmit&"伤害"
p2nq=(p2nq-skillnq)
Case "nq"'怒气加成技能
'Call echo(p1nq,1)
fmsg=fmsg&"提高怒气"&skillval&"点 技能等待中 "
p1nq=p1nq+skillval
mhit=0
'Call echo(p1nq,1)
Case "hp"'回复生命技能
fmsg=fmsg&"恢复生命"&skillval&"% 血量提高"&int(p1hp*(skillval*0.01))
p1hp=p1hp+int(p1hp*(skillval*0.01))
If p1hp>p1hhp Then p1hp=p1hhp
p1nq=p1nq-skillnq
'Case "end"'战斗结束技能
'fmsg=fmsg&"战斗结束"
'Exit Sub

End Select
Else
mhit=int(((p1ap/2)-(p2dp/4)-mode1))+int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font>技能释放失败</font>]怒气不足,"&p1name&"发起普通攻击,"&p2name&"受到"&mhit&"伤害"
End If
Set usinfo=Nothing
Else
mhit=int(((p1ap/2)-(p2dp/4)-mode1))+int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font>普攻</font>]"&p1name&"发起攻击,"&p2name&"受到"&mhit&"伤害"
End If
fmsg=fmsg&"</div>"
'怒气
p2nq=p2nq+1
Call echo("<!--"&p2name&"怒气"&p2nq&"-->",0)
p1skillp2=mhit
End Function

Function p2skillp1(p2id,p1id,p2ap,p1dp,mode1,p2kill,p2nq,p1nq,p2hp,p1hp,p2name,p1name,lianji,p2hhp)'p2攻击p1 参数:p2攻击 p1防御 随机修正值 p2暴怒 p2怒气 p1怒气 连击
fmsg=fmsg&"<!--"&p2id&"技能攻击-->"
'Call echo("p2skillp1"&p2name&"攻击"&p1name&" "&p2name&"血量:"&p2hhp,1)
fmsg=fmsg&"<div style=""background:#FFF8DC; border-top:1px solid #ccc; "">"
If lianji="p2" Then
If p2kill>0 Then
fmsg=fmsg&"<font color=red>连击(暴怒!伤害+"&p2kill&"%)</font>"
fmsg=fmsg&"<!--暴怒增加伤害:"&(int(int(((p2ap/2)-(p1dp/4)-mode1))*(p2kill/100))+p2kill)&"-->"
Else
fmsg=fmsg&"<font color=red>连击</font>"
End If
End If
'mhit=int(((p1ap/2)-(p2dp/4)-mode1))+int(int(((p1ap/2)-(p2dp/4)-mode1))*(p1kill/100))+p1kill
'If mhit<=0 Then mhit=1
'fmsg=fmsg&"[<font>普攻</font>]"&p1name&"发起攻击,"&p2name&"受到"&mhit&"伤害"
'fmsg=fmsg&p2name&"进入技能选择事件 "&p2name&"当前怒气值为"&p2nq&" "
Set usinfo=New userinfo
skillid=usinfo.skillinfo(p2id,p2nq,"skillid")'玩家技能名字
If skillid<>0 Then'有技能时进入
If p2nq>0 Then
skillname=usinfo.skinfo(p2id,skillid,"skillname")
skillname=usinfo.skinfo(p2id,skillid,"skillname")
skilltypes=usinfo.skinfo(p2id,skillid,"types")'技能类型
skillval=usinfo.skinfo(p2id,skillid,"skillval")'技能数值
skillnq=usinfo.skinfo(p2id,skillid,"sknq")'技能怒气
fmsg=fmsg&p2name&"发动[<font color=red>"&skillname&"</font>]"
Select Case skilltypes
Case "kill"'伤害加深技能
fmsg=fmsg&"提高伤害"&skillval&"%"
skillmit=int(((p2ap/2)-(p1dp/4)-mode1)*(skillval*0.01))
mhit=int(((p2ap/2)-(p1dp/4)-mode1))+int(int(((p2ap/2)-(p1dp/4)-mode1))*(p2kill/100))+p2kill+skillmit
fmsg=fmsg&" 对"&p1name&"造成"&skillmit&"伤害"
p2nq=(p2nq-skillnq)
Case "nq"'怒气加成技能
'Call echo(p2nq,1)
fmsg=fmsg&"提高怒气"&skillval&"点 技能等待中 "
p2nq=(p2nq+int(skillval))
mhit=0
'Call echo(p2nq,1)
Case "hp"'回复生命技能
fmsg=fmsg&"恢复生命"&skillval&"% 血量提高"&int(p2hp*(skillval*0.01))
p2hp=p2hp+int(p2hp*(skillval*0.01))
If p2hp>p2hhp Then p2hp=p2hhp
p2nq=(p2nq-skillnq)
'Case "end"'战斗结束技能
'fmsg=fmsg&"战斗结束"
'Exit Sub
End Select
Else
mhit=int(((p2ap/2)-(p1dp/4)-mode1))+int(int(((p2ap/2)-(p1dp/4)-mode1))*(p2kill/100))+p2kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font>技能释放失败</font>]怒气不足,"&p2name&"发起普通攻击,"&p1name&"受到"&mhit&"伤害"
End If
Set usinfo=Nothing
Else
mhit=int(((p2ap/2)-(p1dp/4)-mode1))+int(int(((p2ap/2)-(p1dp/4)-mode1))*(p2kill/100))+p2kill
If mhit<=0 Then mhit=1
fmsg=fmsg&"[<font>普攻</font>]"&p2name&"发起攻击,"&p1name&"受到"&mhit&"伤害"
End If
fmsg=fmsg&"</div>"
'怒气
p1nq=p1nq+1
Call echo("<!--"&p1name&"怒气"&p1nq&"-->",0)
p2skillp1=mhit
End Function
%>```