Commit 625f8e4a authored by Tachibana's avatar Tachibana

得得得得得

parent 7ebd0f56
Pipeline #12032 passed with stage
in 27 minutes and 18 seconds
No preview for this file type
--翠之化猫 伊维亚
function c17032610.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--scale change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17032610,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCost(c17032610.sccost)
e1:SetOperation(c17032610.scop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17032610,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c17032610.spcon)
e2:SetTarget(c17032610.sptg)
e2:SetOperation(c17032610.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e4:SetCondition(c17032610.atkcon)
e4:SetOperation(c17032610.atkop)
c:RegisterEffect(e4)
end
function c17032610.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c17032610.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(10)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e2)
end
function c17032610.cfilter(c)
return c:IsType(TYPE_FIELD)
end
function c17032610.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c17032610.spfilter1(c,e,tp)
return c:IsSetCard(0x37f6) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c17032610.spfilter2,tp,LOCATION_MZONE,0,1,nil,e,tp,c)
end
function c17032610.synfilter(c,g)
return c:IsSynchroSummonable(nil,g)
end
function c17032610.spfilter2(c,e,tp,mc)
if c~=e:GetHandler() then return false end
local g=Group.FromCards(c,mc)
local e1=nil
local e2=nil
e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_LEVEL)
e1:SetValue(c17032610.slevel)
mc:RegisterEffect(e1,true)
local res=Duel.IsExistingMatchingCard(c17032610.synfilter,tp,LOCATION_EXTRA,0,1,nil,g)
if e1 then e1:Reset() end
if e2 then e2:Reset() end
return res
end
function c17032610.slevel(e,c)
local lv=e:GetHandler():GetLevel()
local lv2=e:GetHandler():GetLeftScale()
return lv2*65536+lv
end
function c17032610.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c17032610.spfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c17032610.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c17032610.spfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,c)
local tc=g:GetFirst()
local mg=Group.FromCards(c,tc)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_LEVEL)
e1:SetValue(c17032610.slevel)
tc:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
function c17032610.atkcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO and e:GetHandler():GetReasonCard():IsRace(RACE_DRAGON)
end
function c17032610.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(c17032610.aacon)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c17032610.aacon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
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