Commit c6d5fe8f authored by gg123gg's avatar gg123gg Committed by GitHub

fix

parent 02d63b22
...@@ -35,17 +35,20 @@ function cm.scfilter2(c,mg) ...@@ -35,17 +35,20 @@ function cm.scfilter2(c,mg)
end end
function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_HAND) and chkc:IsControler(tp) and cm.scfilter1(chkc,e,tp,e:GetHandler()) end if chkc then return chkc:IsLocation(LOCATION_HAND) and chkc:IsControler(tp) and cm.scfilter1(chkc,e,tp,e:GetHandler()) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) local c=e:GetHandler()
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,3)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.scfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler()) end and Duel.IsExistingMatchingCard(cm.scfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function cm.scop(e,tp,eg,ep,ev,re,r,rp) function cm.scop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.scfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,e:GetHandler()) local mc=Duel.SelectMatchingCard(tp,cm.scfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,e:GetHandler())
if not tc:IsRelateToEffect(e) or not c:IsRelateToEffect(e) or not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) or not Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then return end local tc=mc:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
...@@ -55,21 +58,11 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,21 +58,11 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if not c:IsRelateToEffect(e) then return end
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
local g=Duel.GetMatchingGroup(cm.scfilter2,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(cm.scfilter2,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_DECKBOT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
tc:RegisterEffect(e2,true)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
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