Commit 1b7b97e1 authored by xiaoye's avatar xiaoye

fix 踩人bug

parent 6216a18d
...@@ -574,8 +574,9 @@ end ...@@ -574,8 +574,9 @@ end
function VgD.CallFilter(c, tp, zone) function VgD.CallFilter(c, tp, zone)
return VgF.RMonsterFilter(c) and zone == VgF.SequenceToGlobal(tp, c:GetLocation(), c:GetSequence()) return VgF.RMonsterFilter(c) and zone == VgF.SequenceToGlobal(tp, c:GetLocation(), c:GetSequence())
end end
function VgD.CallOperation(e, tp, eg, ep, ev, re, r, rp) function VgD.CallOperation(e)
local c = e:GetHandler() local c = e:GetHandler()
local tp = e:GetHandlerPlayer()
local z = bit.bnot(VgF.GetAvailableLocation(tp)) local z = bit.bnot(VgF.GetAvailableLocation(tp))
local rg = Duel.GetMatchingGroup(Card.IsPosition, tp, LOCATION_MZONE, 0, nil, POS_FACEDOWN_ATTACK) local rg = Duel.GetMatchingGroup(Card.IsPosition, tp, LOCATION_MZONE, 0, nil, POS_FACEDOWN_ATTACK)
for tc in VgF.Next(rg) do for tc in VgF.Next(rg) do
......
...@@ -25,11 +25,11 @@ end ...@@ -25,11 +25,11 @@ end
---@param seq number 编号 ---@param seq number 编号
---@return number 卡片所在的zone ---@return number 卡片所在的zone
function VgF.SequenceToGlobal(p, loc, seq) function VgF.SequenceToGlobal(p, loc, seq)
if p ~= 0 or p ~= 1 or loc & 0xc ~= loc then return 0 end if p ~= 0 and p ~= 1 then return 0 end
if loc == LOCATION_MZONE and seq <= 6 then if loc==LOCATION_MZONE then
return 0x0001 << (seq) if seq <= 6 then return 0x0001 << (seq) end
elseif loc == LOCATION_SZONE and seq <= 4 then elseif loc == LOCATION_SZONE then
return 0x0100 << (16 * p + seq) if seq <= 4 then return 0x0100 << (16 * p + seq) end
end end
return 0 return 0
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment