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

fix:修复大扫除bug

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