Commit bd30bf6e authored by 伊蕾娜's avatar 伊蕾娜

fix:修复大扫除bug

parent d80c66c4
Pipeline #19740 passed with stage
in 53 seconds
--大扫除 --大扫除
function c10915.initial_effect(c) function c10915.initial_effect(c)
--act --act
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10915,0)) e1:SetDescription(aux.Stringid(10915,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10915.tg1) e1:SetCountLimit(1,10915+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c10915.op1) e1:SetTarget(c10915.tg1)
c:RegisterEffect(e1) e1:SetOperation(c10915.op1)
end c:RegisterEffect(e1)
function c10915.tfilter1(c,e,tp) end
return (c:IsSetCard(0x527) or c:IsSetCard(0x251e)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) function c10915.tfilter1(c,e,tp)
end return (c:IsSetCard(0x527) or c:IsSetCard(0x251e)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c10915.tg1(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.IsExistingMatchingCard(c10915.tfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) function c10915.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(c10915.tfilter1,tp,LOCATION_DECK,0,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
function c10915.dfilter(c) end
return (c:IsType(TYPE_CONTINUOUS) or c:IsType(TYPE_FIELD)) and c:IsFaceup() function c10915.dfilter(c)
end return (c:IsType(TYPE_CONTINUOUS) or c:IsType(TYPE_FIELD)) and c:IsFaceup()
function c10915.op1(e,tp,eg,ep,ev,re,r,rp) end
if Duel.GetMZoneCount(tp)<0 then return end function c10915.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if Duel.GetMZoneCount(tp)<0 then return end
local sg=Duel.SelectMatchingCard(tp,c10915.tfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if sg:GetCount()<1 then return end local sg=Duel.SelectMatchingCard(tp,c10915.tfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then if sg:GetCount()<1 then return end
local lc=Duel.GetOperatedGroup():GetFirst() if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
if not lc then return end local lc=Duel.GetOperatedGroup():GetFirst()
local bg=Duel.GetMatchingGroup(c10915.dfilter, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, nil) if not lc then return end
Duel.Destroy(bg,REASON_EFFECT) local bg=Duel.GetMatchingGroup(c10915.dfilter, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, nil)
end Duel.Destroy(bg,REASON_EFFECT)
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