Commit 5513c309 authored by Tachibana's avatar Tachibana

得得得得得

parent 6503c787
Pipeline #12734 passed with stages
in 30 minutes and 50 seconds
......@@ -85,10 +85,36 @@ function c47530109.mcop(e,tp,eg,ep,ev,re,r,rp)
for i=1,2 do
local token=Duel.CreateToken(tp,47530110)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
--destroy
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c47530109.destg1)
e3:SetOperation(c47530109.desop1)
token:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
end
function c47530109.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD):RandomSelect(tp,2)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
Duel.SetTargetCard(g)
end
function c47530109.desop1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if #sg>0 then
Duel.Destroy(sg,REASON_EFFECT)
end
end
function c47530109.spfilter(c,e,tp,g)
return g:IsContains(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false)
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