Commit 7fd5d511 authored by gg123gg's avatar gg123gg Committed by GitHub

Add files via upload

parent 246aacdc
--双色的连心 --双色的连心
function c12008030.initial_effect(c) function c12008030.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_TO_HAND) e0:SetCode(EVENT_TO_HAND)
e0:SetCondition(c12008030.regcon) e0:SetCondition(c12008030.regcon)
e0:SetOperation(c12008030.regop) e0:SetOperation(c12008030.regop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--spsummon
local e2=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12008030,0)) e1:SetType(EFFECT_TYPE_SINGLE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCondition(c12008030.tdcon2)
e2:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EFFECT_CHANGE_TYPE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetOperation(c12008030.value)
e2:SetTarget(c12008030.sptg1) c:RegisterEffect(e1)
e2:SetOperation(c12008030.spop1) --spsummon
c:RegisterEffect(e2) local e2=Effect.CreateEffect(c)
--Activate e2:SetDescription(aux.Stringid(12008030,0))
local e1=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(12008030,1)) e2:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYED) e2:SetTarget(c12008030.sptg1)
e1:SetCondition(aux.exccon) e2:SetOperation(c12008030.spop1)
e1:SetCondition(c12008030.condition) c:RegisterEffect(e2)
e1:SetTarget(c12008030.target) --Activate
e1:SetOperation(c12008030.operation) local e1=Effect.CreateEffect(c)
c:RegisterEffect(e1) e2:SetDescription(aux.Stringid(12008030,1))
end e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
function c12008030.tdcon2(e,tp,eg,ep,ev,re,r,rp) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
return Duel.GetFlagEffect(tp,12008030)>0 e1:SetCode(EVENT_BATTLE_DESTROYED)
end e1:SetCondition(aux.exccon)
function c12008030.regcon(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(c12008030.condition)
return re and re:GetHandler():IsSetCard(0x1fb3) e1:SetTarget(c12008030.target)
end e1:SetOperation(c12008030.operation)
function c12008030.regop(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e1)
local c=e:GetHandler() end
local e1=Effect.CreateEffect(c) function c12008030.tdcon2(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) return Duel.GetFlagEffect(tp,12008030)>0
e1:SetCode(EFFECT_PUBLIC) end
--双色的连心 function c12008030.value(e)
function c12008030.initial_effect(c) return e:GetHandler():GetType()+TYPE_QUICKPLAY
--Activate end
local e0=Effect.CreateEffect(c) function c12008030.regcon(e,tp,eg,ep,ev,re,r,rp)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) return re and re:GetHandler():IsSetCard(0x1fb3)
e0:SetCode(EVENT_TO_HAND) end
e0:SetCondition(c12008030.regcon) function c12008030.regop(e,tp,eg,ep,ev,re,r,rp)
e0:SetOperation(c12008030.regop) local c=e:GetHandler()
c:RegisterEffect(e0) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
local e1=Effect.CreateEffect(c) e1:SetCode(EFFECT_PUBLIC)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) c:RegisterEffect(e1)
e1:SetCondition(c12008030.tdcon2) Duel.RegisterFlagEffect(tp,12008030,RESET_PHASE+PHASE_END,0,2)
e1:SetCode(EFFECT_CHANGE_TYPE) end
e1:SetOperation(c12008030.value) function c12008030.spfilter1(c,e,tp)
c:RegisterEffect(e1) return c:IsFaceup() and c:IsSetCard(0x1fb3) and c:IsLevelAbove(1)
--spsummon and Duel.IsExistingMatchingCard(c12008030.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetLevel())
local e2=Effect.CreateEffect(c) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,c,TYPE_XYZ)>0
e2:SetDescription(aux.Stringid(12008030,0)) end
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) function c12008030.spfilter2(c,e,tp,mc,level)
e2:SetType(EFFECT_TYPE_ACTIVATE) return c:IsType(TYPE_XYZ) and c:GetRank()==level --and mc:IsCanBeXyzMaterial(c)
e2:SetCode(EVENT_FREE_CHAIN) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) end
e2:SetTarget(c12008030.sptg1) function c12008030.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e2:SetOperation(c12008030.spop1) if chk==0 then return Duel.IsExistingTarget(c12008030.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
c:RegisterEffect(e2) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
--Activate Duel.SelectTarget(tp,c12008030.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local e1=Effect.CreateEffect(c) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
e2:SetDescription(aux.Stringid(12008030,1)) end
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) function c12008030.spop1(e,tp,eg,ep,ev,re,r,rp)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) if not e:GetHandler():IsRelateToEffect(e) then return end
e1:SetCode(EVENT_BATTLE_DESTROYED) local tc=Duel.GetFirstTarget()
e1:SetCondition(aux.exccon) if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
e1:SetCondition(c12008030.condition) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
e1:SetTarget(c12008030.target) local g=Duel.SelectMatchingCard(tp,c12008030.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetAttribute())
e1:SetOperation(c12008030.operation) local sc=g:GetFirst()
c:RegisterEffect(e1) if sc then
end local mg=tc:GetOverlayGroup()
function c12008030.tdcon2(e,tp,eg,ep,ev,re,r,rp) if mg:GetCount()~=0 then
return Duel.GetFlagEffect(tp,12008030)>0 Duel.Overlay(sc,mg)
end end
function c12008030.value(e) sc:SetMaterial(Group.FromCards(tc))
return e:GetHandler():GetType()+TYPE_QUICKPLAY Duel.Overlay(sc,Group.FromCards(tc))
end Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
function c12008030.regcon(e,tp,eg,ep,ev,re,r,rp) sc:CompleteProcedure()
return re and re:GetHandler():IsSetCard(0x1fb3) end
end end
function c12008030.regop(e,tp,eg,ep,ev,re,r,rp) function c12008030.cfilter(c,tp)
local c=e:GetHandler() return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp
local e1=Effect.CreateEffect(c) end
e1:SetType(EFFECT_TYPE_SINGLE) function c12008030.condition(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_PUBLIC) return eg:IsExists(c12008030.cfilter,1,nil,tp)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2) end
c:RegisterEffect(e1) function c12008030.spfilter(c,e,tp)
Duel.RegisterFlagEffect(tp,12008030,RESET_PHASE+PHASE_END,0,2) return c:IsLevelBelow(4) and c:IsSetCard(0x8fbd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c12008030.spfilter1(c,e,tp) function c12008030.target(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsFaceup() and c:IsSetCard(0x1fb3) and c:IsLevelAbove(1) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12008030.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetLevel()) and Duel.IsExistingMatchingCard(c12008030.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,c,TYPE_XYZ)>0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c12008030.spfilter2(c,e,tp,mc,level) function c12008030.operation(e,tp,eg,ep,ev,re,r,rp)
return c:IsType(TYPE_XYZ) and c:GetRank()==level --and mc:IsCanBeXyzMaterial(c) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
end local g=Duel.SelectMatchingCard(tp,c12008030.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
function c12008030.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if g:GetCount()~=0 then
if chk==0 then return Duel.IsExistingTarget(c12008030.spfilter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) end
Duel.SelectTarget(tp,c12008030.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) \ No newline at end of file
end
function c12008030.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12008030.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetAttribute())
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function c12008030.cfilter(c,tp)
return c:IsReason(REASON_BATTLE) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp
end
function c12008030.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c12008030.cfilter,1,nil,tp)
end
function c12008030.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x8fbd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12008030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12008030.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c12008030.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12008030.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()~=0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
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