Commit e1ca17c7 authored by wind2009's avatar wind2009

Fix

parent e2e4139a
Pipeline #41290 passed with stages
in 2 minutes and 36 seconds
...@@ -51,6 +51,15 @@ function s.initial_effect(c) ...@@ -51,6 +51,15 @@ function s.initial_effect(c)
e5:SetOperation(s.fspop) e5:SetOperation(s.fspop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.getrg(tp,sc)
local rg=Duel.GetReleaseGroup(tp,true,REASON_SPSUMMON)
local mrg=rg:Filter(Card.IsHasEffect,nil,EFFECT_EXTRA_RELEASE)
if mrg:GetCount()>0 then
return mrg:Filter(s.spfilter,nil,tp,sc)
else
return rg:Filter(s.spfilter,nil,tp,sc)
end
end
function s.splimit(e,se,sp,st) function s.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and Duel.GetFlagEffect(sp,id)==0 return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION and Duel.GetFlagEffect(sp,id)==0
end end
...@@ -71,11 +80,11 @@ function s.spcon(e,c) ...@@ -71,11 +80,11 @@ function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
if Duel.GetFlagEffect(tp,id)>0 then return false end if Duel.GetFlagEffect(tp,id)>0 then return false end
return Duel.CheckReleaseGroupEx(tp,s.spfilter,1,REASON_SPSUMMON,true,nil,tp,c) local rg=s.getrg(tp,c)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) return rg:GetCount()>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,true,REASON_SPSUMMON):Filter(s.spfilter,nil,tp,c) local g=s.getrg(tp,c)
local g2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g2:SelectUnselect(nil,tp,false,true,1,1) local tc=g2:SelectUnselect(nil,tp,false,true,1,1)
......
...@@ -100,7 +100,7 @@ end ...@@ -100,7 +100,7 @@ end
function s.cpop(e,tp,eg,ep,ev,re,r,rp) function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
if not te then return end if not te then return end
if not te:GetHandler():IsRelateToEffect(e) then return end if not te:GetHandler():IsRelateToChain() then return end
e:SetLabelObject(te:GetLabelObject()) e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation() local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end if op then op(e,tp,eg,ep,ev,re,r,rp) end
......
...@@ -68,7 +68,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.nsfilter(c,tp) function s.nsfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
local chk=c:GetColumnGroup():IsExists(s.nsfilter,1,nil,1-tp) local chk=c:GetColumnGroup():IsExists(s.nsfilter,1,nil,1-tp)
...@@ -90,7 +90,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +90,7 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
...@@ -104,9 +104,9 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,9 +104,9 @@ function s.nsop(e,tp,eg,ep,ev,re,r,rp)
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL) e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
local e5=e1:Clone() local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e5:SetDescription(aux.Stringid(id,1)) e5:SetDescription(aux.Stringid(id,1))
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE|EFFECT_FLAG_SET_AVAILABLE|EFFECT_FLAG_CLIENT_HINT)
tc:RegisterEffect(e5) tc:RegisterEffect(e5)
end end
end end
......
-- --黒き竜のエクレシア
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,68468459) aux.AddCodeList(c,68468459)
...@@ -80,16 +80,16 @@ end ...@@ -80,16 +80,16 @@ end
function s.retop(e,tp,eg,ep,ev,re,r,rp) function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject()) Duel.ReturnToField(e:GetLabelObject())
end end
function s.tdfilter(c,tp,ec) function s.tdfilter(c,tp)
return c:IsFaceupEx() and c:IsLevel(8) and c:IsType(TYPE_FUSION) return c:IsFaceupEx() and c:IsLevel(8) and c:IsType(TYPE_FUSION)
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp,c) and c:IsAbleToDeck() end if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) and c:IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp,c) local g1=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
......
...@@ -64,7 +64,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,7 +64,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
else elseif op==2 then
Duel.SetOperationInfo(0,CATEGORY_DISABLE,te:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,te:GetHandler(),1,0,0)
if te:GetHandler():IsDestructable() and te:GetHandler():IsRelateToEffect(te) then if te:GetHandler():IsDestructable() and te:GetHandler():IsRelateToEffect(te) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,te:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,te:GetHandler(),1,0,0)
...@@ -72,11 +72,12 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,11 +72,12 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then local op=e:GetLabel()
if op==1 then
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToChain(ev) then if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToChain(ev) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
else elseif op==2 then
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
if Duel.NegateEffect(ev-1) and te:GetHandler():IsRelateToChain(ev-1) then if Duel.NegateEffect(ev-1) and te:GetHandler():IsRelateToChain(ev-1) then
Duel.Destroy(te:GetHandler(),REASON_EFFECT) Duel.Destroy(te:GetHandler(),REASON_EFFECT)
......
...@@ -27,7 +27,7 @@ function s.initial_effect(c) ...@@ -27,7 +27,7 @@ function s.initial_effect(c)
e2:SetTarget(s.eqtg) e2:SetTarget(s.eqtg)
e2:SetOperation(s.eqop) e2:SetOperation(s.eqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
...@@ -116,7 +116,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -116,7 +116,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then if tc:IsRelateToChain() and tc:IsOnField() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
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