Commit e12c210f authored by POLYMER's avatar POLYMER

fix

parent e3999b01
...@@ -82,7 +82,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.filter(c) function s.filter(c)
return c:GetType()&0x20002==0x20002 and c.fusion_effect and c:IsSSetable() return c:GetType()&0x20002==0x20002 and c:IsEffectProperty(aux.EffectPropertyFilter(EFFECT_FLAG_FUSION_SUMMON)) and c:IsSSetable()
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......
...@@ -29,12 +29,6 @@ function s.initial_effect(c) ...@@ -29,12 +29,6 @@ function s.initial_effect(c)
s.global_check=true s.global_check=true
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
sg:KeepAlive() sg:KeepAlive()
local ge0=Effect.GlobalEffect()
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_ADJUST)
ge0:SetLabelObject(sg)
ge0:SetOperation(s.geop)
Duel.RegisterEffect(ge0,0)
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_SOLVED) ge1:SetCode(EVENT_CHAIN_SOLVED)
...@@ -53,8 +47,11 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,8 +47,11 @@ function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.quick_filter(e)
return e:GetCode()==EVENT_BECOME_TARGET and e:IsActivated() and e:IsHasType(EFFECT_TYPE_SINGLE)
end
function s.thfilter(c) function s.thfilter(c)
return c:GetFlagEffect(id)>0 and c:IsAbleToHand() return c:IsOriginalEffectProperty(s.quick_filter) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -91,21 +88,3 @@ function s.rtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,21 +88,3 @@ function s.rtop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function s.geop(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetLabelObject()
local g=Duel.GetMatchingGroup(nil,0,0xff,0xff,sg)
if #g==0 then return end
sg:Merge(g)
local cp={}
local f=Card.RegisterEffect
Card.RegisterEffect=function(tc,te,bool)
if te:GetCode()==EVENT_BECOME_TARGET and te:IsActivated() and te:GetType()&EFFECT_TYPE_SINGLE~=0 then table.insert(cp,te:Clone()) end
return f(tc,te,bool)
end
for tc in aux.Next(g) do
Duel.CreateToken(tp,tc:GetOriginalCode())
if #cp>0 then tc:RegisterFlagEffect(id,0,0,0) end
cp={}
end
Card.RegisterEffect=f
end
...@@ -21,24 +21,15 @@ function s.initial_effect(c) ...@@ -21,24 +21,15 @@ function s.initial_effect(c)
e2:SetTarget(s.fstg) e2:SetTarget(s.fstg)
e2:SetOperation(s.fsop) e2:SetOperation(s.fsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local sg=Group.CreateGroup()
sg:KeepAlive()
local ge0=Effect.GlobalEffect()
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_ADJUST)
ge0:SetLabelObject(sg)
ge0:SetOperation(s.geop)
Duel.RegisterEffect(ge0,0)
end
end end
s.fusion_effect=true
function s.matfilter(c,fc) function s.matfilter(c,fc)
return c:IsRace(RACE_INSECT) and c:IsFusionType(TYPE_FUSION) return c:IsRace(RACE_INSECT) and c:IsFusionType(TYPE_FUSION)
end end
function s.quick_filter(e)
return e:GetCode()==EVENT_BECOME_TARGET and e:IsActivated() and e:IsHasType(EFFECT_TYPE_SINGLE)
end
function s.costfilter(c,tp) function s.costfilter(c,tp)
return c:GetFlagEffect(id)>0 and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.tffilter,tp,LOCATION_DECK,0,1,c,tp) return c:IsOriginalEffectProperty(s.quick_filter) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(s.tffilter,tp,LOCATION_DECK,0,1,c,tp)
end end
function s.tffilter(c,tp) function s.tffilter(c,tp)
return c:GetType()&0x20002==0x20002 and c:GetActivateEffect():IsActivatable(tp) return c:GetType()&0x20002==0x20002 and c:GetActivateEffect():IsActivatable(tp)
...@@ -178,21 +169,3 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -178,21 +169,3 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp)
aux.FCheckAdditional=nil aux.FCheckAdditional=nil
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
end end
function s.geop(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetLabelObject()
local g=Duel.GetMatchingGroup(nil,0,0xff,0xff,sg)
if #g==0 then return end
sg:Merge(g)
local cp={}
local f=Card.RegisterEffect
Card.RegisterEffect=function(tc,te,bool)
if te:GetCode()==EVENT_BECOME_TARGET and te:IsActivated() and te:GetType()&EFFECT_TYPE_SINGLE~=0 then table.insert(cp,te:Clone()) end
return f(tc,te,bool)
end
for tc in aux.Next(g) do
Duel.CreateToken(tp,tc:GetOriginalCode())
if #cp>0 then tc:RegisterFlagEffect(id,0,0,0) end
cp={}
end
Card.RegisterEffect=f
end
...@@ -38,7 +38,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function s.thfilter(c) function s.thfilter(c)
return c:GetType()&0x20002==0x20002 and c.fusion_effect and c:IsAbleToHand() return c:GetType()&0x20002==0x20002 and c:IsEffectProperty(aux.EffectPropertyFilter(EFFECT_FLAG_FUSION_SUMMON)) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true 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