Commit 280c01c8 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c16348059.lua

parent e32bcaeb
Pipeline #32174 passed with stages
in 47 minutes and 18 seconds
......@@ -5,9 +5,22 @@ function c16348059.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16348059)
e1:SetTarget(c16348059.target)
e1:SetOperation(c16348059.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,16348059)
e2:SetCondition(c16348059.thcon)
e2:SetTarget(c16348059.thtg)
e2:SetOperation(c16348059.thop)
c:RegisterEffect(e2)
end
c16348059.fusion_effect=true
function c16348059.filter1(c,e)
......@@ -81,4 +94,23 @@ function c16348059.activate(e,tp,eg,ep,ev,re,r,rp)
end
tc:CompleteProcedure()
end
end
function c16348059.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousSetCard(0x6dc2)
and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsType(TYPE_FUSION)
end
function c16348059.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16348059.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c16348059.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,LOCATION_GRAVE)
end
function c16348059.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsAbleToHand() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
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