<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<%call head()
Server.ScriptTimeout=999
lid=request("lid")
pid=request("pid")
if pid="" then pid="1"


ids=session("id")
call saycardd("武者大厅")%>

<!--#INCLUDE file="conn1.asp"-->
<%
set rs=Server.CreateObject("ADODB.Recordset")
strSQL="select * from sx where ids="&myid
rs.open strSQL,liao,1,1
if rs.recordcount<=1 then
if rs("tl")<1 then
sql="delete from sx Where CStr(ids)='" & myid & "'"
  liao.Execute(sql)
Response.Write "GAME-OVER!<br/>编者按:可怜少侠壮志未酬生先死!<br/>你说:老子十八年后又是一条好汉!<br/><a href='index.asp?sid="&sid&"&amp;saytk="&saytk&"'>继续江湖</a><br/>"
   rs.close
set rs=Nothing
else
dengji=clng(rs("dj"))
mygj=rs("gj")
myfs=rs("fs")
myjy=rs("jy")
mytl=rs("tl")
   rs.close
set rs=Nothing
set rs1=Server.CreateObject("ADODB.Recordset")
strSQL="select * from tz where pid="&pid&" and cstr(ids)="&myid
rs1.open strSQL,liao,1,2
dfname=rs1("name")
tzyz=rs1("txt")
if rs1.eof then
Response.Write "[<a href='/bbs/uinfo.asp?id="&lid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>"&dfname&"</a>]已被你打败！还不放过它吗？<a href='tt.asp?pid="&pid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>继续挑战</a><br/>"
else
if rs1("tl")>=1 then
gwsx=clng(rs1("gj")+rs1("fs"))
mysx=clng(mygj+myfs)
gwsx1=clng(mysx*0.2)
mysx1=clng(gwsx*0.19)
sql="update tz set tl=tl-"&gwsx1&" where pid="&pid&" and cstr(ids)="&myid
  liao.Execute(sql)
sql="update sx set tl=tl-"&mysx1&" where cstr(ids)="&myid
  liao.Execute(sql)
gwjy1=rs1("tl")
if gwjy1<0 then
gwjy1=0
end if
Response.Write "攻击中:<br/>[<a href='/bbs/uinfo.asp?id="&lid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>"&dfname&"</a>]生命值-"&gwsx1&"<br/>("&gwjy1&"/"&rs1("jy")&")<br/>--------<br/>我的生命值-"&mysx1&"<br/>("&mytl&"/"&myjy&")<br/><a href='sfpk.asp?pid="&pid&"&amp;t=" & time() & "&amp;sid="&sid&"&amp;saytk="&saytk&"'>攻击</a><br/>"
else
%>
<!--#include file="djname.asp"-->
<%
tsjy=clng(rs1("dj")*5)
if tsjy=0 then
tsjy=5
end if
ddyz=clng(tzyz*0.8)
if ddyz>0 then
ddyz1="得到银子"&ddyz&"两,"
sql="update wupin set yz=yz-"&tzyz&" where cstr(ids)="&lid
  liao.Execute(sql)
sql="update wupin set yz=yz+"&ddyz&" where cstr(ids)="&myid
  liao.Execute(sql)
sql="update sx set pk=pk+1 where cstr(ids)="&myid
  liao.Execute(sql)
end if
%><a href="/bbs/index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">社区首页</a>
<%call head1()%>