Commit a37f24d9 authored by POLYMER's avatar POLYMER

fix

parent 0421b258
No preview for this file type
--DR-バーナー
function c98730001.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730001,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98730001)
e1:SetCost(c98730001.spcost)
e1:SetTarget(c98730001.sptg)
e1:SetOperation(c98730001.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c98730001.spcon2)
e2:SetTarget(c98730001.sptg)
e2:SetOperation(c98730001.spop)
c:RegisterEffect(e2)
--pendulum set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,98730002)
e3:SetTarget(c98730001.pctg)
e3:SetOperation(c98730001.pcop)
c:RegisterEffect(e3)
end
function c98730001.costfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsDiscardable()
end
function c98730001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c98730001.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730001.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730001.spfilter(c,e,tp)
return c:IsCode(98730013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98730001.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98730001.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstMatchingCard(c98730001.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c98730001.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c98730001.pcfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730001.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(c98730001.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730001.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():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,c98730001.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--DR-ストリーム
function c98730004.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730004,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98730004)
e1:SetCost(c98730004.spcost)
e1:SetTarget(c98730004.sptg)
e1:SetOperation(c98730004.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c98730004.spcon2)
e2:SetTarget(c98730004.sptg)
e2:SetOperation(c98730004.spop)
c:RegisterEffect(e2)
--pendulum set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,98730005)
e3:SetTarget(c98730004.pctg)
e3:SetOperation(c98730004.pcop)
c:RegisterEffect(e3)
end
function c98730004.costfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsDiscardable()
end
function c98730004.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c98730004.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730004.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730004.spfilter(c,e,tp)
return c:IsCode(98730015) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98730004.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98730004.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstMatchingCard(c98730004.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c98730004.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c98730004.pcfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730004.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(c98730004.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730004.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():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,c98730004.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--DR-リアクタン
function c98730007.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730007,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98730007)
e1:SetCost(c98730007.spcost)
e1:SetTarget(c98730007.sptg)
e1:SetOperation(c98730007.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c98730007.spcon2)
e2:SetTarget(c98730007.sptg)
e2:SetOperation(c98730007.spop)
c:RegisterEffect(e2)
--pendulum set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,98730008)
e3:SetTarget(c98730007.pctg)
e3:SetOperation(c98730007.pcop)
c:RegisterEffect(e3)
end
function c98730007.costfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsDiscardable()
end
function c98730007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c98730007.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730007.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730007.spfilter(c,e,tp)
return c:IsCode(98730019) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98730007.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98730007.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstMatchingCard(c98730007.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c98730007.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c98730007.pcfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730007.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(c98730007.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730007.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():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,c98730007.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--DR-ライトニング
function c98730010.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730010,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98730010)
e1:SetCost(c98730010.spcost)
e1:SetTarget(c98730010.sptg)
e1:SetOperation(c98730010.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c98730010.spcon2)
e2:SetTarget(c98730010.sptg)
e2:SetOperation(c98730010.spop)
c:RegisterEffect(e2)
--pendulum set
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,98730011)
e3:SetTarget(c98730010.pctg)
e3:SetOperation(c98730010.pcop)
c:RegisterEffect(e3)
end
function c98730010.costfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsDiscardable()
end
function c98730010.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable()
and Duel.IsExistingMatchingCard(c98730010.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730010.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730010.spfilter(c,e,tp)
return c:IsCode(98730017) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730010.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98730010.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98730010.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstMatchingCard(c98730010.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c98730010.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c98730010.pcfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730010.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(c98730010.pcfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730010.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():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,c98730010.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--DRブラスター
function c98730013.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730013,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,98730013)
e1:SetCost(c98730013.hspcost)
e1:SetTarget(c98730013.hsptg)
e1:SetOperation(c98730013.hspop)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,98730013)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(c98730013.retcon)
e2:SetTarget(c98730013.rettg)
e2:SetOperation(c98730013.retop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730013,3))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,98730013)
e3:SetCost(c98730013.descost)
e3:SetTarget(c98730013.destg)
e3:SetOperation(c98730013.desop)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98730013,4))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,98730013)
e4:SetTarget(c98730013.thtg)
e4:SetOperation(c98730013.thop)
c:RegisterEffect(e4)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(98730013,5))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_PZONE)
e6:SetCountLimit(1,98730014)
e6:SetCost(c98730013.hspcost2)
e6:SetTarget(c98730013.hsptg2)
e6:SetOperation(c98730013.hspop2)
c:RegisterEffect(e6)
--destroy2
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(98730013,3))
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_PZONE)
e7:SetCountLimit(1,98730014)
e7:SetCondition(c98730013.descon2)
e7:SetTarget(c98730013.destg2)
e7:SetOperation(c98730013.desop2)
c:RegisterEffect(e7)
--to hand
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetDescription(aux.Stringid(98730013,6))
e8:SetCategory(CATEGORY_TOHAND)
e8:SetCountLimit(1,98730014)
e8:SetRange(LOCATION_PZONE)
e8:SetTarget(c98730013.thtg2)
e8:SetOperation(c98730013.thop2)
c:RegisterEffect(e8)
end
function c98730013.rfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsAbleToRemoveAsCost()
end
function c98730013.hspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730013.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730013.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730013.hsptg(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 c98730013.hspop(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 c98730013.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c98730013.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c98730013.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function c98730013.dfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c98730013.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c98730013.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730013.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730013.desfilter(c)
return c:IsDestructable()
end
function c98730013.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c98730013.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98730013.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c98730013.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c98730013.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c98730013.thfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
end
function c98730013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730013.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730013.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730013.thfilter,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 c98730013.rfilter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE))
and c:IsAbleToRemoveAsCost()
end
function c98730013.hspcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730013.rfilter2,tp,LOCATION_EXTRA,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730013.rfilter2,tp,LOCATION_EXTRA,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730013.hsptg2(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 c98730013.hspop2(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 c98730013.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_FIRE)
end
function c98730013.desfilter2(c)
return c:IsDestructable()
end
function c98730013.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if chkc then return chkc:IsOnField() and c98730013.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c98730013.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,pg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c98730013.desfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,pg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,pg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c98730013.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(pg,REASON_EFFECT)==0 then return end
Duel.Destroy(tc,REASON_EFFECT)
end
function c98730013.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c98730013.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--DR-タイダル
function c98730015.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730015,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,98730015)
e1:SetCost(c98730015.hspcost)
e1:SetTarget(c98730015.hsptg)
e1:SetOperation(c98730015.hspop)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,98730015)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(c98730015.retcon)
e2:SetTarget(c98730015.rettg)
e2:SetOperation(c98730015.retop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730015,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,98730015)
e3:SetCost(c98730015.tgcost)
e3:SetTarget(c98730015.tgtg)
e3:SetOperation(c98730015.tgop)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98730015,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,98730015)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetTarget(c98730015.thtg)
e4:SetOperation(c98730015.thop)
c:RegisterEffect(e4)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(98730015,5))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_PZONE)
e6:SetCountLimit(1,98730016)
e6:SetCost(c98730015.hspcost2)
e6:SetTarget(c98730015.hsptg2)
e6:SetOperation(c98730015.hspop2)
c:RegisterEffect(e6)
--tograve2
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(98730015,2))
e7:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_PZONE)
e7:SetCountLimit(1,98730016)
e7:SetCondition(c98730015.descon2)
e7:SetTarget(c98730015.destg2)
e7:SetOperation(c98730015.desop2)
c:RegisterEffect(e7)
--to hand
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetDescription(aux.Stringid(98730015,6))
e8:SetCategory(CATEGORY_TOHAND)
e8:SetCountLimit(1,98730016)
e8:SetRange(LOCATION_PZONE)
e8:SetTarget(c98730015.thtg2)
e8:SetOperation(c98730015.thop2)
c:RegisterEffect(e8)
end
function c98730015.rfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsAbleToRemoveAsCost()
end
function c98730015.hspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730015.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730015.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730015.hsptg(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 c98730015.hspop(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 c98730015.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c98730015.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c98730015.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function c98730015.dfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c98730015.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c98730015.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730015.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730015.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c98730015.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730015.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98730015.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730015.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c98730015.thfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end
function c98730015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730015.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730015.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730015.thfilter,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 c98730015.rfilter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER))
and c:IsAbleToRemoveAsCost()
end
function c98730015.hspcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730015.rfilter2,tp,LOCATION_EXTRA,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730015.rfilter2,tp,LOCATION_EXTRA,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730015.hsptg2(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 c98730015.hspop2(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 c98730015.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_WATER)
end
function c98730015.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98730015.tgfilter,tp,LOCATION_DECK,0,1,nil) end
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,pg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98730015.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(pg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730015.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c98730015.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c98730015.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--DR-テンペスト
function c98730017.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730017,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,98730017)
e1:SetCost(c98730017.hspcost)
e1:SetTarget(c98730017.hsptg)
e1:SetOperation(c98730017.hspop)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,98730017)
e2:SetCondition(c98730017.retcon)
e2:SetTarget(c98730017.rettg)
e2:SetOperation(c98730017.retop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730017,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,98730017)
e3:SetCost(c98730017.shcost)
e3:SetTarget(c98730017.shtg)
e3:SetOperation(c98730017.shop)
c:RegisterEffect(e3)
--search 2
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98730017,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,98730017)
e4:SetTarget(c98730017.thtg)
e4:SetOperation(c98730017.thop)
c:RegisterEffect(e4)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(98730017,5))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_PZONE)
e6:SetCountLimit(1,98730018)
e6:SetCost(c98730017.hspcost2)
e6:SetTarget(c98730017.hsptg2)
e6:SetOperation(c98730017.hspop2)
c:RegisterEffect(e6)
--search2
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(98730017,2))
e7:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_PZONE)
e7:SetCountLimit(1,98730018)
e7:SetCondition(c98730017.descon2)
e7:SetTarget(c98730017.destg2)
e7:SetOperation(c98730017.desop2)
c:RegisterEffect(e7)
--to hand
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetDescription(aux.Stringid(98730017,6))
e8:SetCategory(CATEGORY_TOHAND)
e8:SetCountLimit(1,98730018)
e8:SetRange(LOCATION_PZONE)
e8:SetTarget(c98730017.thtg2)
e8:SetOperation(c98730017.thop2)
c:RegisterEffect(e8)
end
function c98730017.rfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsAbleToRemoveAsCost()
end
function c98730017.hspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730017.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730017.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730017.hsptg(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 c98730017.hspop(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 c98730017.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c98730017.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c98730017.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function c98730017.dfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c98730017.shcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c98730017.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730017.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730017.shfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c98730017.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730017.shfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730017.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730017.shfilter,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 c98730017.thfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToHand()
end
function c98730017.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730017.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730017.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730017.thfilter,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 c98730017.rfilter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND))
and c:IsAbleToRemoveAsCost()
end
function c98730017.hspcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730017.rfilter2,tp,LOCATION_EXTRA,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730017.rfilter2,tp,LOCATION_EXTRA,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730017.hsptg2(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 c98730017.hspop2(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 c98730017.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_WIND)
end
function c98730017.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98730017.shfilter,tp,LOCATION_DECK,0,1,nil) end
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,pg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730017.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(pg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730017.shfilter,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 c98730017.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c98730017.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--DR-レドックス
function c98730019.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98730019,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,98730019)
e1:SetCost(c98730019.hspcost)
e1:SetTarget(c98730019.hsptg)
e1:SetOperation(c98730019.hspop)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1,98730019)
e2:SetCondition(c98730019.retcon)
e2:SetTarget(c98730019.rettg)
e2:SetOperation(c98730019.retop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730019,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,98730019)
e3:SetCost(c98730019.spcost)
e3:SetTarget(c98730019.sptg)
e3:SetOperation(c98730019.spop)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98730019,3))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,98730019)
e4:SetTarget(c98730019.thtg)
e4:SetOperation(c98730019.thop)
c:RegisterEffect(e4)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(98730019,5))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_PZONE)
e6:SetCountLimit(1,98730020)
e6:SetCost(c98730019.hspcost2)
e6:SetTarget(c98730019.hsptg2)
e6:SetOperation(c98730019.hspop2)
c:RegisterEffect(e6)
--spsummon2
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(98730019,2))
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetRange(LOCATION_PZONE)
e7:SetCountLimit(1,98730020)
e7:SetCondition(c98730019.descon2)
e7:SetTarget(c98730019.destg2)
e7:SetOperation(c98730019.desop2)
c:RegisterEffect(e7)
--to hand
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetDescription(aux.Stringid(98730019,6))
e8:SetCategory(CATEGORY_TOHAND)
e8:SetCountLimit(1,98730020)
e8:SetRange(LOCATION_PZONE)
e8:SetTarget(c98730019.thtg2)
e8:SetOperation(c98730019.thop2)
c:RegisterEffect(e8)
end
function c98730019.rfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsAbleToRemoveAsCost()
end
function c98730019.hspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730019.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730019.rfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730019.hsptg(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 c98730019.hspop(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 c98730019.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c98730019.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c98730019.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function c98730019.dfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c98730019.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() and e:GetHandler():IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c98730019.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c98730019.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c98730019.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730019.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98730019.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730019.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730019.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730019.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98730019.thfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand()
end
function c98730019.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730019.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730019.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730019.thfilter,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 c98730019.rfilter2(c)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH))
and c:IsAbleToRemoveAsCost()
end
function c98730019.hspcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730019.rfilter2,tp,LOCATION_EXTRA,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730019.rfilter2,tp,LOCATION_EXTRA,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730019.hsptg2(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 c98730019.hspop2(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 c98730019.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_EARTH)
end
function c98730019.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98730019.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730019.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730019.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,pg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730019.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
local pg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(pg,REASON_EFFECT)==0 then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
function c98730019.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c98730019.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--XDR-ブラスター
function c98730113.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c98730113.mfilter,7,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,98730113)
e1:SetTarget(c98730113.pctg)
e1:SetOperation(c98730113.pcop)
c:RegisterEffect(e1)
--destroy pendulum
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,98730113)
e2:SetCondition(c98730113.descon)
e2:SetTarget(c98730113.destg)
e2:SetOperation(c98730113.desop)
c:RegisterEffect(e2)
--destroy monster
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730113,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,98730114)
e3:SetCost(c98730113.descost2)
e3:SetTarget(c98730113.destg2)
e3:SetOperation(c98730113.desop2)
c:RegisterEffect(e3)
--xyz charge
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,98730114)
e4:SetCondition(c98730113.thcon)
e4:SetTarget(c98730113.thtg)
e4:SetOperation(c98730113.thop)
c:RegisterEffect(e4)
--pendulum set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98730113,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,98730114)
e5:SetTarget(c98730113.pentg)
e5:SetOperation(c98730113.penop)
c:RegisterEffect(e5)
end
c98730113.pendulum_level=7
function c98730113.mfilter(c)
return c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)
end
function c98730113.pcfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730113.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(c98730113.pcfilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c98730113.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730113.pcfilter,tp,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 c98730113.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_FIRE)
end
function c98730113.desfilter(c)
return c:IsDestructable()
end
function c98730113.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c98730113.desfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingTarget(c98730113.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c98730113.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c98730113.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c98730113.descost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c98730113.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c98730113.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c98730113.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730113.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE))
end
function c98730113.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730113.thfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,2,tp,LOCATION_GRAVE)
end
function c98730113.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c98730113.thfilter,tp,LOCATION_REMOVED,0,2,2,nil)
local tc=g:GetFirst()
if g:GetCount()>0 then
while tc do
Duel.Overlay(e:GetHandler(),tc)
tc=g:GetNext()
end
end
end
function c98730113.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98730113.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--XDR-タイダル
function c98730115.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c98730115.mfilter,7,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,98730115)
e1:SetTarget(c98730115.pctg)
e1:SetOperation(c98730115.pcop)
c:RegisterEffect(e1)
--tograve pendulum
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,98730115)
e2:SetCondition(c98730115.descon)
e2:SetTarget(c98730115.destg)
e2:SetOperation(c98730115.desop)
c:RegisterEffect(e2)
--tograve monster
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730115,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,98730116)
e3:SetCost(c98730115.descost2)
e3:SetTarget(c98730115.destg2)
e3:SetOperation(c98730115.desop2)
c:RegisterEffect(e3)
--xyz charge
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,98730116)
e4:SetCondition(c98730115.thcon)
e4:SetTarget(c98730115.thtg)
e4:SetOperation(c98730115.thop)
c:RegisterEffect(e4)
--pendulum set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98730115,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,98730116)
e5:SetTarget(c98730115.pentg)
e5:SetOperation(c98730115.penop)
c:RegisterEffect(e5)
end
c98730115.pendulum_level=7
function c98730115.mfilter(c)
return c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)
end
function c98730115.pcfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730115.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(c98730115.pcfilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c98730115.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730115.pcfilter,tp,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 c98730115.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_WATER)
end
function c98730115.shfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c98730115.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(c98730115.shfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730115.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730115.shfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c98730115.descost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c98730115.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c98730115.shfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730115.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730115.shfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c98730115.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730115.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER))
end
function c98730115.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730115.thfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,2,tp,LOCATION_GRAVE)
end
function c98730115.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c98730115.thfilter,tp,LOCATION_REMOVED,0,2,2,nil)
local tc=g:GetFirst()
if g:GetCount()>0 then
while tc do
Duel.Overlay(e:GetHandler(),tc)
tc=g:GetNext()
end
end
end
function c98730115.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98730115.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--XDR-テンペスト
function c98730117.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c98730117.mfilter,7,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,98730117)
e1:SetTarget(c98730117.pctg)
e1:SetOperation(c98730117.pcop)
c:RegisterEffect(e1)
--search pendulum
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,98730117)
e2:SetCondition(c98730117.descon)
e2:SetTarget(c98730117.destg)
e2:SetOperation(c98730117.desop)
c:RegisterEffect(e2)
--search monster
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730117,0))
e3:SetCategory(CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,98730118)
e3:SetCost(c98730117.descost2)
e3:SetTarget(c98730117.destg2)
e3:SetOperation(c98730117.desop2)
c:RegisterEffect(e3)
--xyz charge
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,98730118)
e4:SetCondition(c98730117.thcon)
e4:SetTarget(c98730117.thtg)
e4:SetOperation(c98730117.thop)
c:RegisterEffect(e4)
--pendulum set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98730117,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,98730118)
e5:SetTarget(c98730117.pentg)
e5:SetOperation(c98730117.penop)
c:RegisterEffect(e5)
end
c98730117.pendulum_level=7
function c98730117.mfilter(c)
return c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)
end
function c98730117.pcfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730117.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(c98730117.pcfilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c98730117.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730117.pcfilter,tp,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 c98730117.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_WIND)
end
function c98730117.desfilter(c)
return c:IsDestructable()
end
function c98730117.shfilter2(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c98730117.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.IsExistingMatchingCard(c98730117.shfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730117.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730117.shfilter2,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
end
function c98730117.descost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c98730117.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c10002.shfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730117.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730117.shfilter2,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 c98730117.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730117.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND))
end
function c98730117.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730117.thfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,2,tp,LOCATION_GRAVE)
end
function c98730117.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c98730117.thfilter,tp,LOCATION_REMOVED,0,2,2,nil)
local tc=g:GetFirst()
if g:GetCount()>0 then
while tc do
Duel.Overlay(e:GetHandler(),tc)
tc=g:GetNext()
end
end
end
function c98730117.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98730117.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--XDR-レドックス
function c98730119.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c98730119.mfilter,7,2)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,98730119)
e1:SetTarget(c98730119.pctg)
e1:SetOperation(c98730119.pcop)
c:RegisterEffect(e1)
--spsummon pendulum
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,98730119)
e2:SetCondition(c98730119.descon)
e2:SetTarget(c98730119.destg)
e2:SetOperation(c98730119.desop)
c:RegisterEffect(e2)
--spsummon monster
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98730119,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,98730120)
e3:SetCost(c98730119.descost2)
e3:SetTarget(c98730119.destg2)
e3:SetOperation(c98730119.desop2)
c:RegisterEffect(e3)
--xyz charge
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,98730120)
e4:SetCondition(c98730119.thcon)
e4:SetTarget(c98730119.thtg)
e4:SetOperation(c98730119.thop)
c:RegisterEffect(e4)
--pendulum set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98730119,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,98730120)
e5:SetTarget(c98730119.pentg)
e5:SetOperation(c98730119.penop)
c:RegisterEffect(e5)
end
c98730119.pendulum_level=7
function c98730119.mfilter(c)
return c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98730119.pcfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730119.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(c98730119.pcfilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c98730119.pcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730119.pcfilter,tp,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 c98730119.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_EARTH)
end
function c98730119.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730119.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98730119.spfilter(chkc,e,tp) end
if chk==0 then return e:GetHandler():IsAbleToExtra() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730119.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730119.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730119.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98730119.descost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c98730119.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98730119.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730119.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730119.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730119.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c98730119.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730119.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH))
end
function c98730119.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730119.thfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,2,tp,LOCATION_GRAVE)
end
function c98730119.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c98730119.thfilter,tp,LOCATION_REMOVED,0,2,2,nil)
local tc=g:GetFirst()
if g:GetCount()>0 then
while tc do
Duel.Overlay(e:GetHandler(),tc)
tc=g:GetNext()
end
end
end
function c98730119.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c98730119.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--FDR-ブラスター
function c98730213.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--fusion material
aux.AddFusionProcFunRep(c,c98730213.ffilter,2,false)
--monster effect
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c98730213.sprcon)
e2:SetOperation(c98730213.sprop)
c:RegisterEffect(e2)
--syncro limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c98730213.synlimit)
c:RegisterEffect(e3)
--to pzone
local e4=Effect.CreateEffect(c)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c98730213.reptg)
e4:SetOperation(c98730213.repop)
c:RegisterEffect(e4)
--spsummon remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,98730213)
e5:SetCondition(c98730213.rescon)
e5:SetTarget(c98730213.restg)
e5:SetOperation(c98730213.resop)
c:RegisterEffect(e5)
--equip effect
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetValue(1400)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_EQUIP)
e7:SetCode(EFFECT_UPDATE_DEFENSE)
e7:SetValue(900)
c:RegisterEffect(e7)
--equip handler
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCategory(CATEGORY_ATKCHANGE)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetHintTiming(TIMING_DAMAGE_STEP)
e8:SetRange(LOCATION_GRAVE)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e8:SetCountLimit(1,98730213)
e8:SetCondition(c98730213.ehcon)
e8:SetCost(c98730213.ehcost)
e8:SetTarget(c98730213.ehtg)
e8:SetOperation(c98730213.ehop)
c:RegisterEffect(e8)
--destroy
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_IGNITION)
e9:SetRange(LOCATION_SZONE)
e9:SetCategory(CATEGORY_DESTROY)
e9:SetProperty(EFFECT_FLAG_CARD_TARGET)
e9:SetCountLimit(1,98730213)
e9:SetTarget(c98730213.destg)
e9:SetOperation(c98730213.desop)
c:RegisterEffect(e9)
--pendulum effect
--equip
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(98730213,0))
e10:SetType(EFFECT_TYPE_IGNITION)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET)
e10:SetCategory(CATEGORY_EQUIP)
e10:SetRange(LOCATION_PZONE)
e10:SetCountLimit(1,98730214)
e10:SetTarget(c98730213.eqtg)
e10:SetOperation(c98730213.eqop)
c:RegisterEffect(e10)
--pendulum set
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(98730213,1))
e11:SetCategory(CATEGORY_DESTROY)
e11:SetType(EFFECT_TYPE_IGNITION)
e11:SetRange(LOCATION_PZONE)
e11:SetCountLimit(1,98730214)
e11:SetCondition(c98730213.pencon)
e11:SetTarget(c98730213.pentg)
e11:SetOperation(c98730213.penop)
c:RegisterEffect(e11)
end
--fusion material
function c98730213.ffilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and not c:IsType(TYPE_FUSION)
end
--special summon rule
function c98730213.fcfilter(c,tp,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
end
function c98730213.fcfilterx(c,tp,fc)
local mg=Group.FromCards(c,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c98730213.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,mg,tp,c)
end
function c98730213.sprcon(e,c)
if c==nil then return true end
if c:IsFaceup() then return false end
local tp=c:GetControler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
return Duel.IsExistingMatchingCard(c98730213.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,c,tp,c)
elseif mt==0 then
return Duel.IsExistingMatchingCard(c98730213.fcfilterx,tp,LOCATION_MZONE,0,1,c,tp,c)
and Duel.IsExistingMatchingCard(c98730213.fcfilter,tp,LOCATION_HAND,0,1,c,tp,c)
else
return Duel.IsExistingMatchingCard(c98730213.fcfilterx,tp,LOCATION_MZONE,0,2,c,tp,c)
end
end
function c98730213.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
local g=Duel.GetMatchingGroup(c98730213.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
elseif mt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730213.fcfilter,tp,LOCATION_MZONE,0,1,1,c)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c98730213.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,tc)
g2:AddCard(tc)
Duel.Remove(g2,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
else
local g=Duel.GetMatchingGroup(c98730213.fcfilter,tp,LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
end
--synchro limit
function c98730213.synlimit(e,c)
if not c then return false end
return not (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE))
end
--to pzone
function c98730213.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0)
local b2=Duel.CheckLocation(tp,LOCATION_PZONE,1)
if chk==0 then return c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) end
return b1 or b2
end
function c98730213.repop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
--remove spsummon
function c98730213.rescon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730213.spfilter(c,e,tp,lv)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE))
and c:IsLevelBelow(lv-1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730213.restg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c98730213.spfilter(chkc,e,tp,c:GetLevel()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730213.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp,c:GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730213.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,c:GetLevel())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730213.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
local lv=c:GetLevel()-tc:GetLevel()
if lv<1 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--epuip handler
function c98730213.ehcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and a:GetControler()==tp and (a:IsRace(RACE_DRAGON) or a:IsAttribute(ATTRIBUTE_FIRE)) and a:IsRelateToBattle())
or (d and d:GetControler()==tp and (d:IsRace(RACE_DRAGON) or d:IsAttribute(ATTRIBUTE_FIRE)) and d:IsRelateToBattle())
end
function c98730213.rmfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToRemoveAsCost()
end
function c98730213.ehcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730213.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730213.rmfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730213.ehtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c98730213.ehop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local a=Duel.GetAttacker()
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Equip(tp,c,a)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c98730213.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetLabelObject(a)
c:RegisterEffect(e1)
--self destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(c98730213.mtop)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
function c98730213.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c98730213.mtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
--destroy
function c98730213.desfilter(c)
return c:IsDestructable()
end
function c98730213.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and c98730213.desfilter(chkc) end
if chk==0 then return c:IsAbleToExtra() and Duel.IsExistingTarget(c98730213.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and c:GetEquipTarget() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c98730213.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c98730213.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--equip
function c98730213.filter(c)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE))
end
function c98730213.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98730213.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c98730213.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c98730213.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c98730213.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:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.SendtoGrave(c,REASON_RULE)
Duel.Equip(tp,c,tc,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c98730213.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
--pendulim set
function c98730213.setfilter(c)
return not c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730213.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730213.setfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c98730213.penfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730213.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730213.penfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730213.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,c)
if Duel.Destroy(pc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730213.penfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--FDR-タイダル
function c98730215.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--fusion material
aux.AddFusionProcFunRep(c,c98730215.ffilter,2,false)
--monster effect
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c98730215.sprcon)
e2:SetOperation(c98730215.sprop)
c:RegisterEffect(e2)
--syncro limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c98730215.synlimit)
c:RegisterEffect(e3)
--to pzone
local e4=Effect.CreateEffect(c)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c98730215.reptg)
e4:SetOperation(c98730215.repop)
c:RegisterEffect(e4)
--spsummon remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,98730215)
e5:SetCondition(c98730215.rescon)
e5:SetTarget(c98730215.restg)
e5:SetOperation(c98730215.resop)
c:RegisterEffect(e5)
--equip effect
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetValue(1300)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_EQUIP)
e7:SetCode(EFFECT_UPDATE_DEFENSE)
e7:SetValue(1000)
c:RegisterEffect(e7)
--equip hundler
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCategory(CATEGORY_ATKCHANGE)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetHintTiming(TIMING_DAMAGE_STEP)
e8:SetRange(LOCATION_GRAVE)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e8:SetCountLimit(1,98730215)
e8:SetCondition(c98730215.ehcon)
e8:SetCost(c98730215.ehcost)
e8:SetTarget(c98730215.ehtg)
e8:SetOperation(c98730215.ehop)
c:RegisterEffect(e8)
--to grave
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_IGNITION)
e9:SetRange(LOCATION_SZONE)
e9:SetCategory(CATEGORY_TOGRAVE)
e9:SetCountLimit(1,98730215)
e9:SetTarget(c98730215.tgtg)
e9:SetOperation(c98730215.tgop)
c:RegisterEffect(e9)
--pendulum effect
--equip
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(98730215,0))
e10:SetType(EFFECT_TYPE_IGNITION)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET)
e10:SetCategory(CATEGORY_EQUIP)
e10:SetRange(LOCATION_PZONE)
e10:SetCountLimit(1,98730216)
e10:SetTarget(c98730215.eqtg)
e10:SetOperation(c98730215.eqop)
c:RegisterEffect(e10)
--pendulum set
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(98730215,1))
e11:SetCategory(CATEGORY_DESTROY)
e11:SetType(EFFECT_TYPE_IGNITION)
e11:SetRange(LOCATION_PZONE)
e11:SetCountLimit(1,98730216)
e11:SetCondition(c98730215.pencon)
e11:SetTarget(c98730215.pentg)
e11:SetOperation(c98730215.penop)
c:RegisterEffect(e11)
end
--fusion material
function c98730215.ffilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and not c:IsType(TYPE_FUSION)
end
--special summon rule
function c98730215.fcfilter(c,tp,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
end
function c98730215.fcfilterx(c,tp,fc)
local mg=Group.FromCards(c,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c98730215.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,mg,tp,c)
end
function c98730215.sprcon(e,c)
if c==nil then return true end
if c:IsFaceup() then return false end
local tp=c:GetControler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
return Duel.IsExistingMatchingCard(c98730215.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,c,tp,c)
elseif mt==0 then
return Duel.IsExistingMatchingCard(c98730215.fcfilterx,tp,LOCATION_MZONE,0,1,c,tp,c)
and Duel.IsExistingMatchingCard(c98730215.fcfilter,tp,LOCATION_HAND,0,1,c,tp,c)
else
return Duel.IsExistingMatchingCard(c98730215.fcfilterx,tp,LOCATION_MZONE,0,2,c,tp,c)
end
end
function c98730215.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
local g=Duel.GetMatchingGroup(c98730215.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
elseif mt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730215.fcfilter,tp,LOCATION_MZONE,0,1,1,c)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c98730215.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,tc)
g2:AddCard(tc)
Duel.Remove(g2,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
else
local g=Duel.GetMatchingGroup(c98730215.fcfilter,tp,LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
end
--synchro limit
function c98730215.synlimit(e,c)
if not c then return false end
return not (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER))
end
--to pzone
function c98730215.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0)
local b2=Duel.CheckLocation(tp,LOCATION_PZONE,1)
if chk==0 then return c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) end
return b1 or b2
end
function c98730215.repop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
--remove spsummon
function c98730215.rescon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730215.spfilter(c,e,tp,lv)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER))
and c:IsLevelBelow(lv-1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730215.restg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c98730215.spfilter(chkc,e,tp,c:GetLevel()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730215.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp,c:GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730215.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,c:GetLevel())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730215.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
local lv=c:GetLevel()-tc:GetLevel()
if lv<1 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--epuip hundler
function c98730215.ehcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and a:GetControler()==tp and (a:IsRace(RACE_DRAGON) or a:IsAttribute(ATTRIBUTE_WATER)) and a:IsRelateToBattle())
or (d and d:GetControler()==tp and (d:IsRace(RACE_DRAGON) or d:IsAttribute(ATTRIBUTE_WATER)) and d:IsRelateToBattle())
end
function c98730215.rmfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToRemoveAsCost()
end
function c98730215.ehcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730215.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730215.rmfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730215.ehtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c98730215.ehop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local a=Duel.GetAttacker()
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Equip(tp,c,a)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c98730215.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetLabelObject(a)
c:RegisterEffect(e1)
--self destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(c98730215.mtop)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
function c98730215.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c98730215.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
--tograve
function c98730215.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c98730215.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtra() and Duel.IsExistingMatchingCard(c98730215.tgfilter,tp,LOCATION_DECK,0,1,nil) and c:GetEquipTarget() end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c98730215.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730215.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
--equip
function c98730215.filter(c)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER))
end
function c98730215.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98730215.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c98730215.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c98730215.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c98730215.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:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.SendtoGrave(c,REASON_RULE)
Duel.Equip(tp,c,tc,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c98730215.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
--pendulim set
function c98730215.setfilter(c)
return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730215.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730215.setfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c98730215.penfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730215.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730215.penfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730215.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,c)
if Duel.Destroy(pc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730215.penfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--FDR-テンペスト
function c98730217.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--fusion material
aux.AddFusionProcFunRep(c,c98730217.ffilter,2,false)
--monster effect
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c98730217.sprcon)
e2:SetOperation(c98730217.sprop)
c:RegisterEffect(e2)
--syncro limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c98730217.synlimit)
c:RegisterEffect(e3)
--to pzone
local e4=Effect.CreateEffect(c)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c98730217.reptg)
e4:SetOperation(c98730217.repop)
c:RegisterEffect(e4)
--spsummon remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,98730217)
e5:SetCondition(c98730217.rescon)
e5:SetTarget(c98730217.restg)
e5:SetOperation(c98730217.resop)
c:RegisterEffect(e5)
--equip effect
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetValue(1200)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_EQUIP)
e7:SetCode(EFFECT_UPDATE_DEFENSE)
e7:SetValue(1100)
c:RegisterEffect(e7)
--equip hundler
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCategory(CATEGORY_ATKCHANGE)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetHintTiming(TIMING_DAMAGE_STEP)
e8:SetRange(LOCATION_GRAVE)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e8:SetCountLimit(1,98730217)
e8:SetCondition(c98730217.ehcon)
e8:SetCost(c98730217.ehcost)
e8:SetTarget(c98730217.ehtg)
e8:SetOperation(c98730217.ehop)
c:RegisterEffect(e8)
--search
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_IGNITION)
e9:SetRange(LOCATION_SZONE)
e9:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e9:SetCountLimit(1,98730217)
e9:SetTarget(c98730217.shtg)
e9:SetOperation(c98730217.shop)
c:RegisterEffect(e9)
--pendulum effect
--equip
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(98730217,0))
e10:SetType(EFFECT_TYPE_IGNITION)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET)
e10:SetCategory(CATEGORY_EQUIP)
e10:SetRange(LOCATION_PZONE)
e10:SetCountLimit(1,98730218)
e10:SetTarget(c98730217.eqtg)
e10:SetOperation(c98730217.eqop)
c:RegisterEffect(e10)
--pendulum set
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(98730217,1))
e11:SetCategory(CATEGORY_DESTROY)
e11:SetType(EFFECT_TYPE_IGNITION)
e11:SetRange(LOCATION_PZONE)
e11:SetCountLimit(1,98730218)
e11:SetCondition(c98730217.pencon)
e11:SetTarget(c98730217.pentg)
e11:SetOperation(c98730217.penop)
c:RegisterEffect(e11)
end
--fusion material
function c98730217.ffilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and not c:IsType(TYPE_FUSION)
end
--special summon rule
function c98730217.fcfilter(c,tp,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
end
function c98730217.fcfilterx(c,tp,fc)
local mg=Group.FromCards(c,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c98730217.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,mg,tp,c)
end
function c98730217.sprcon(e,c)
if c==nil then return true end
if c:IsFaceup() then return false end
local tp=c:GetControler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
return Duel.IsExistingMatchingCard(c98730217.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,c,tp,c)
elseif mt==0 then
return Duel.IsExistingMatchingCard(c98730217.fcfilterx,tp,LOCATION_MZONE,0,1,c,tp,c)
and Duel.IsExistingMatchingCard(c98730217.fcfilter,tp,LOCATION_HAND,0,1,c,tp,c)
else
return Duel.IsExistingMatchingCard(c98730217.fcfilterx,tp,LOCATION_MZONE,0,2,c,tp,c)
end
end
function c98730217.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
local g=Duel.GetMatchingGroup(c98730217.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
elseif mt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730217.fcfilter,tp,LOCATION_MZONE,0,1,1,c)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c98730217.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,tc)
g2:AddCard(tc)
Duel.Remove(g2,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
else
local g=Duel.GetMatchingGroup(c98730217.fcfilter,tp,LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
end
--synchro limit
function c98730217.synlimit(e,c)
if not c then return false end
return not (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND))
end
--to pzone
function c98730217.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0)
local b2=Duel.CheckLocation(tp,LOCATION_PZONE,1)
if chk==0 then return c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) end
return b1 or b2
end
function c98730217.repop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
--remove spsummon
function c98730217.rescon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730217.spfilter(c,e,tp,lv)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND))
and c:IsLevelBelow(lv-1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730217.restg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c98730217.spfilter(chkc,e,tp,c:GetLevel()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730217.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp,c:GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730217.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,c:GetLevel())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730217.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
local lv=c:GetLevel()-tc:GetLevel()
if lv<1 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--epuip hundler
function c98730217.ehcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and a:GetControler()==tp and (a:IsRace(RACE_DRAGON) or a:IsAttribute(ATTRIBUTE_WIND)) and a:IsRelateToBattle())
or (d and d:GetControler()==tp and (d:IsRace(RACE_DRAGON) or d:IsAttribute(ATTRIBUTE_WIND)) and d:IsRelateToBattle())
end
function c98730217.rmfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToRemoveAsCost()
end
function c98730217.ehcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730217.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730217.rmfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730217.ehtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c98730217.ehop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local a=Duel.GetAttacker()
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Equip(tp,c,a)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c98730217.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetLabelObject(a)
c:RegisterEffect(e1)
--self destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(c98730217.mtop)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
function c98730217.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c98730217.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
--search
function c98730217.shfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c98730217.shtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtra() and Duel.IsExistingMatchingCard(c98730217.shfilter,tp,LOCATION_DECK,0,1,nil) and c:GetEquipTarget() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c98730217.shop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730217.shfilter,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
end
--equip
function c98730217.filter(c)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND))
end
function c98730217.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98730217.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c98730217.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c98730217.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c98730217.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:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.SendtoGrave(c,REASON_RULE)
Duel.Equip(tp,c,tc,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c98730217.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
--pendulim set
function c98730217.setfilter(c)
return not c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730217.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730217.setfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c98730217.penfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730217.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730217.penfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730217.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,c)
if Duel.Destroy(pc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730217.penfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--FDR-レドックス
function c98730219.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--fusion material
aux.AddFusionProcFunRep(c,c98730219.ffilter,2,false)
--monster effect
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c98730219.sprcon)
e2:SetOperation(c98730219.sprop)
c:RegisterEffect(e2)
--syncro limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(c98730219.synlimit)
c:RegisterEffect(e3)
--to pzone
local e4=Effect.CreateEffect(c)
e4:SetCode(EFFECT_SEND_REPLACE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c98730219.reptg)
e4:SetOperation(c98730219.repop)
c:RegisterEffect(e4)
--spsummon remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,98730219)
e5:SetCondition(c98730219.rescon)
e5:SetTarget(c98730219.restg)
e5:SetOperation(c98730219.resop)
c:RegisterEffect(e5)
--equip effect
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetValue(800)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_EQUIP)
e7:SetCode(EFFECT_UPDATE_DEFENSE)
e7:SetValue(1500)
c:RegisterEffect(e7)
--equip hundler
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCategory(CATEGORY_ATKCHANGE)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetHintTiming(TIMING_DAMAGE_STEP)
e8:SetRange(LOCATION_GRAVE)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e8:SetCountLimit(1,98730219)
e8:SetCondition(c98730219.ehcon)
e8:SetCost(c98730219.ehcost)
e8:SetTarget(c98730219.ehtg)
e8:SetOperation(c98730219.ehop)
c:RegisterEffect(e8)
--spsummon
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_IGNITION)
e9:SetRange(LOCATION_SZONE)
e9:SetProperty(EFFECT_FLAG_CARD_TARGET)
e9:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e9:SetCountLimit(1,98730219)
e9:SetTarget(c98730219.sptg)
e9:SetOperation(c98730219.spop)
c:RegisterEffect(e9)
--pendulum effect
--equip
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(98730219,0))
e10:SetType(EFFECT_TYPE_IGNITION)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET)
e10:SetCategory(CATEGORY_EQUIP)
e10:SetRange(LOCATION_PZONE)
e10:SetCountLimit(1,98730220)
e10:SetTarget(c98730219.eqtg)
e10:SetOperation(c98730219.eqop)
c:RegisterEffect(e10)
--pendulum set
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(98730219,1))
e11:SetCategory(CATEGORY_DESTROY)
e11:SetType(EFFECT_TYPE_IGNITION)
e11:SetRange(LOCATION_PZONE)
e11:SetCountLimit(1,98730220)
e11:SetCondition(c98730219.pencon)
e11:SetTarget(c98730219.pentg)
e11:SetOperation(c98730219.penop)
c:RegisterEffect(e11)
end
--fusion material
function c98730219.ffilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and not c:IsType(TYPE_FUSION)
end
--special summon rule
function c98730219.fcfilter(c,tp,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
end
function c98730219.fcfilterx(c,tp,fc)
local mg=Group.FromCards(c,fc)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and not c:IsType(TYPE_FUSION) and c:IsCanBeFusionMaterial(fc)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c98730219.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,mg,tp,c)
end
function c98730219.sprcon(e,c)
if c==nil then return true end
if c:IsFaceup() then return false end
local tp=c:GetControler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
return Duel.IsExistingMatchingCard(c98730219.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,2,c,tp,c)
elseif mt==0 then
return Duel.IsExistingMatchingCard(c98730219.fcfilterx,tp,LOCATION_MZONE,0,1,c,tp,c)
and Duel.IsExistingMatchingCard(c98730219.fcfilter,tp,LOCATION_HAND,0,1,c,tp,c)
else
return Duel.IsExistingMatchingCard(c98730219.fcfilterx,tp,LOCATION_MZONE,0,2,c,tp,c)
end
end
function c98730219.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local mt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if mt>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then
local g=Duel.GetMatchingGroup(c98730219.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
elseif mt==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730219.fcfilter,tp,LOCATION_MZONE,0,1,1,c)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c98730219.fcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,tc)
g2:AddCard(tc)
Duel.Remove(g2,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
else
local g=Duel.GetMatchingGroup(c98730219.fcfilter,tp,LOCATION_MZONE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
end
--synchro limit
function c98730219.synlimit(e,c)
if not c then return false end
return not (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH))
end
--to pzone
function c98730219.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tp=c:GetControler()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0)
local b2=Duel.CheckLocation(tp,LOCATION_PZONE,1)
if chk==0 then return c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_SYNCHRO) end
return b1 or b2
end
function c98730219.repop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
--remove spsummon
function c98730219.rescon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730219.spfilter(c,e,tp,lv)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH))
and c:IsLevelBelow(lv-1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730219.restg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c98730219.spfilter(chkc,e,tp,c:GetLevel()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730219.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp,c:GetLevel()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730219.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,c:GetLevel())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730219.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
local lv=c:GetLevel()-tc:GetLevel()
if lv<1 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--epuip hundler
function c98730219.ehcon(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and a:GetControler()==tp and (a:IsRace(RACE_DRAGON) or a:IsAttribute(ATTRIBUTE_WIND)) and a:IsRelateToBattle())
or (d and d:GetControler()==tp and (d:IsRace(RACE_DRAGON) or d:IsAttribute(ATTRIBUTE_WIND)) and d:IsRelateToBattle())
end
function c98730219.rmfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsAbleToRemoveAsCost()
end
function c98730219.ehcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730219.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730219.rmfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c98730219.ehtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c98730219.ehop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local a=Duel.GetAttacker()
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Equip(tp,c,a)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c98730219.eqlimit)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetLabelObject(a)
c:RegisterEffect(e1)
--self destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(c98730219.mtop)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2)
end
function c98730219.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c98730219.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
--spsummon
function c98730219.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730219.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98730219.spfilter2(chkc,e,tp) end
if chk==0 then return c:IsAbleToExtra() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730219.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) and c:GetEquipTarget() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730219.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c98730219.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--equip
function c98730219.filter(c)
return c:IsFaceup() and (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH))
end
function c98730219.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c98730219.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c98730219.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c98730219.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c98730219.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:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.SendtoGrave(c,REASON_RULE)
Duel.Equip(tp,c,tc,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c98730219.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
--pendulim set
function c98730219.setfilter(c)
return not c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730219.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730219.setfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c98730219.penfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c98730219.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730219.penfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c98730219.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pc=Duel.GetFirstMatchingCard(nil,tp,LOCATION_PZONE,0,c)
if Duel.Destroy(pc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730219.penfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--SDR-ブラスター
function c98730313.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c98730313.sfilter),1)
--monster effect
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98730313)
e1:SetCondition(c98730313.descon)
e1:SetTarget(c98730313.destg)
e1:SetOperation(c98730313.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730313)
e2:SetCondition(c98730313.spcon)
e2:SetTarget(c98730313.sptg)
e2:SetOperation(c98730313.spop)
c:RegisterEffect(e2)
--to pzone
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730313)
e3:SetTarget(c98730313.thtg)
e3:SetOperation(c98730313.thop)
c:RegisterEffect(e3)
--pendulum effect
--attribute
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_PZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(ATTRIBUTE_FIRE)
c:RegisterEffect(e4)
--race
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_PZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(RACE_DRAGON)
c:RegisterEffect(e5)
--level&rank
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_PZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(7)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CHANGE_RANK)
c:RegisterEffect(e7)
--xyz summon
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetProperty(EFFECT_FLAG_CARD_TARGET)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,98730314)
e8:SetCondition(c98730313.lvcon)
e8:SetTarget(c98730313.lvtg)
e8:SetOperation(c98730313.lvop)
c:RegisterEffect(e8)
end
--synchro material
function c98730313.sfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE))
end
--destroy
function c98730313.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730313.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c98730313.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--spsummon
function c98730313.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c98730313.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c98730313.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98730313.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730313.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then return end
if not Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730313.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(7)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
--to pzone
function c98730313.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE))
and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsForbidden()
end
function c98730313.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and c:IsAbleToExtra() and Duel.IsExistingMatchingCard(c98730313.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c98730313.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730313.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--xyz summon
function c98730313.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c98730313.lvfilter(c,e,tp,mc)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(c98730313.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,c,mc)
end
function c98730313.xyzfilter(c,tc,mc)
local mg=Group.FromCards(tc,mc)
return c:IsXyzSummonable(mg,2,2) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c98730313.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98730313.lvfilter(chkc,e,tp,c) end
if chk==0 then
if ft>0 then
return Duel.IsExistingTarget(c98730313.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
else
return Duel.IsExistingTarget(c98730313.lvfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,c)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if ft>0 then
local g=Duel.SelectTarget(tp,c98730313.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,c)
else
local g=Duel.SelectTarget(tp,c98730313.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,c)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730313.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 and tc:IsControler(1-tp) then return end
local mg=Group.FromCards(c,tc)
local g=Duel.GetMatchingGroup(c98730313.xyzfilter,tp,LOCATION_EXTRA,0,nil,tc,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=g:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,mg)
end
end
--SDR-タイダル
function c98730315.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c98730315.sfilter),1)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98730315)
e1:SetCondition(c98730315.descon)
e1:SetTarget(c98730315.destg)
e1:SetOperation(c98730315.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730315)
e2:SetCondition(c98730315.spcon)
e2:SetTarget(c98730315.sptg)
e2:SetOperation(c98730315.spop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730315)
e3:SetTarget(c98730315.thtg)
e3:SetOperation(c98730315.thop)
c:RegisterEffect(e3)
--attribute
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_PZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(ATTRIBUTE_WATER)
c:RegisterEffect(e4)
--race
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_PZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(RACE_DRAGON)
c:RegisterEffect(e5)
--level&rank
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_PZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(7)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CHANGE_RANK)
c:RegisterEffect(e7)
--xyz summon
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetProperty(EFFECT_FLAG_CARD_TARGET)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,98730316)
e8:SetCondition(c98730315.lvcon)
e8:SetTarget(c98730315.lvtg)
e8:SetOperation(c98730315.lvop)
c:RegisterEffect(e8)
end
--synchro material
function c98730315.sfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER))
end
--to grave
function c98730315.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730315.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c98730315.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c98730315.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98730315.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730315.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--spsummon
function c98730315.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c98730315.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c98730315.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98730315.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730315.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if not Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730315.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if g:GetCount()>0 then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(7)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
end
--to pzone
function c98730315.filter(c,e,tp)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and not c:IsForbidden()
end
function c98730315.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToExtra() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingTarget(c98730315.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c98730315.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730315.filter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--xyz summon
function c98730315.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c98730315.lvfilter(c,e,tp,mc)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(c98730315.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,c,mc)
end
function c98730313.xyzfilter(c,tc,mc)
local mg=Group.FromCards(tc,mc)
return c:IsXyzSummonable(mg,2,2) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c98730315.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98730315.lvfilter(chkc,e,tp,c) end
if chk==0 then
if ft>0 then
return Duel.IsExistingTarget(c98730315.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
else
return Duel.IsExistingTarget(c98730315.lvfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,c)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if ft>0 then
local g=Duel.SelectTarget(tp,c98730315.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,c)
else
local g=Duel.SelectTarget(tp,c98730315.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,c)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730315.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 and tc:IsControler(1-tp) then return end
local mg=Group.FromCards(c,tc)
local g=Duel.GetMatchingGroup(c98730315.xyzfilter,tp,LOCATION_EXTRA,0,nil,tc,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=g:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,mg)
end
end
--SDR-テンペスト
function c98730317.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c98730317.sfilter),1)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98730317)
e1:SetCondition(c98730317.descon)
e1:SetTarget(c98730317.destg)
e1:SetOperation(c98730317.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730317)
e2:SetCondition(c98730317.spcon)
e2:SetTarget(c98730317.sptg)
e2:SetOperation(c98730317.spop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730317)
e3:SetTarget(c98730317.thtg)
e3:SetOperation(c98730317.thop)
c:RegisterEffect(e3)
--attribute
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_PZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(ATTRIBUTE_WIND)
c:RegisterEffect(e4)
--race
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_PZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(RACE_DRAGON)
c:RegisterEffect(e5)
--level&rank
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_PZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(7)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CHANGE_RANK)
c:RegisterEffect(e7)
--xyz summon
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetProperty(EFFECT_FLAG_CARD_TARGET)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,98730318)
e8:SetCondition(c98730317.lvcon)
e8:SetTarget(c98730317.lvtg)
e8:SetOperation(c98730317.lvop)
c:RegisterEffect(e8)
end
--synchro material
function c98730317.sfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND))
end
--search
function c98730317.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730317.desfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c98730317.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c98730317.desfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98730317.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730317.desfilter,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
--spsummon
function c98730317.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c98730317.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c98730317.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98730317.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730317.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if not Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730317.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if g:GetCount()>0 then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(7)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
end
--to pzone
function c98730317.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and not c:IsForbidden()
end
function c98730317.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToExtra() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingTarget(c10388.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c98730317.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730317.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--xyz summon
function c98730317.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c98730317.lvfilter(c,e,tp,mc)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND)
and Duel.IsExistingMatchingCard(c98730317.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,c,mc)
end
function c98730313.xyzfilter(c,tc,mc)
local mg=Group.FromCards(tc,mc)
return c:IsXyzSummonable(mg,2,2) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c98730317.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98730317.lvfilter(chkc,e,tp,c) end
if chk==0 then
if ft>0 then
return Duel.IsExistingTarget(c98730317.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
else
return Duel.IsExistingTarget(c98730317.lvfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,c)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if ft>0 then
local g=Duel.SelectTarget(tp,c98730317.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,c)
else
local g=Duel.SelectTarget(tp,c98730317.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,c)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730317.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 and tc:IsControler(1-tp) then return end
local mg=Group.FromCards(c,tc)
local g=Duel.GetMatchingGroup(c98730317.xyzfilter,tp,LOCATION_EXTRA,0,nil,tc,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=g:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,mg)
end
end
--SDR-レドックス
function c98730319.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(c98730319.sfilter),1)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--spsummon grave
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_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,98730319)
e1:SetCondition(c98730319.descon)
e1:SetTarget(c98730319.destg)
e1:SetOperation(c98730319.desop)
c:RegisterEffect(e1)
--spsummon extra
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730319)
e2:SetCondition(c98730319.spcon)
e2:SetTarget(c98730319.sptg)
e2:SetOperation(c98730319.spop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730319)
e3:SetTarget(c98730319.thtg)
e3:SetOperation(c98730319.thop)
c:RegisterEffect(e3)
--attribute
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_PZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(ATTRIBUTE_EARTH)
c:RegisterEffect(e4)
--race
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_PZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetCode(EFFECT_CHANGE_RACE)
e5:SetValue(RACE_DRAGON)
c:RegisterEffect(e5)
--level&rank
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_PZONE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(7)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CHANGE_RANK)
c:RegisterEffect(e7)
--xyz summon
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetProperty(EFFECT_FLAG_CARD_TARGET)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,98730320)
e8:SetCondition(c98730319.lvcon)
e8:SetTarget(c98730319.lvtg)
e8:SetOperation(c98730319.lvop)
c:RegisterEffect(e8)
end
--synchro
function c98730319.sfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH))
end
--spsummon grave
function c98730319.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonLocation()==LOCATION_EXTRA
end
function c98730319.spfilter2(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98730319.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c98730319.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98730319.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98730319.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98730319.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--spsummon extra
function c98730319.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c98730319.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c98730319.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10388.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730319.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if not Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730319.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if g:GetCount()>0 then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(7)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
end
--to pzone
function c98730319.filter(c,e,tp)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and not c:IsForbidden()
end
function c98730319.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToExtra() and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingTarget(c98730319.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c98730319.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 then
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c98730319.filter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--xyz summon
function c98730319.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c98730319.lvfilter(c,e,tp,mc)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH)
and Duel.IsExistingMatchingCard(c98730319.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,c,mc)
end
function c98730313.xyzfilter(c,tc,mc)
local mg=Group.FromCards(tc,mc)
return c:IsXyzSummonable(mg,2,2) and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end
function c98730319.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c98730319.lvfilter(chkc,e,tp,c) end
if chk==0 then
if ft>0 then
return Duel.IsExistingTarget(c98730319.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
else
return Duel.IsExistingTarget(c98730319.lvfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,c)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if ft>0 then
local g=Duel.SelectTarget(tp,c98730319.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,c)
else
local g=Duel.SelectTarget(tp,c98730319.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,c)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98730319.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 and tc:IsControler(1-tp) then return end
local mg=Group.FromCards(c,tc)
local g=Duel.GetMatchingGroup(c98730319.xyzfilter,tp,LOCATION_EXTRA,0,nil,tc,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=g:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,mg)
end
end
--RDR-ブラスター
function c98730413.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c)
--monster effect
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98730413,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730413)
e2:SetCost(c98730413.shcost)
e2:SetTarget(c98730413.shtg)
e2:SetOperation(c98730413.shop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730413)
e3:SetCost(c98730413.thcost)
e3:SetTarget(c98730413.thtg)
e3:SetOperation(c98730413.thop)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,98730413)
e4:SetCost(c98730413.rmcost)
e4:SetTarget(c98730413.rmtg)
e4:SetOperation(c98730413.rmop)
c:RegisterEffect(e4)
--destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_SEND_REPLACE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c98730413.retcon)
e5:SetTarget(c98730413.reptg)
e5:SetOperation(c98730413.repop)
c:RegisterEffect(e5)
--pendulum effect
--disable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e7:SetRange(LOCATION_PZONE)
e7:SetCode(EFFECT_DISABLE)
e7:SetCondition(c98730413.discon)
e7:SetTarget(c98730413.disable)
c:RegisterEffect(e7)
--ritural
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,98730414)
e8:SetTarget(c98730413.sptg)
e8:SetOperation(c98730413.spop)
c:RegisterEffect(e8)
end
--to hand
function c98730413.shcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c98730413.shfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM)
and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and not c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c98730413.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730413.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c98730413.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730413.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--to grave
function c98730413.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c98730413.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsAbleToGrave()
end
function c98730413.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730413.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98730413.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730413.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--to remove
function c98730413.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c98730413.rmfilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsType(TYPE_RITUAL) and c:IsAbleToRemove()
end
function c98730413.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730413.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c98730413.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730413.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--destroy replace
function c98730413.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c98730413.retfilter(c,e,tp,mg)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function c98730413.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98730413.retfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and c:IsAbleToDeck()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (not re or re:GetOwner()~=c) end
return Duel.SelectYesNo(tp,aux.Stringid(98730413,4))
end
function c98730413.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730413.retfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--distable
function c98730413.disfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_PENDULUM)
end
function c98730413.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730413.disfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
and Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandlerPlayer()==Duel.GetTurnPlayer()
end
function c98730413.disable(e,c)
return c:IsFaceup() and not (c:IsAttribute(ATTRIBUTE_FIRE) or c:IsRace(RACE_DRAGON))
end
--ritual
function c98730413.rexfilter(c)
return c:GetFlagEffect(98730413)==0
end
function c98730413.spfilter(c,e,tp,m,ft)
if not ((c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_FIRE)) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL))
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if c:IsLocation(LOCATION_REMOVED) and c:IsFacedown() then return false end
local mx=m:Filter(Card.IsCanBeRitualMaterial,c,c)
local mg=mx:Filter(c98730413.rexfilter,nil)
if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else
return mg:IsExists(c98730413.mfilterf,1,nil,tp,mg,c)
end
end
function c98730413.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),0,99,rc)
else return false end
end
function c98730413.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c98730413.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_FIRE) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
end
c98730413.sploc_table={LOCATION_HAND,LOCATION_DECK,LOCATION_GRAVE,LOCATION_REMOVED}
function c98730413.spop(e,tp,eg,ep,ev,re,r,rp)
for i=1,4 do
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>-1 and Duel.IsExistingMatchingCard(c98730413.spfilter,tp,c98730413.sploc_table[i],0,1,nil,e,tp,mg,ft)
and (i==1 or (Duel.IsExistingMatchingCard(c98730413.disfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
and Duel.SelectYesNo(tp,aux.Stringid(98730413,i-1)))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730413.spfilter,tp,c98730413.sploc_table[i],0,1,1,nil,e,tp,mg,ft)
local tc=g:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg=mg:Filter(c98730413.rexfilter,nil)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c98730413.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
tc:RegisterFlagEffect(98730413,RESET_CHAIN,0,1)
end
end
end
Duel.SpecialSummonComplete()
end
--RDR-タイダル
function c98730415.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--monster effect
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98730415,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730415)
e2:SetCost(c98730415.shcost)
e2:SetTarget(c98730415.shtg)
e2:SetOperation(c98730415.shop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730415)
e3:SetCost(c98730415.thcost)
e3:SetTarget(c98730415.thtg)
e3:SetOperation(c98730415.thop)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,98730415)
e4:SetCost(c98730415.rmcost)
e4:SetTarget(c98730415.rmtg)
e4:SetOperation(c98730415.rmop)
c:RegisterEffect(e4)
--destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_SEND_REPLACE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c98730415.retcon)
e5:SetTarget(c98730415.reptg)
e5:SetOperation(c98730415.repop)
c:RegisterEffect(e5)
--pendulum effect
--disable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e7:SetRange(LOCATION_PZONE)
e7:SetCode(EFFECT_DISABLE)
e7:SetCondition(c98730415.discon)
e7:SetTarget(c98730415.disable)
c:RegisterEffect(e7)
--ritural
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,98730416)
e8:SetTarget(c98730415.sptg)
e8:SetOperation(c98730415.spop)
c:RegisterEffect(e8)
end
--to hand
function c98730415.shcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c98730415.shfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_PENDULUM)
and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and not c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c98730415.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730415.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c98730415.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730415.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--to grave
function c98730415.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c98730415.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsAbleToGrave()
end
function c98730415.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730415.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98730415.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730415.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--to remove
function c98730415.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c98730415.rmfilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsType(TYPE_RITUAL) and c:IsAbleToRemove()
end
function c98730415.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730415.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c98730415.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730415.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--destroy replace
function c98730415.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c98730415.retfilter(c,e,tp,mg)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function c98730415.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98730415.retfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and c:IsAbleToDeck()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (not re or re:GetOwner()~=c) end
return Duel.SelectYesNo(tp,aux.Stringid(98730415,3))
end
function c98730415.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730415.retfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--distable
function c98730415.disfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_PENDULUM)
end
function c98730415.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730415.disfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
and Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandlerPlayer()==Duel.GetTurnPlayer()
end
function c98730415.disable(e,c)
return c:IsFaceup() and not (c:IsAttribute(ATTRIBUTE_WATER) or c:IsRace(RACE_DRAGON))
end
--ritual
function c98730415.rexfilter(c)
return c:GetFlagEffect(98730415)==0
end
function c98730415.spfilter(c,e,tp,m,ft)
if not ((c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WATER)) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL))
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if c:IsLocation(LOCATION_REMOVED) and c:IsFacedown() then return false end
local mx=m:Filter(Card.IsCanBeRitualMaterial,c,c)
local mg=mx:Filter(c98730415.rexfilter,nil)
if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else
return mg:IsExists(c98730415.mfilterf,1,nil,tp,mg,c)
end
end
function c98730415.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),0,99,rc)
else return false end
end
function c98730415.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c98730415.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_WATER) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
end
c98730415.sploc_table={LOCATION_HAND,LOCATION_DECK,LOCATION_GRAVE,LOCATION_REMOVED}
function c98730415.spop(e,tp,eg,ep,ev,re,r,rp)
for i=1,4 do
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>-1 and Duel.IsExistingMatchingCard(c98730415.spfilter,tp,c98730415.sploc_table[i],0,1,nil,e,tp,mg,ft)
and (i==1 or (Duel.IsExistingMatchingCard(c98730415.disfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
and Duel.SelectYesNo(tp,aux.Stringid(98730415,i-1)))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730415.spfilter,tp,c98730415.sploc_table[i],0,1,1,nil,e,tp,mg,ft)
local tc=g:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg=mg:Filter(c98730415.rexfilter,nil)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c98730415.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
tc:RegisterFlagEffect(98730415,RESET_CHAIN,0,1)
end
end
end
Duel.SpecialSummonComplete()
end
--RDR-テンペスト
function c98730417.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c)
--monster effect
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98730417,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730417)
e2:SetCost(c98730417.shcost)
e2:SetTarget(c98730417.shtg)
e2:SetOperation(c98730417.shop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730417)
e3:SetCost(c98730417.thcost)
e3:SetTarget(c98730417.thtg)
e3:SetOperation(c98730417.thop)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,98730417)
e4:SetCost(c98730417.rmcost)
e4:SetTarget(c98730417.rmtg)
e4:SetOperation(c98730417.rmop)
c:RegisterEffect(e4)
--destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_SEND_REPLACE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c98730417.retcon)
e5:SetTarget(c98730417.reptg)
e5:SetOperation(c98730417.repop)
c:RegisterEffect(e5)
--pendulum effect
--disable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e7:SetRange(LOCATION_PZONE)
e7:SetCode(EFFECT_DISABLE)
e7:SetCondition(c98730417.discon)
e7:SetTarget(c98730417.disable)
c:RegisterEffect(e7)
--ritural
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,10405)
e8:SetTarget(c98730417.sptg)
e8:SetOperation(c98730417.spop)
c:RegisterEffect(e8)
end
--to hand
function c98730417.shcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c98730417.shfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_PENDULUM)
and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and not c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c98730417.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730417.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c98730417.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730417.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--to grave
function c98730417.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c98730417.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsAbleToGrave()
end
function c98730417.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730417.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98730417.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730417.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--to remove
function c98730417.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c98730417.rmfilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsType(TYPE_RITUAL) and c:IsAbleToRemove()
end
function c98730417.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730417.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c98730417.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730417.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--destroy replace
function c98730417.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c98730417.retfilter(c,e,tp,mg)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function c98730417.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98730417.retfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and c:IsAbleToDeck()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (not re or re:GetOwner()~=c) end
return Duel.SelectYesNo(tp,aux.Stringid(98730417,4))
end
function c98730417.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730417.retfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--distable
function c98730417.disfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_PENDULUM)
end
function c98730417.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730417.disfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
and Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandlerPlayer()==Duel.GetTurnPlayer()
end
function c98730417.disable(e,c)
return c:IsFaceup() and not (c:IsAttribute(ATTRIBUTE_WIND) or c:IsRace(RACE_DRAGON))
end
--ritual
function c98730417.rexfilter(c)
return c:GetFlagEffect(98730417)==0
end
function c98730417.spfilter(c,e,tp,m,ft)
if not ((c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_WIND)) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL))
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if c:IsLocation(LOCATION_REMOVED) and c:IsFacedown() then return false end
local mx=m:Filter(Card.IsCanBeRitualMaterial,c,c)
local mg=mx:Filter(c98730417.rexfilter,nil)
if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else
return mg:IsExists(c98730417.mfilterf,1,nil,tp,mg,c)
end
end
function c98730417.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),0,99,rc)
else return false end
end
function c98730417.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c98730417.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_WIND) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
end
c98730417.sploc_table={LOCATION_HAND,LOCATION_DECK,LOCATION_GRAVE,LOCATION_REMOVED}
function c98730417.spop(e,tp,eg,ep,ev,re,r,rp)
for i=1,4 do
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>-1 and Duel.IsExistingMatchingCard(c98730417.spfilter,tp,c98730417.sploc_table[i],0,1,nil,e,tp,mg,ft)
and (i==1 or (Duel.IsExistingMatchingCard(c98730417.disfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
and Duel.SelectYesNo(tp,aux.Stringid(98730417,i-1)))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730417.spfilter,tp,c98730417.sploc_table[i],0,1,1,nil,e,tp,mg,ft)
local tc=g:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg=mg:Filter(c98730417.rexfilter,nil)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c98730417.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
tc:RegisterFlagEffect(98730417,RESET_CHAIN,0,1)
end
end
end
Duel.SpecialSummonComplete()
end
--RDR-レドックス
function c98730419.initial_effect(c)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c)
--monster effect
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98730419,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,98730419)
e2:SetCost(c98730419.shcost)
e2:SetTarget(c98730419.shtg)
e2:SetOperation(c98730419.shop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,98730419)
e3:SetCost(c98730419.thcost)
e3:SetTarget(c98730419.thtg)
e3:SetOperation(c98730419.thop)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_REMOVED)
e4:SetCountLimit(1,98730419)
e4:SetCost(c98730419.rmcost)
e4:SetTarget(c98730419.rmtg)
e4:SetOperation(c98730419.rmop)
c:RegisterEffect(e4)
--destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_SEND_REPLACE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c98730419.retcon)
e5:SetTarget(c98730419.reptg)
e5:SetOperation(c98730419.repop)
c:RegisterEffect(e5)
--pendulum effect
--disable
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN+EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e7:SetRange(LOCATION_PZONE)
e7:SetCode(EFFECT_DISABLE)
e7:SetCondition(c98730419.discon)
e7:SetTarget(c98730419.disable)
c:RegisterEffect(e7)
--ritural
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,10411)
e8:SetTarget(c98730419.sptg)
e8:SetOperation(c98730419.spop)
c:RegisterEffect(e8)
end
--to hand
function c98730419.shcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c98730419.shfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM)
and (c:IsLocation(LOCATION_DECK) or c:IsFaceup()) and not c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c98730419.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730419.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c98730419.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98730419.shfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--to grave
function c98730419.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c98730419.thfilter(c)
return (c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsAbleToGrave()
end
function c98730419.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730419.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c98730419.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98730419.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--to remove
function c98730419.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c98730419.rmfilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsType(TYPE_RITUAL) and c:IsAbleToRemove()
end
function c98730419.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98730419.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c98730419.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c98730419.rmfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--destroy replace
function c98730419.retcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c98730419.retfilter(c,e,tp,mg)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_PENDULUM)
and not c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end
function c98730419.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c98730419.retfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and c:IsAbleToDeck()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (not re or re:GetOwner()~=c) end
return Duel.SelectYesNo(tp,aux.Stringid(98730419,4))
end
function c98730419.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730419.retfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--distable
function c98730419.disfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_PENDULUM)
end
function c98730419.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c98730419.disfilter,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
and Duel.GetCurrentPhase()==PHASE_MAIN1 and e:GetHandlerPlayer()==Duel.GetTurnPlayer()
end
function c98730419.disable(e,c)
return c:IsFaceup() and not (c:IsAttribute(ATTRIBUTE_EARTH) or c:IsRace(RACE_DRAGON))
end
--ritual
function c98730419.rexfilter(c)
return c:GetFlagEffect(98730419)==0
end
function c98730419.spfilter(c,e,tp,m,ft)
if not ((c:IsRace(RACE_DRAGON) or c:IsAttribute(ATTRIBUTE_EARTH)) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL))
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if c:IsLocation(LOCATION_REMOVED) and c:IsFacedown() then return false end
local mx=m:Filter(Card.IsCanBeRitualMaterial,c,c)
local mg=mx:Filter(c98730419.rexfilter,nil)
if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else
return mg:IsExists(c98730419.mfilterf,1,nil,tp,mg,c)
end
end
function c98730419.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),0,99,rc)
else return false end
end
function c98730419.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c98730419.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_PZONE,0,1,e:GetHandler(),ATTRIBUTE_EARTH) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
end
c98730419.sploc_table={LOCATION_HAND,LOCATION_DECK,LOCATION_GRAVE,LOCATION_REMOVED}
function c98730419.spop(e,tp,eg,ep,ev,re,r,rp)
for i=1,4 do
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_PENDULUM)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>-1 and Duel.IsExistingMatchingCard(c98730419.spfilter,tp,c98730419.sploc_table[i],0,1,nil,e,tp,mg,ft)
and (i==1 or (Duel.IsExistingMatchingCard(c98730419.disfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
and Duel.SelectYesNo(tp,aux.Stringid(98730419,i-1)))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98730419.spfilter,tp,c98730419.sploc_table[i],0,1,1,nil,e,tp,mg,ft)
local tc=g:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg=mg:Filter(c98730419.rexfilter,nil)
local mat=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c98730419.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),0,99,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
tc:RegisterFlagEffect(98730419,RESET_CHAIN,0,1)
end
end
end
Duel.SpecialSummonComplete()
end
function c98731001.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c98731001.spcon)
e1:SetOperation(c98731001.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c98731001.efilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_ADD_ATTRIBUTE)
e3:SetRange(LOCATION_PZONE)
e3:SetValue(0xf)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_PZONE)
e4:SetTargetRange(0xff,0)
e4:SetTarget(c98731001.etarget)
e4:SetValue(c98731001.efilter2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e5:SetRange(0x7f)
e5:SetCondition(c98731001.condition)
e5:SetOperation(c98731001.operation)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EVENT_CHAIN_SOLVING)
e6:SetRange(LOCATION_MZONE)
e6:SetOperation(c98731001.chop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_UPDATE_ATTACK)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE)
e7:SetValue(c98731001.atkval)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_UPDATE_DEFENSE)
e8:SetValue(c98731001.defval)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_ADD_ATTRIBUTE)
e9:SetValue(c98731001.attrval)
c:RegisterEffect(e9)
local e10=e7:Clone()
e10:SetCode(EFFECT_EXTRA_ATTACK)
e10:SetValue(c98731001.mulval)
c:RegisterEffect(e10)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetTarget(c98731001.tgtg)
e11:SetOperation(c98731001.tgop)
c:RegisterEffect(e11)
end
function c98731001.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c98731001.etarget(e,c)
return c:IsSetCard(0xe6e)
end
function c98731001.efilter2(e,re)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
function c98731001.cfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAttribute(0xf) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()==7 and c:IsAbleToRemoveAsCost()
end
function c98731001.fcheck(c,sg,g,code,...)
if not c:IsAttribute(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c98731001.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c98731001.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<4 then
res=mg:IsExists(c98731001.fselect,1,sg,tp,mg,sg,...)
else
local g=Group.CreateGroup()
res=sg:IsExists(c98731001.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c98731001.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c98731001.cfilter,tp,LOCATION_ONFIELD,0,c)
local sg=Group.CreateGroup()
return mg:IsExists(c98731001.fselect,1,nil,tp,mg,sg,ATTRIBUTE_FIRE,ATTRIBUTE_WATER,ATTRIBUTE_WIND,ATTRIBUTE_EARTH)
end
function c98731001.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c98731001.cfilter,tp,LOCATION_ONFIELD,0,c)
local sg=Group.CreateGroup()
while sg:GetCount()<4 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:FilterSelect(tp,c98731001.fselect,1,1,sg,tp,mg,sg,ATTRIBUTE_FIRE,ATTRIBUTE_WATER,ATTRIBUTE_WIND,ATTRIBUTE_EARTH)
sg:Merge(g)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function c98731001.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:IsLocation(LOCATION_PZONE) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.GetTurnPlayer()==tp
end
function c98731001.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(tp,98731001)==0 and Duel.SelectYesNo(tp,aux.Stringid(98731001,0)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
c:RegisterFlagEffect(98731001,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c98731001.chop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsCode(98731001) then return end
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c98731001.repop)
end
function c98731001.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then
c:CancelToGrave()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,98731001)
if g:GetCount()>0 then
Duel.HintSelection(g)
local sg=c:GetOverlayGroup()
if sg:GetCount()>0 then Duel.SendtoGrave(sg,REASON_RULE) end
local tc=g:GetFirst()
Duel.Overlay(tc,c)
Duel.BreakEffect()
tc:CopyEffect(c:GetCode(),RESET_EVENT+RESETS_STANDARD,1)
end
end
function c98731001.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup()
if e:GetHandler():GetEquipCount()>0 then g:Merge(e:GetHandler():GetEquipGroup()) end
return g:GetSum(Card.GetAttack)
end
function c98731001.defval(e,c)
local g=e:GetHandler():GetOverlayGroup()
if e:GetHandler():GetEquipCount()>0 then g:Merge(e:GetHandler():GetEquipGroup()) end
return g:GetSum(Card.GetDefense)
end
function c98731001.attrval(e,c)
local g=e:GetHandler():GetOverlayGroup()
if e:GetHandler():GetEquipCount()>0 then g:Merge(e:GetHandler():GetEquipGroup()) end
return g:GetSum(Card.GetAttribute)
end
function c98731001.mulval(e,c)
local g=e:GetHandler():GetOverlayGroup()
if e:GetHandler():GetEquipCount()>0 then g:Merge(e:GetHandler():GetEquipGroup()) end
return g:GetCount()
end
function c98731001.tgfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_PENDULUM) and c:GetLevel()==7
end
function c98731001.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98731001.tgfilter,tp,LOCATION_REMOVED,0,4,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>=4 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_REMOVED)
end
function c98731001.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c98731001.tgfilter,tp,LOCATION_REMOVED,0,4,4,nil)
local c=e:GetHandler()
for tc in aux.Next(g) do
if Duel.Equip(tp,tc,c,false) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c98731001.eqlimit)
tc:RegisterEffect(e1)
end
end
end
function c98731001.eqlimit(e,c)
return e:GetOwner()==c
end
\ No newline at end of file
......@@ -426,15 +426,12 @@
!setname 0xcc13 黄金螺旋
#极の一击 / 世纪末
!setname 0xe6e DR(ドラゴンルーラー)
!setname 0xe6f 世纪末(ポストアポカリプス)
!setname 0x206e 多元魔导
!setname 0x306e 多元魔导书
!setname 0xfc0 空洞(ホロウ)
!setname 0x1fc0 幽骑兵(ホロウ・キャヴァリエ)
!setname 0x2fc0 英龙骑(ホロウ・ドレムレース)
!setname 0x4fc0 骸星装(ホロウ・レムナント)
!setname 0x10b4 龙魂装衣(ドラゴネクロス)
!counter 0xcc10 翻车鱼指示物
!setname 0xc20 极彩蛇(極彩蛇)
!setname 0xc21 梦马(夢馬ムウマ)
......
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