Commit 4ff8b9f7 authored by Tachibana's avatar Tachibana

eme

parent 12de48d4
Pipeline #5815 passed with stages
in 35 minutes and 27 seconds
--二向镜色 空蓝之后
function c65030099.initial_effect(c)
--xyzlimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e0:SetValue(1)
c:RegisterEffect(e0)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c65030099.tg)
e1:SetOperation(c65030099.op)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,65030099)
e2:SetTarget(c65030099.sptg)
e2:SetOperation(c65030099.spop)
c:RegisterEffect(e2)
end
function c65030099.tgfil(c,tp)
return c:IsSetCard(0x6da9) and c:IsAbleToHand() and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
end
function c65030099.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65030099.tgfil(chkc,tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c65030099.tgfil,tp,LOCATION_MZONE,0,1,nil,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=Duel.SelectTarget(tp,c65030099.tgfil,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c65030099.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c65030099.tdfil(c)
return c:IsSetCard(0x6da9) and c:IsAbleToGrave() and c:GetLevel()>0
end
function c65030099.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c65030099.tdfil,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
end
function c65030099.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.IsExistingMatchingCard(c65030099.tdfil,tp,LOCATION_HAND,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,c65030099.tdfil,tp,LOCATION_HAND,0,1,1,nil)
Duel.HintSelection(g)
local gc=g:GetFirst()
local lv=gc:GetLevel()
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(lv)
tc:RegisterEffect(e1)
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