Function 翻牌(card1, card2, color1, color2, a1, a2, a3, b1, b2, b3, id)
Dim flopface,pairface,flashface,wet,power,draw
flopface = 牌面(a1, a2, a3, b1, b2, b3)
pairface = CInt(Mid(flopface, 1, 1))
flashface = CInt(Mid(flopface, 2, 1))
straightface= CInt(Mid(flopface, 3, 1))
wet=CInt(Mid(flopface, 3, 1))
power=牌力(card1,card2,color1,color2,a1,a2,a3,b1,b2,b3)
draw=Lib.德扑数学.听牌(card1,card2,color1,color2,a1,a2,a3,b1,b2,b3)
if pairface=2 then
if power=12 then
翻牌= "6"+CStr(wet)
ElseIf power = 4 and card1 >= 12 and card1 >= a1 Then
翻牌= "5"+CStr(wet)
elseif power=4 and card1<=11 and card1>=a1 then
翻牌 = "4" + CStr(wet)
ElseIf power >= 1 Then
翻牌 = "2" + CStr(wet)
ElseIf prepower <= 3 Then//AK
翻牌 = "1" + CStr(wet)
else 翻牌= "0"+CStr(wet)
end if
elseif pairface=1 then
if power>=11 then
翻牌= "6"+CStr(wet)
elseif power>=4 then
if power=5 and a1<>14 and a2<>14 and a3<>14 and (card1=14 or card2=14) then
翻牌= "5"+CStr(wet)
elseif card1>=11 and power=4 or power=5 Then
翻牌 = "4" + CStr(wet)
Else 翻牌 = "2" + CStr(wet)
end if
elseif power>=3 or draw>=2 then
翻牌 = "2" + CStr(wet)
ElseIf power = 2 Then
翻牌 = "1" + CStr(wet)
else 翻牌= "0"+CStr(wet)
end if
elseif flashface=1 then
if power=10 and (card1=14 or card2=14) or power=12 then
翻牌= "6"+CStr(wet)
elseif power=10 and (card1>=12 or card2>=12) then
翻牌= "5"+CStr(wet)
elseif power=10 then
翻牌= "4"+CStr(wet)
elseif card1=14 and color1=b1 or card2=14 and color2=b2 or power=7 or power=8 or card1=13 and color1=b1 and Lib.德扑数学.三取大(a1, a2, a3)=14 or card2=13 and color2=b2 and Lib.德扑数学.三取大(a1, a2, a3)=14 then
翻牌= "3"+CStr(wet)
elseif power>=3 then
翻牌 = "2" + CStr(wet)
else 翻牌= "0"+CStr(wet)
end if
elseif straightface>=1 then
If power >= 10 or power = 9 and card1 <> Lib.德扑数学.四取小(card1, a1, a2, a3) and card2 <> Lib.德扑数学.四取小(card2, a1, a2, a3) or power = 9 and Lib.德扑数学.五取大(card1,card2, a1, a2, a3)=14 and Lib.德扑数学.五取小(card1,card2, a1, a2, a3)=10 or power = 9 and Lib.德扑数学.五取大(card1,card2, a1, a2, a3)=14 and Lib.德扑数学.五取小(card1,card2, a1, a2, a3)=5 and card1<>14 and card2<>14 Then
翻牌= "6"+CStr(wet)
elseif power>=7 then
翻牌= "5"+CStr(wet)
ElseIf power >= 4 Then
If card1<=10 and power = 4 Then
翻牌 = "2" + CStr(wet)
Else 翻牌 = "4" + CStr(wet)
End If
elseif draw>=2 then
翻牌= "3"+CStr(wet)
elseif power=3 then
翻牌 = "2" + CStr(wet)
ElseIf power = 2 Then
翻牌 = "1" + CStr(wet)
else 翻牌= "0"+CStr(wet)
end if
else
if power>=8 and card1 <> Lib.德扑数学.四取小(card1, a1, a2, a3) and card2 <> Lib.德扑数学.四取小(card2, a1, a2, a3) or power>=7 and wet>=2 or power=7 and 翻牌两高张()=1 Then
翻牌= "6"+CStr(wet)
elseif power>=6 then
翻牌= "5"+CStr(wet)
elseif power>=4 then
If card1<=10 and power = 4 Then
翻牌 = "2" + CStr(wet)
Else 翻牌 = "4" + CStr(wet)
End If
elseif draw>=2 then
翻牌= "3"+CStr(wet)
elseif power=3 then
翻牌 = "2" + CStr(wet)
elseif power=2 then
翻牌 = "1" + CStr(wet)
else 翻牌= "0"+CStr(wet)
end if
End If
If prepower = 10 Then
翻牌 = "0" + CStr(wet)
dm.WriteFile "排错.txt", " id=" +id+ CStr(session)
End If
dm.WriteFile id+".txt", " 翻牌圈牌力=" + CStr(power)
dm.WriteFile id+".txt", " 翻牌圈听牌=" + CStr(draw)
dm.WriteFile id+".txt", " 翻牌圈成对牌面=" + CStr(pairface)
dm.WriteFile id+".txt", " 翻牌圈同花牌面=" + CStr(flashface)
dm.WriteFile id+".txt", " 翻牌圈湿度=" + CStr(wet)
end function
Function 牌面(a, b, c, x, y, z)
Dim min,mid2,max,flashface,straightface,pairface,wet
min = Lib.德扑数学.三取小(a, b, c)
mid2 = Lib.德扑数学.三取中(a, b, c)
max = Lib.德扑数学.三取大(a, b, c)
flashface = 0
straightface = 0
pairface = 0
wet= 0
if a=b and a=c then
牌面 = "2000"
Exit Function
end if
if max=mid2 or max=min or mid2=min then
pairface=1
end if
if max-min<=3 or max-min=4 and min>=10 then
straightface=1
elseif max-min=4 then
straightface=2
end if
if x=y and y=z then
flashface=1
elseif x=y or x=z or y=z then
flashface=2
end if
if pairface=1 then
if flashface=2 then
wet=1
else wet=0
end if
elseif flashface=1 and straightface>=1 then
wet=4
elseif flashface=1 and straightface=0 then
wet=3
elseif flashface=2 and straightface=1 then
wet=3
elseif flashface=2 then
wet=2
elseif straightface>=1 then
wet=1
end if
牌面= CStr(pairface)+CStr(flashface)+CStr(wet)+CStr(straightface)
end function
function 牌力(c1,c2,r1,r2,a,b,c,x,y,z)
if Lib.德扑数学.同花(r1,r2,x,y,z)=1 and Lib.德扑数学.顺子(c1,c2,a,b,c)=1 or Lib.德扑数学.四条(c1,c2,a,b,c)=1 then
牌力 = 12
ElseIf Lib.德扑数学.带A明三(c1, c2, a, b, c) = 1 Then
MessageBox "有带A明三"
牌力= 12
elseif Lib.德扑数学.葫芦(c1,c2,a,b,c)=1 then
牌力= 11
elseif Lib.德扑数学.同花(r1,r2,x,y,z)=1 then
牌力= 10
elseif Lib.德扑数学.顺子(c1,c2,a,b,c)=1 then
返回值 = Lib.德扑翻牌圈.牌力(c1,c2,r1,r2,a,b,c,x,y,z)
牌力= 9
elseif Lib.德扑数学.暗三(c1,c2,a,b,c)>=2 then
牌力= 8
elseif Lib.德扑数学.暗三(c1,c2,a,b,c)=1 then
牌力= 7
elseif Lib.德扑数学.明三(c1,c2,a,b,c)=1 then
牌力= 5
elseif Lib.德扑数学.顶两对(c1,c2,a,b,c)=1 then
牌力= 6
elseif Lib.德扑数学.中两对(c1,c2,a,b,c)=1 then
牌力= 5
elseif Lib.德扑数学.底两对(c1,c2,a,b,c)=1 then
牌力= 5
elseif Lib.德扑数学.超对(c1,c2,a,b,c)=1 then
牌力= 4
elseif Lib.德扑数学.顶对(c1,c2,a,b,c)=1 then
牌力= 3
elseif Lib.德扑数学.中对(c1,c2,a,b,c)=1 then
牌力= 2
elseif Lib.德扑数学.底对(c1,c2,a,b,c)=1 then
牌力= 1
else 牌力= 0
End If
TracePrint "牌力="+CStr(牌力)
End Function