Commit 6b499efd authored by whenmo's avatar whenmo Committed by GitHub

fix GetLocCondition

parent e0c8ea53
...@@ -150,9 +150,12 @@ end ...@@ -150,9 +150,12 @@ end
function VgF.GetLocCondition(loc, con) function VgF.GetLocCondition(loc, con)
local loc, loc_con = VgF.FixVRLoc(loc) local loc, loc_con = VgF.FixVRLoc(loc)
local condition = function(e, tp, eg, ep, ev, re, r, rp) local condition = function(e, tp, eg, ep, ev, re, r, rp)
return (not con or con(e, tp, eg, ep, ev, re, r, rp)) and loc_con(e:GetHandler()) local c = e
if VgF.GetValueType(e) == "Effect" then c = e:GetHandler() end
if VgF.GetValueType(c) ~= "Card" or not loc_con(c) then return false end
return not con or con(e, tp, eg, ep, ev, re, r, rp)
end end
return loc or LOCATION_CIRCLE, condition return loc or LOCATION_MZONE, condition
end end
---检查并转换typ 以及 code 用于【自】能力函数 ---检查并转换typ 以及 code 用于【自】能力函数
...@@ -1632,4 +1635,4 @@ function VgF.ToTrigger(g) ...@@ -1632,4 +1635,4 @@ function VgF.ToTrigger(g)
if Duel.MoveToField(tc, tp, tp, loc, POS_FACEUP, true) then ct = ct + 1 end if Duel.MoveToField(tc, tp, tp, loc, POS_FACEUP, true) then ct = ct + 1 end
end end
return ct return ct
end end
\ No newline at end of file
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