Commit ca8a2bdb authored by TanakaKotoha's avatar TanakaKotoha

interweb

parent 3dd7a292
...@@ -2279,7 +2279,10 @@ end ...@@ -2279,7 +2279,10 @@ end
function rscon.sumtype(sumtbl,sumfilter,matchall) function rscon.sumtype(sumtbl,sumfilter,matchall)
return function(e,tp,eg,ep,ev,re,r,rp) return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local checkg=e:IsHasType(EFFECT_TYPE_FIELD) and rsgf.Mix2(c) or eg:Clone() sumfilter=sumfilter or aux.TRUE
local code=e:GetCode()
local fieldres=(code==EVENT_SUMMON_SUCCESS or code==EVENT_SPSUMMON_SUCCESS or code==EVENT_FLIP_SUMMON_SUCCESS ) and e:IsHasType(EFFECT_TYPE_FIELD)
local checkg=not fieldres and rsgf.Mix2(c) or eg:Clone()
sumtbl=sumtbl or "sp" sumtbl=sumtbl or "sp"
local tf=false local tf=false
local codetbl1={"sp","adv","rit","fus","syn","xyz","link","pen"} local codetbl1={"sp","adv","rit","fus","syn","xyz","link","pen"}
...@@ -2293,19 +2296,19 @@ function rscon.sumtype(sumtbl,sumfilter,matchall) ...@@ -2293,19 +2296,19 @@ function rscon.sumtype(sumtbl,sumfilter,matchall)
stypeg:AddCard(tc) stypeg:AddCard(tc)
end end
end end
if #stypeg<=0 or (matchall and not stypeg:Equal(checkg)) then
return false
end
local mat=tc:GetMaterial() local mat=tc:GetMaterial()
if sumfilter then if sumfilter then
local res=sumfilter(tc,e,tp,re,rp,mat) local res=sumfilter(tc,e,tp,re,rp,mat)
if res then filterg:AddCard(tc) end if res then filterg:AddCard(tc) end
end end
if #filterg<=0 or (matchall and not filterg:Equal(checkg)) then
return false
end
return true
end end
if #stypeg<=0 or (matchall and not stypeg:Equal(checkg)) then
return false
end
if #filterg<=0 or (matchall and not filterg:Equal(checkg)) then
return false
end
return true
end end
end end
--Condition: Negate Effect/Activation --Condition: Negate Effect/Activation
......
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