Commit 8bb6b986 authored by Nemo Ma's avatar Nemo Ma

maint

parent 2beceef1
......@@ -12,6 +12,8 @@
130002004 0
130002005 0
#WILD, I say WILD, WAHAHA
60002084 0
9981625 0
575513 0
700021 0
700022 0
......@@ -856,6 +858,17 @@
30015045 0
30015080 0
30015100 0
#220828
89390000 0
89390001 0
89390002 0
89390003 0
31400053 0
33712019 0
40009788 0
72413450 0
40008677 1
40008688 1
#220821
9951001 0
53087982 0
......@@ -1687,7 +1700,6 @@
60001048 0
10700280 0
22050340 0
31400073 0
40008312 0
65010023 0
82224035 0
......
No preview for this file type
No preview for this file type
......@@ -51,6 +51,12 @@ function cm.redop(e,tp,eg,ep,ev,re,r,rp)
local e2=e1:Clone()
e2:SetOwnerPlayer(1)
Duel.RegisterEffect(e2,1)
local e3=e1:Clone()
e3:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e3,0)
local e4=e2:Clone()
e4:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e4,1)
cm.reg=true
end
function cm.filter(c,e,tp)
......
......@@ -52,6 +52,7 @@ function cm.initial_effect(c)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e4:SetCountLimit(1,m)
e4:SetCondition(cm.spcon)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
......@@ -66,12 +67,12 @@ function cm.srgfilter(g,lv)
return g:GetSum(Card.GetLevel)<=lv
end
function cm.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(cm.srfilter,tp,LOCATION_DECK,0,nil):FilterCount(Card.IsLevelBelow,nil,e:GetHandler():GetLevel()) end
if chk==0 then return Duel.GetMatchingGroup(cm.srfilter,tp,LOCATION_DECK,0,nil):CheckSubGroup(cm.srgfilter,nil,nil,e:GetHandler():GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(cm.srfilter,tp,LOCATION_DECK,0,nil):Filter(Card.IsLevelBelow,nil,e:GetHandler():GetLevel())
local g=Duel.GetMatchingGroup(cm.srfilter,tp,LOCATION_DECK,0,nil)
aux.GCheckAdditional=aux.dncheck
local tg=g:SelectSubGroup(tp,cm.srgfilter,false,1,#g,e:GetHandler():GetLevel())
aux.GCheckAdditional=nil
......@@ -83,6 +84,9 @@ end
function cm.exrmtg(e,c)
return c:IsSetCard(0x138)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
......
This diff is collapsed.
......@@ -59,7 +59,7 @@ function cm.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.ConfirmCards(1-tp,Duel.GetFieldGroup(tp,LOCATION_DECK,0))
if (not Duel.IsExistingMatchingCard(cm.xxfilter,tp,LOCATION_DECK,0,1,nil)) or (Duel.IsExistingMatchingCard(cm.mkfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.ttkfilter,tp,LOCATION_SZONE,0,1,nil)) then
if not Duel.IsExistingMatchingCard(cm.xxfilter,tp,LOCATION_DECK,0,1,nil) then
e:SetLabel(1)
end
end
......
--术结天缘 安贝尔·洛奇
function c67200400.initial_effect(c)
--Pendulum Summon
c:EnableCounterPermit(0x1,LOCATION_PZONE)
c:SetCounterLimit(0x1,6)
aux.EnablePendulumAttribute(c)
--Add Counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_PZONE)
e2:SetOperation(c67200400.counterop)
c:RegisterEffect(e2)
--pendulum scale down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetRange(LOCATION_PZONE)
e3:SetValue(c67200400.scaledown)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e4)
--draw & draw
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200400,0))
e5:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_PZONE)
e5:SetCost(c67200400.drcost)
e5:SetTarget(c67200400.drtg)
e5:SetOperation(c67200400.drop)
c:RegisterEffect(e5)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(67200400,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_TO_HAND)
e6:SetCountLimit(1,67200400)
e6:SetCondition(c67200400.spcon)
e6:SetTarget(c67200400.sptg)
e6:SetOperation(c67200400.spop)
c:RegisterEffect(e6)
end
function c67200400.counterop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
e:GetHandler():AddCounter(0x1,2)
end
end
--
function c67200400.scaledown(e,c)
return -c:GetCounter(0x1)
end
--
function c67200400.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,6,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1,6,REASON_COST)
end
function c67200400.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c67200400.drop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.Draw(tp,1,REASON_EFFECT)
if ct==0 then return end
local dc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,dc)
if dc:IsSetCard(0x5671) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--
function c67200400.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT)~=0 and re:GetHandler():IsSetCard(0x5671)
and c:IsPreviousLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsPreviousControler(tp)
end
function c67200400.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200400.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--术结天缘 莉鹭·弗洛拉
function c67200401.initial_effect(c)
--Pendulum Summon
c:EnableCounterPermit(0x1,LOCATION_PZONE)
c:SetCounterLimit(0x1,6)
aux.EnablePendulumAttribute(c)
--Add Counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_PZONE)
e2:SetOperation(c67200401.counterop)
c:RegisterEffect(e2)
--pendulum scale up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetRange(LOCATION_PZONE)
e3:SetValue(c67200401.scaleup)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e4)
--send to grave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200401,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_PZONE)
e5:SetCost(c67200401.thcost)
e5:SetTarget(c67200401.thtg)
e5:SetOperation(c67200401.thop)
c:RegisterEffect(e5)
--cant be Destroy(effect)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(67200401,1))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCountLimit(1,67200401)
e6:SetCondition(c67200401.immcon)
e6:SetOperation(c67200401.immop)
c:RegisterEffect(e6)
end
function c67200401.counterop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
e:GetHandler():AddCounter(0x1,2)
end
end
--
function c67200401.scaleup(e,c)
return c:GetCounter(0x1)
end
--
function c67200401.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,6,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1,6,REASON_COST)
end
function c67200401.thfilter2(c,e,tp)
return c:IsSetCard(0x7671) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or
(c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
end
function c67200401.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c67200401.thfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c67200401.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200401.thfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
--Duel.DisableShuffleCheck()
end
--
function c67200401.immcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c67200401.immop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c67200401.target)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,67200401,RESET_PHASE+PHASE_END,0,1)
end
function c67200401.target(e,c)
return c:IsSetCard(0x7671)
end
--术结天缘骑 煌磷结骑
function c67200402.initial_effect(c)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
--destroy & setPendulum
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200402,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200402)
e1:SetCondition(c67200402.pccon)
e1:SetTarget(c67200402.pctg)
e1:SetOperation(c67200402.pcop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200402,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c67200402.sptg)
e2:SetOperation(c67200402.spop)
c:RegisterEffect(e2)
end
function c67200402.pccon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c67200402.pcfilter(c)
return c:IsCode(67200401) and not c:IsForbidden() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup())
end
function c67200402.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c67200402.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_PZONE)
end
function c67200402.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200402.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--
function c67200402.spfilter(c,e,tp)
return c:IsCode(67200401) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200402.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(c67200402.spfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECKBOT)
end
function c67200402.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:GetCode()==67200401 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local gg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local gg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil)
gg:Merge(gg2)
if gg:GetCount()>0 then
Duel.SendtoHand(gg,nil,REASON_EFFECT)
end
end
end
--术结天缘骑 冥磷结骑
function c67200403.initial_effect(c)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
--destroy & setPendulum
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200403,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200403)
e1:SetCondition(c67200403.pccon)
e1:SetTarget(c67200403.pctg)
e1:SetOperation(c67200403.pcop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200403,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c67200403.sptg)
e2:SetOperation(c67200403.spop)
c:RegisterEffect(e2)
end
function c67200403.pccon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c67200403.pcfilter(c)
return c:IsCode(67200401) and not c:IsForbidden() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup())
end
function c67200403.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c67200403.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_PZONE)
end
function c67200403.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200403.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--
function c67200403.spfilter(c,e,tp)
return c:IsCode(67200401) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200403.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(c67200403.spfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECKBOT)
end
function c67200403.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:GetCode()==67200401 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local gg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local gg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,0,1,1,nil)
gg:Merge(gg2)
if gg:GetCount()>0 then
Duel.Destroy(gg,REASON_EFFECT)
end
end
end
--术结天缘 静寂咏唱
function c67200404.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200404+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c67200404.target)
e1:SetOperation(c67200404.operation)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200404,1))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,67200405)
e2:SetTarget(c67200404.thtg)
e2:SetOperation(c67200404.thop)
c:RegisterEffect(e2)
end
--
function c67200404.thfilter(c,e,tp)
return c:IsSetCard(0x5671) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c67200404.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200404.thfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECKBOT)
end
function c67200404.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
--Duel.MoveSequence(tc,1)
if tc:IsType(TYPE_MONSTER) and tc:IsSetCard(0x5671) then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local ct=tc:GetLevel()
if ct>0 and Duel.GetMatchingGroupCount(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,nil,0x1,1)>0
and Duel.SelectYesNo(tp,aux.Stringid(67200404,0)) then
while ct>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local ttc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,1,1,nil,0x1,1):GetFirst()
if not ttc then break end
ttc:AddCounter(0x1,1)
ct=ct-1
end
end
end
Duel.BreakEffect()
c:CancelToGrave()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--
function c67200404.thfilter1(c)
return c:IsSetCard(0x5671) and c:IsAbleToDeck()
end
function c67200404.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200404.thfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,0,0x1,1,REASON_COST) end
--
local g=Duel.GetMatchingGroup(c67200404.thfilter1,tp,LOCATION_GRAVE,0,nil)
local count=g:GetCount()
local lvt={}
while count>0 do
local tlv=count
lvt[tlv]=tlv
count=count-1
end
local pc=1
for i=1,g:GetCount() do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
--
local dgc=Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x1)
local lvt2={}
while dgc>0 do
local tlv2=dgc
lvt2[tlv2]=tlv2
dgc=dgc-1
end
local pc2=1
for i2=1,Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x1) do
if lvt2[i2] then lvt2[i2]=nil lvt2[pc2]=i2 pc2=pc2+1 end
end
lvt2[pc2]=nil
--
if g:GetCount()>16 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200404,2))
local lv0=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
Duel.RemoveCounter(tp,1,0,0x1,lv0,REASON_COST)
e:SetLabel(lv0)
else
if g:GetCount()>dgc then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200404,2))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.RemoveCounter(tp,1,0,0x1,lv,REASON_COST)
e:SetLabel(lv)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200404,2))
local lv2=Duel.AnnounceNumber(tp,table.unpack(lvt2))
Duel.RemoveCounter(tp,1,0,0x1,lv2,REASON_COST)
e:SetLabel(lv2)
end
end
end
function c67200404.thop(e,tp,eg,ep,ev,re,r,rp)
local lv3=e:GetLabel()
--if not Duel.IsCanRemoveCounter(tp,1,0,0x1,lv3,REASON_COST) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c67200404.thfilter1,tp,LOCATION_GRAVE,0,lv3,lv3,nil)
if g:GetCount()>0 then
--Duel.ConfirmCards(1-tp,g)
Duel.DisableShuffleCheck()
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct==0 then return end
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
--术结天缘 水泡冲击
function c67200406.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200406+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c67200406.target)
e1:SetOperation(c67200406.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200406,1))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,67200407)
e2:SetTarget(c67200406.thtg)
e2:SetOperation(c67200406.thop)
c:RegisterEffect(e2)
end
--
function c67200406.cfilter(c)
return c:IsSetCard(0x5671) and c:IsFaceup()
end
function c67200406.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(c67200406.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if chk==0 then return ct>0
and Duel.IsExistingMatchingCard(nil,r,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
local rec=ct*500
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c67200406.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(c67200406.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,c)
Duel.Destroy(g,REASON_EFFECT)
Duel.Recover(tp,ct*500,REASON_EFFECT)
--
Duel.BreakEffect()
c:CancelToGrave()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--
function c67200406.thfilter1(c)
return c:IsSetCard(0x5671) and c:IsAbleToDeck()
end
function c67200406.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200406.thfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,0,0x1,1,REASON_COST) end
--
local g=Duel.GetMatchingGroup(c67200406.thfilter1,tp,LOCATION_GRAVE,0,nil)
local count=g:GetCount()
local lvt={}
while count>0 do
local tlv=count
lvt[tlv]=tlv
count=count-1
end
local pc=1
for i=1,g:GetCount() do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
--
local dgc=Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x1)
local lvt2={}
while dgc>0 do
local tlv2=dgc
lvt2[tlv2]=tlv2
dgc=dgc-1
end
local pc2=1
for i2=1,Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x1) do
if lvt2[i2] then lvt2[i2]=nil lvt2[pc2]=i2 pc2=pc2+1 end
end
lvt2[pc2]=nil
--
if g:GetCount()>16 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200406,2))
local lv0=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
Duel.RemoveCounter(tp,1,0,0x1,lv0,REASON_COST)
e:SetLabel(lv0)
else
if g:GetCount()>dgc then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200406,2))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.RemoveCounter(tp,1,0,0x1,lv,REASON_COST)
e:SetLabel(lv)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200406,2))
local lv2=Duel.AnnounceNumber(tp,table.unpack(lvt2))
Duel.RemoveCounter(tp,1,0,0x1,lv2,REASON_COST)
e:SetLabel(lv2)
end
end
end
function c67200406.thop(e,tp,eg,ep,ev,re,r,rp)
local lv3=e:GetLabel()
--if not Duel.IsCanRemoveCounter(tp,1,0,0x1,lv3,REASON_COST) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c67200406.thfilter1,tp,LOCATION_GRAVE,0,lv3,lv3,nil)
if g:GetCount()>0 then
--Duel.ConfirmCards(1-tp,g)
Duel.DisableShuffleCheck()
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct==0 then return end
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
--术结天缘 残光相依
function c67200408.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_LIMIT_ZONE)
e1:SetCountLimit(1,67200408+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c67200408.target)
e1:SetOperation(c67200408.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200408,1))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,67200409)
e2:SetTarget(c67200408.thtg)
e2:SetOperation(c67200408.thop)
c:RegisterEffect(e2)
end
function c67200408.filter(c)
return c:IsCode(67200400) and not c:IsForbidden() and c:IsAbleToHand()
end
function c67200408.filter2(c)
return c:IsCode(67200401) and not c:IsForbidden() and c:IsAbleToHand()
end
function c67200408.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200408.filter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c67200408.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200408.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c67200408.filter,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c67200408.filter2,tp,LOCATION_DECK,0,nil)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.ConfirmCards(1-tp,sg1)
Duel.ShuffleDeck(tp)
local cg=sg1:Select(1-tp,1,1,nil)
local tc=cg:GetFirst()
Duel.Hint(HINT_CARD,0,tc:GetCode())
if tc then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
Duel.BreakEffect()
c:CancelToGrave()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--
function c67200408.thfilter1(c)
return c:IsSetCard(0x5671) and c:IsAbleToDeck()
end
function c67200408.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200408.thfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsCanRemoveCounter(tp,1,0,0x1,1,REASON_COST) end
--
local g=Duel.GetMatchingGroup(c67200408.thfilter1,tp,LOCATION_GRAVE,0,nil)
local count=g:GetCount()
local lvt={}
while count>0 do
local tlv=count
lvt[tlv]=tlv
count=count-1
end
local pc=1
for i=1,g:GetCount() do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
--
local dgc=Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x1)
local lvt2={}
while dgc>0 do
local tlv2=dgc
lvt2[tlv2]=tlv2
dgc=dgc-1
end
local pc2=1
for i2=1,Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x1) do
if lvt2[i2] then lvt2[i2]=nil lvt2[pc2]=i2 pc2=pc2+1 end
end
lvt2[pc2]=nil
--
if g:GetCount()>16 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200408,2))
local lv0=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
Duel.RemoveCounter(tp,1,0,0x1,lv0,REASON_COST)
e:SetLabel(lv0)
else
if g:GetCount()>dgc then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200408,2))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.RemoveCounter(tp,1,0,0x1,lv,REASON_COST)
e:SetLabel(lv)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200408,2))
local lv2=Duel.AnnounceNumber(tp,table.unpack(lvt2))
Duel.RemoveCounter(tp,1,0,0x1,lv2,REASON_COST)
e:SetLabel(lv2)
end
end
end
function c67200408.thop(e,tp,eg,ep,ev,re,r,rp)
local lv3=e:GetLabel()
--if not Duel.IsCanRemoveCounter(tp,1,0,0x1,lv3,REASON_COST) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c67200408.thfilter1,tp,LOCATION_GRAVE,0,lv3,lv3,nil)
if g:GetCount()>0 then
--Duel.ConfirmCards(1-tp,g)
Duel.DisableShuffleCheck()
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct==0 then return end
Duel.SortDecktop(tp,tp,ct)
for i=1,ct do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
end
--术结天缘 兹娜米亚
function c67200410.initial_effect(c)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
--destroy & search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200410,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200410)
e1:SetTarget(c67200410.thtg)
e1:SetOperation(c67200410.thop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200410,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetTarget(c67200410.eqtg)
e2:SetOperation(c67200410.eqop)
c:RegisterEffect(e2)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200410,2))
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c67200410.tdcon)
e5:SetOperation(c67200410.tdop)
c:RegisterEffect(e5)
end
--
function c67200410.thfilter(c)
return c:IsCode(67200411) and c:IsAbleToHand()
end
function c67200410.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c67200410.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200410.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(c67200410.thfilter,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--cant pendulum summon
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c67200410.splimit)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c67200410.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
--
function c67200410.filter(c)
return c:IsFaceup() and not c:IsCode(67200410)
end
function c67200410.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c67200410.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c67200410.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c67200410.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c67200410.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c67200410.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
--change code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(67200410)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
function c67200410.eqlimit(e,c)
return c==e:GetLabelObject()
end
--
function c67200410.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c67200410.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--术结天怨 魔封炼之齐亚丽
function c67200411.initial_effect(c)
c:SetSPSummonOnce(67200411)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
--destroy & search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200411,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200411)
e1:SetTarget(c67200411.sptg)
e1:SetOperation(c67200411.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200411,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c67200411.thtg)
e2:SetOperation(c67200411.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200411,2))
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c67200411.tdcon)
e5:SetOperation(c67200411.tdop)
c:RegisterEffect(e5)
end
--
function c67200411.spfilter(c)
return c:IsCode(67200410)
end
function c67200411.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(c67200411.spfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200411.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:GetCode()==67200410 then
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--cant pendulum summon
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c67200411.splimit)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c67200411.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
--
function c67200411.thfilter(c,e,tp)
return c:IsAbleToHand()
end
function c67200411.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200411.thfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECKBOT)
end
function c67200411.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
--Duel.MoveSequence(tc,1)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--
function c67200411.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c67200411.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--术结天怨魔 兹娜米亚
function c67200412.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,67200410,aux.FilterBoolFunction(c67200412.ffilter),1,true,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_ONFIELD,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c67200412.spcon)
e3:SetTarget(c67200412.sptg)
e3:SetOperation(c67200412.spop)
c:RegisterEffect(e3)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200412,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c67200412.descon)
e2:SetTarget(c67200412.destg)
e2:SetOperation(c67200412.desop)
c:RegisterEffect(e2)
end
function c67200412.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
end
--
function c67200412.ccfilter(c)
return c:IsPreviousLocation(LOCATION_EXTRA)
end
function c67200412.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200412.ccfilter,1,nil,tp)
end
function c67200412.spfilter(c,e,tp)
return c:IsCode(67200410) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200412.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(c67200412.spfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECKBOT)
end
function c67200412.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:GetCode()==67200410 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--
function c67200412.cfilter(c,tp)
return c:IsFaceup() and c:IsCode(67200410) and c:IsSummonPlayer(tp)
end
function c67200412.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200412.cfilter,1,nil,tp)
end
function c67200412.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67200412.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--枢冥的契约箱 维尔奇斯
function c67200414.initial_effect(c)
c:EnableCounterPermit(0x1)
--remove and add counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c67200414.target)
e1:SetOperation(c67200414.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,67200414)
e2:SetCondition(c67200414.thcon)
e2:SetTarget(c67200414.thtg)
e2:SetOperation(c67200414.thop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_DESTROYED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c67200414.discon)
e3:SetOperation(c67200414.disop)
c:RegisterEffect(e3)
end
function c67200414.rmfilter(c)
return c:IsAbleToGrave() and c:IsSetCard(0x5671) and c:IsType(TYPE_MONSTER)
end
function c67200414.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200414.rmfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c67200414.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c67200414.rmfilter,tp,LOCATION_DECK,0,1,1,nil)
local tg=g:GetFirst()
if tg==nil then return end
Duel.SendtoGrave(tg,REASON_EFFECT)
e:SetLabelObject(tg)
e:GetHandler():RegisterFlagEffect(67200414,RESET_EVENT+0x1e60000,0,1)
tg:RegisterFlagEffect(67200414,RESET_EVENT+RESETS_STANDARD,0,1)
local ct=tg:GetLevel()
if c:IsFaceup() and c:IsRelateToEffect(e) and ct>0 then
c:AddCounter(0x1,ct)
end
end
--
function c67200414.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and e:GetHandler():GetCounter(0x1)<1 and e:GetHandler():GetFlagEffect(67200414)~=0
end
function c67200414.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject():GetLabelObject()
if chk==0 then return tc and tc:GetFlagEffect(67200414)~=0 and tc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function c67200414.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject():GetLabelObject()
if tc:GetFlagEffect(67200414)~=0 and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
end
end
--
function c67200414.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1)>9
end
function c67200414.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
while tc and tc:IsControler(1-tp) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x17a0000)
tc:RegisterEffect(e2)
tc=eg:GetNext()
end
end
--术结天缘 残影之鲁歇奴
function c67200415.initial_effect(c)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
--e1:SetDescription(aux.Stringid(67200415,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200415)
e1:SetTarget(c67200415.thtg)
e1:SetOperation(c67200415.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200415,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCost(c67200415.spcost)
e2:SetTarget(c67200415.sptg)
e2:SetOperation(c67200415.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200415,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c67200415.destg)
e3:SetOperation(c67200415.desop)
c:RegisterEffect(e3)
--to deck bottom
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200415,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetTarget(c67200415.dttg)
e4:SetOperation(c67200415.dtop)
c:RegisterEffect(e4)
end
function c67200415.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_SZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_SZONE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,2,0,0)
end
function c67200415.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c67200415.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,9,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,9,REASON_COST)
end
function c67200415.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200415.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200415.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67200415.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local ct=g:GetFirst():GetLevel()
if ct>0 and Duel.GetMatchingGroupCount(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,nil,0x1,1)>0
and Duel.SelectYesNo(tp,aux.Stringid(67200415,4)) then
while ct>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local ttc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,1,1,nil,0x1,1):GetFirst()
if not ttc then break end
ttc:AddCounter(0x1,1)
ct=ct-1
end
end
end
end
end
--
function c67200415.dttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x5671) end
end
function c67200415.dtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200415,3))
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x5671)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
end
end
--local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
--术结天缘 敕封之维涅亚
function c67200416.initial_effect(c)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200416,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200416)
e1:SetTarget(c67200416.thtg)
e1:SetOperation(c67200416.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200416,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA+LOCATION_GRAVE)
e2:SetCost(c67200416.spcost)
e2:SetTarget(c67200416.sptg)
e2:SetOperation(c67200416.spop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200416,2))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1)
e3:SetTarget(c67200416.rmtg)
e3:SetOperation(c67200416.rmop)
c:RegisterEffect(e3)
--to deck bottom
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200416,3))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetTarget(c67200416.dttg)
e5:SetOperation(c67200416.dtop)
c:RegisterEffect(e5)
end
function c67200416.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_SZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_SZONE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,2,0,0)
end
function c67200416.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--
function c67200416.rfilter(c)
return c:IsFaceup()
end
function c67200416.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c67200416.rfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67200416.rfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c67200416.rfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c67200416.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(67200416,RESET_EVENT+RESET_TURN_SET+RESET_OVERLAY+RESET_MSCHANGE,EFFECT_FLAG_CLIENT_HINT,1,fid,aux.Stringid(67200416,5))
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetOperation(c67200416.damop)
Duel.RegisterEffect(e3,tp)
end
end
function c67200416.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not eg:IsContains(tc) then return end
if tc:GetFlagEffectLabel(67200416)~=e:GetLabel() then
e:Reset()
return
end
Duel.Hint(HINT_CARD,0,67200416)
Duel.Damage(tc:GetPreviousControler(),tc:GetBaseAttack(),REASON_EFFECT)
tc:ResetFlagEffect(67200416)
e:Reset()
end
--
function c67200416.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,9,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,9,REASON_COST)
end
function c67200416.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return ((c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or
(c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200416.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
--
function c67200416.dttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x5671) end
end
function c67200416.dtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200416,4))
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x5671)
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end
--术结天缘 夏尔迪兰
function c67200417.initial_effect(c)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
c:EnableCounterPermit(0x1,LOCATION_MZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200417)
e1:SetTarget(c67200417.target)
e1:SetOperation(c67200417.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200417,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA+LOCATION_GRAVE)
e2:SetCountLimit(1,67200418)
e2:SetCost(c67200417.spcost)
e2:SetTarget(c67200417.sptg)
e2:SetOperation(c67200417.spop)
c:RegisterEffect(e2)
end
function c67200417.filter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsSetCard(0x5671) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200417.xyzfilter(c,mg)
return c:IsSetCard(0x5671) and c:IsXyzSummonable(mg,2,2)
end
function c67200417.mfilter1(c,mg,exg)
return mg:IsExists(c67200417.mfilter2,1,c,c,exg)
end
function c67200417.mfilter2(c,mc,exg)
return exg:IsExists(Card.IsXyzSummonable,1,nil,Group.FromCards(c,mc))
end
function c67200417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local mg=Duel.GetMatchingGroup(c67200417.filter,tp,LOCATION_PZONE,0,nil,e,tp)
local exg=Duel.GetMatchingGroup(c67200417.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and exg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=mg:FilterSelect(tp,c67200417.mfilter1,1,1,nil,mg,exg)
local tc1=sg1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=mg:FilterSelect(tp,c67200417.mfilter2,1,1,tc1,tc1,exg)
sg1:Merge(sg2)
Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0)
end
function c67200417.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200417.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c67200417.filter2,nil,e,tp)
if g:GetCount()<2 then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(c67200417.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g)
end
end
--
function c67200417.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST)
end
function c67200417.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return ((c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or
(c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200417.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
e:GetHandler():AddCounter(0x1,3)
end
end
--
--术结天缘 变异水母
function c67200419.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5671),3,2)
--destroy & search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200411,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200411)
e1:SetTarget(c67200411.sptg)
e1:SetOperation(c67200411.spop)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200419,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCost(c67200419.poscost)
e2:SetTarget(c67200419.postg)
e2:SetOperation(c67200419.posop)
c:RegisterEffect(e2)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200419,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c67200419.pencon)
e5:SetTarget(c67200419.pentg)
e5:SetOperation(c67200419.penop)
c:RegisterEffect(e5)
end
c67200419.pendulum_level=3
--
function c67200411.thfilter(c)
return c:IsSetCard(0x5671) and c:IsAbleToHand()
end
function c67200411.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(c67200411.spfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200411.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:IsSetCard(0x5671) then
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(c,tc)
end
end
--
function c67200419.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c67200419.posfilter(c)
return c:IsPosition(POS_FACEUP) and c:IsCanTurnSet()
end
function c67200419.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200419.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c67200419.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c67200419.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local pg=Duel.SelectMatchingCard(tp,c67200419.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if pg:GetCount()>0 then
Duel.HintSelection(pg)
local pc=pg:GetFirst()
if pc:IsFaceup() then
Duel.ChangePosition(pc,POS_FACEDOWN_DEFENSE)
end
end
end
--
function c67200419.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c67200419.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200419.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--术结天缘 艾鲁克利兹
function c67200420.initial_effect(c)
--Pendulum Summon
aux.EnablePendulumAttribute(c)
c:EnableCounterPermit(0x1,LOCATION_MZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200420)
e1:SetTarget(c67200420.target)
e1:SetOperation(c67200420.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200420,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,67200421)
e2:SetCost(c67200420.spcost)
e2:SetTarget(c67200420.sptg)
e2:SetOperation(c67200420.spop)
c:RegisterEffect(e2)
end
function c67200420.filter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsSetCard(0x5671) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200420.xyzfilter(c,mg)
return c:IsSetCard(0x5671) and c:IsXyzSummonable(mg,2,2)
end
function c67200420.mfilter1(c,mg,exg)
return mg:IsExists(c67200420.mfilter2,1,c,c,exg)
end
function c67200420.mfilter2(c,mc,exg)
return exg:IsExists(Card.IsXyzSummonable,1,nil,Group.FromCards(c,mc))
end
function c67200420.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local mg=Duel.GetMatchingGroup(c67200420.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local exg=Duel.GetMatchingGroup(c67200420.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and exg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=mg:FilterSelect(tp,c67200420.mfilter1,1,1,nil,mg,exg)
local tc1=sg1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=mg:FilterSelect(tp,c67200420.mfilter2,1,1,tc1,tc1,exg)
sg1:Merge(sg2)
Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0)
end
function c67200420.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200420.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c67200420.filter2,nil,e,tp)
if g:GetCount()<2 then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(c67200420.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g)
end
end
--
function c67200420.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST)
end
function c67200420.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200420.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
e:GetHandler():AddCounter(0x1,3)
end
end
--
--术结天缘 逐火之蛾
function c67200422.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5671),3,2)
--destroy & search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200422,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200422)
e1:SetTarget(c67200422.sptg)
e1:SetOperation(c67200422.spop)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200422,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_SSET+TIMING_MSET+TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCost(c67200422.descost)
e2:SetTarget(c67200422.destg)
e2:SetOperation(c67200422.desop)
c:RegisterEffect(e2)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200422,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c67200422.pencon)
e5:SetTarget(c67200422.pentg)
e5:SetOperation(c67200422.penop)
c:RegisterEffect(e5)
end
c67200422.pendulum_level=3
--
function c67200422.thfilter(c)
return c:IsSetCard(0x5671) and c:IsAbleToHand()
end
function c67200422.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(c67200422.spfilter,tp,LOCATION_DECKBOT,0,1,nil,e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200422.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:IsSetCard(0x5671) then
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(c,tc)
end
end
--
function c67200422.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c67200422.desfilter(c)
return c:IsPosition(POS_FACEDOWN)
end
function c67200422.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200422.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c67200422.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67200422.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c67200422.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--
function c67200422.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c67200422.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200422.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--术结天缘 忍苦魔精
function c67200423.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedureLevelFree(c,c67200423.mfilter,c67200423.xyzcheck,2,99)
--destroy & search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200423,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c67200423.sptg)
e1:SetOperation(c67200423.spop)
c:RegisterEffect(e1)
--copy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200423,2))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1)
e3:SetTarget(c67200423.thtg)
e3:SetOperation(c67200423.copyop)
c:RegisterEffect(e3)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200423,3))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c67200423.pencon)
e5:SetTarget(c67200423.pentg)
e5:SetOperation(c67200423.penop)
c:RegisterEffect(e5)
end
--
function c67200423.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ) and c:IsXyzType(TYPE_PENDULUM)
end
function c67200423.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
--
function c67200423.filter(c)
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_PENDULUM)
end
function c67200423.deckfilter(c)
return c:IsSetCard(0x5671)
end
function c67200423.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 and Duel.IsExistingMatchingCard(c67200423.deckfilter,tp,LOCATION_DECKBOT,0,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c67200423.filter,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200423.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:IsSetCard(0x5671) then
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200423,4))
local gg=Duel.SelectMatchingCard(tp,c67200423.filter,tp,LOCATION_GRAVE,0,1,2,nil,c)
Duel.Overlay(c,gg)
end
end
--
function c67200423.filter2(c,e)
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_PENDULUM) and c:IsLocation(LOCATION_OVERLAY)
end
function c67200423.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup()
if chk==0 then return og:GetCount()>0 end
local g=og:FilterSelect(tp,c67200423.filter2,1,1,nil,e)
Duel.SetTargetCard(g)
end
function c67200423.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
local code=tc:GetOriginalCode()
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
end
--
function c67200423.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c67200423.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200423.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--术结天缘 渴望魔精
function c67200424.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedureLevelFree(c,c67200424.mfilter,nil,2,99)
--destroy & search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200424,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c67200424.sptg)
e1:SetOperation(c67200424.spop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c67200424.atkval)
c:RegisterEffect(e2)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200424,3))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c67200424.pencon)
e5:SetTarget(c67200424.pentg)
e5:SetOperation(c67200424.penop)
c:RegisterEffect(e5)
end
--
function c67200424.mfilter(c,xyzc)
return c:IsSetCard(0x5671)
end
--
function c67200424.filter(c)
return c:IsType(TYPE_PENDULUM)
end
function c67200424.deckfilter(c)
return c:IsSetCard(0x5671)
end
function c67200424.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c67200424.filter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200424.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc=g:GetMinGroup(Card.GetSequence):GetFirst()
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,1)
if tc:IsSetCard(0x5671) then
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200424,4))
local gg=Duel.SelectMatchingCard(tp,c67200424.filter,tp,LOCATION_EXTRA,0,1,2,nil,c)
Duel.Overlay(c,gg)
end
end
--
function c67200424.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup()
local ag=Group.Filter(g,Card.IsSetCard,nil,0x5671)
local x=0
local y=0
local tc=ag:GetFirst()
while tc do
y=tc:GetBaseAttack()
x=x+y
tc=ag:GetNext()
end
return x
end
--
function c67200424.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c67200424.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200424.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--术结天缘精 库娜
function c67200425.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2,c67200425.lcheck)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,67200425)
e1:SetTarget(c67200425.pctg)
e1:SetOperation(c67200425.pcop)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200425,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,67200426)
e3:SetCondition(c67200425.thcon)
e3:SetTarget(c67200425.thtg)
e3:SetOperation(c67200425.thop)
c:RegisterEffect(e3)
end
function c67200425.lcheck(g,lc)
return g:IsExists(c67200425.matfilter,1,nil)
end
function c67200425.matfilter(c)
return c:GetCounter(0x1)>0
end
--
function c67200425.pcfilter(c)
return c:IsCode(67200427) and not c:IsForbidden() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup())
end
function c67200425.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c67200425.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_PZONE)
end
function c67200425.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200425.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--
function c67200425.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetMutualLinkedGroupCount()>0
end
function c67200425.thfilter(c)
return c:IsCode(67200428) and c:IsAbleToHand()
end
function c67200425.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c67200425.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200425.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(c67200425.thfilter,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
--术结天缘砦 古拉库纳
function c67200427.initial_effect(c)
c:EnableCounterPermit(0x1,LOCATION_PZONE)
--pendulum summon
aux.EnablePendulumAttribute(c)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_PZONE)
e3:SetOperation(c67200427.acop)
c:RegisterEffect(e3)
--to hand & spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1,67200427)
e4:SetCost(c67200427.spcost)
e4:SetTarget(c67200427.sptg)
e4:SetOperation(c67200427.spop)
c:RegisterEffect(e4)
end
function c67200427.acop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
e:GetHandler():AddCounter(0x1,1)
end
end
function c67200427.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,3,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1,3,REASON_COST)
end
function c67200427.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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200427.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5671) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c67200427.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200427.thfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--术结天缘 魔力之楔
function c67200428.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--rec or dam
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200428,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,67200428)
e1:SetTarget(c67200428.target)
e1:SetOperation(c67200428.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200428,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,67200428)
e2:SetTarget(c67200428.target2)
e2:SetOperation(c67200428.operation2)
c:RegisterEffect(e2)
end
function c67200428.filter1(c,e,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c67200428.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk+2)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c67200428.filter2(c,e,tp,mc,rk)
return c:IsRank(rk) and c:IsSetCard(0x5671) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
--
function c67200428.filter3(c,e,tp)
local rk=c:GetRank()
return rk>2 and c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c67200428.filter4,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,rk)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c67200428.filter4(c,e,tp,mc,rk)
return c:IsRankBelow(rk-2) and c:IsSetCard(0x5671) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c67200428.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c67200428.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c67200428.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c67200428.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c67200428.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
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,c67200428.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+2)
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 c67200428.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c67200428.filter3(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c67200428.filter3,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c67200428.filter3,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c67200428.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
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,c67200428.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()-2)
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 c67200429.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c67200429.lcheck)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,67200429)
e1:SetTarget(c67200429.thtg)
e1:SetOperation(c67200429.thop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c67200429.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c67200429.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x5671)
end
--
function c67200429.filter(c)
return c:IsSetCard(0x3671) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c67200429.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200429.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200429.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200429.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--
function c67200429.indtg(e,c)
return c:GetMutualLinkedGroupCount()>0
end
--术结天缘匠 阿瓦罗
function c67200430.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c67200430.lcheck)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,67200430)
e1:SetTarget(c67200430.sptg)
e1:SetOperation(c67200430.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c67200430.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function c67200430.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x5671)
end
--
function c67200430.filter(c,e,tp)
return c:IsAttack(0) and c:IsSetCard(0x5671) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c67200430.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200430.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c67200430.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200430.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(67200430,RESET_EVENT+RESETS_STANDARD,0,1)
tc:CompleteProcedure()
end
end
--
function c67200430.indtg(e,c)
return c:IsSetCard(0x5671)
end
--术结天缘 彷徨降神
function c67200431.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,67200431+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c67200431.target)
e1:SetOperation(c67200431.operation)
c:RegisterEffect(e1)
end
function c67200431.filter1(c,e,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x5671)
end
function c67200431.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c67200431.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c67200431.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,67200431) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c67200431.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
end
function c67200431.filter(c,seq)
return c:GetSequence()==seq
end
function c67200431.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,67200431)
local rk=tc:GetRank()
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local dg=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local seq=-1
local ttc=g:GetFirst()
local spcard=nil
while ttc do
if ttc:GetSequence()>seq then
seq=ttc:GetSequence()
for i=seq,0,-1 do
local mg=dg:Filter(c67200431.filter,nil,i)
Duel.MoveSequence(mg:GetFirst(),0)
end
spcard=ttc
end
ttc=g:GetNext()
end
if seq==-1 then
Duel.ConfirmDecktop(tp,dcount)
Duel.ShuffleDeck(tp)
return
end
Duel.ConfirmDecktop(tp,seq+1)
if spcard:IsCode(67200431) then
Duel.DisableShuffleCheck()
if dcount-seq==1 then Duel.Overlay(tc,spcard)
else
local gg=Duel.GetDecktopGroup(tp,seq+1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200431,4))
local ggg=gg:Select(tp,1,rk,nil)
Duel.Overlay(tc,ggg)
Group.Sub(gg,ggg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local gggg=gg:Select(tp,1,ggg:GetCount(),nil)
Duel.SendtoGrave(gggg,REASON_EFFECT)
end
end
Duel.BreakEffect()
e:GetHandler():CancelToGrave()
Duel.SendtoDeck(e:GetHandler(),nil,1,REASON_EFFECT)
end
--术结天缘 古利亚斯利皮德
function c67200432.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5671),5,2)
--destroy & search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200432,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200432)
e1:SetCondition(c67200432.spcon)
e1:SetTarget(c67200432.sptg)
e1:SetOperation(c67200432.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200432,1))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c67200432.tgcost)
e2:SetTarget(c67200432.tgtg)
e2:SetOperation(c67200432.tgop)
c:RegisterEffect(e2)
--leave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200432,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c67200432.pencon)
e5:SetTarget(c67200432.pentg)
e5:SetOperation(c67200432.penop)
c:RegisterEffect(e5)
end
c67200432.pendulum_level=5
--
function c67200432.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c67200432.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.nbcon(tp,re) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
end
function c67200432.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
rc:CancelToGrave()
Duel.Overlay(c,eg)
end
end
--
function c67200432.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
local rt=c:GetOverlayCount()
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if rt>dcount then rt=dcount end
local ct=c:RemoveOverlayCard(tp,1,rt,REASON_COST)
e:SetLabel(ct)
end
function c67200432.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=e:GetLabel()
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function c67200432.tgop(e,tp,eg,ep,ev,re,r,rp,chk)
local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,val,REASON_EFFECT)
end
--
function c67200432.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c67200432.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200432.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--术结天缘 古洛夫拉菲
function c67200433.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5671),5,2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200433)
e1:SetTarget(c67200433.chtg)
e1:SetOperation(c67200433.chop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--send to grave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(67200433,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,67200434)
e5:SetTarget(c67200433.thtg)
e5:SetOperation(c67200433.thop)
c:RegisterEffect(e5)
--leave
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(67200433,2))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCondition(c67200433.pencon)
e6:SetTarget(c67200433.pentg)
e6:SetOperation(c67200433.penop)
c:RegisterEffect(e6)
end
c67200433.pendulum_level=5
--
function c67200433.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() and not c:IsType(TYPE_TOKEN)
end
function c67200433.chtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c67200433.filter,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=eg:Filter(c67200433.filter,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200433.efilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsRelateToEffect(e) and not c:IsType(TYPE_TOKEN)
end
function c67200433.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(c67200433.efilter,nil,e)
if sg:GetCount()>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(c,sg)
end
end
--
function c67200433.thfilter2(c,e,tp)
return c:IsSetCard(0x5671) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or
(c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))
end
function c67200433.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c67200433.thfilter2,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c67200433.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200433.thfilter2,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.BreakEffect()
local mg=c:GetOverlayGroup()
if mg:GetCount()>0 then
Duel.Overlay(g:GetFirst(),mg)
end
end
--
function c67200433.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c67200433.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200433.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
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