Commit 25f17fce authored by POLYMER's avatar POLYMER

fix

parent f92ca7db
...@@ -184,19 +184,19 @@ function Auxiliary.PreloadUds() ...@@ -184,19 +184,19 @@ function Auxiliary.PreloadUds()
end end
end end
local _CreateEffect=Effect.CreateEffect local _CreateEffect=_Effect.CreateEffect
function Effect.CreateEffect(c,...) function Effect.CreateEffect(c,...)
if aux.GetValueType(c)~="Card" then error("Effect.CreateEffect没有输入正确的Card参数。",2) return end if aux.GetValueType(c)~="Card" then error("Effect.CreateEffect没有输入正确的Card参数。",2) return end
local e=_CreateEffect(c,...) local e=_CreateEffect(c,...)
if e and c then effect_handler[e]=c end if e and c then effect_handler[e]=c end
return e return e
end end
local _SetRange=Effect.SetRange local _SetRange=_Effect.SetRange
function Effect.SetRange(e,r,...) function Effect.SetRange(e,r,...)
if e and r then table_range[e]=r end if e and r then table_range[e]=r end
return _SetRange(e,r,...) return _SetRange(e,r,...)
end end
local _Clone=Effect.Clone local _Clone=_Effect.Clone
function Effect.Clone(e,...) function Effect.Clone(e,...)
local clone_e=_Clone(e,...) local clone_e=_Clone(e,...)
if e and clone_e then if e and clone_e then
...@@ -237,6 +237,12 @@ function Auxiliary.PreloadUds() ...@@ -237,6 +237,12 @@ function Auxiliary.PreloadUds()
elseif e:IsHasType(EFFECT_TYPE_XMATERIAL) and not table_range[e] then elseif e:IsHasType(EFFECT_TYPE_XMATERIAL) and not table_range[e] then
table_range[e]=LOCATION_OVERLAY table_range[e]=LOCATION_OVERLAY
end end
if e:IsHasType(EFFECT_TYPE_SINGLE) and e:IsHasType(EFFECT_TYPE_TRIGGER_O) and e:GetCode()==EVENT_TO_DECK and not c:IsExtraDeckMonster() then
e:SetType(EFFECT_TYPE_QUICK_O)
e:SetRange(LOCATION_DECK)
local con=e:GetCondition() or aux.TRUE
e:SetCondition(function(e,tp,eg,...) return eg:IsContains(e:GetHandler()) and con(e,tp,eg,...) end)
end
local eid=_CRegisterEffect(c,e,...) local eid=_CRegisterEffect(c,e,...)
if e and eid then effect_registered[e]=true end if e and eid then effect_registered[e]=true end
return eid return eid
......
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