Commit 53e0b325 authored by nanahira's avatar nanahira

Auto Push by Nanahira

parent 6f4d270b
...@@ -270,11 +270,11 @@ end ...@@ -270,11 +270,11 @@ end
function cm.MustMaterialCheck(v,tp,code) function cm.MustMaterialCheck(v,tp,code)
if not v then return not Duel.IsPlayerAffectedByEffect(tp,code) end if not v then return not Duel.IsPlayerAffectedByEffect(tp,code) end
local t=cm.GetValueType(v) local t=cm.GetValueType(v)
if v~="Card" and v~="Group" then error("Parameter 1 must be \"Card\" or \"Group\".",2) end if t~="Card" and t~="Group" then error("Parameter 1 must be \"Card\" or \"Group\".",2) end
local ce={Duel.IsPlayerAffectedByEffect(tp,code)} local ce={Duel.IsPlayerAffectedByEffect(tp,code)}
for _,te in ipairs(te) do for _,te in ipairs(ce) do
if (cm.GetValueType(v)=="Card" and v~=te:GetHandler()) if (t=="Card" and v~=te:GetHandler())
or (cm.GetValueType(v)=="Group" and not v:IsExists(te:GetHandler())) then return false end or (t=="Group" and not v:IsExists(te:GetHandler())) then return false end
end end
return true return true
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