Commit 3b630295 authored by mercury233's avatar mercury233

rm

parent 5631ec4c
#created by ...
#main
#extra
100235001
100235006
100235011
100235016
63813056
100235026
100235031
100235036
90207654
100235046
!side
100235051
100235056
100235061
100235066
100235071
26692769
100235081
100235086
100235091
100235096
...@@ -16,9 +16,6 @@ ...@@ -16,9 +16,6 @@
100335023 100335023
100335002 100335002
100335024 100335024
100237001
100237002
100237003
100335032 100335032
#extra #extra
100236008 100236008
...@@ -27,6 +24,5 @@ ...@@ -27,6 +24,5 @@
100238006 100238006
100242401 100242401
100335051 100335051
100200156
100335052 100335052
!side !side
#The first line is used for comment #The first line is used for comment
!counter 0x1050 信号指示物 !counter 0x1050 信号指示物
!setname 0x10c1 PSY骨架装备
\ No newline at end of file
--プラチナ・ガジェット
--Script by nekrozar
function c100200156.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2,2)
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetCondition(c100200156.linkcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100200156,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100200156)
e2:SetTarget(c100200156.sptg1)
e2:SetOperation(c100200156.spop1)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100200156,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,100200156+100)
e3:SetCondition(c100200156.spcon2)
e3:SetTarget(c100200156.sptg2)
e3:SetOperation(c100200156.spop2)
c:RegisterEffect(e3)
end
function c100200156.linkcon(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c100200156.spfilter1(c,e,tp,zone)
return c:IsRace(RACE_MACHINE) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c100200156.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200156.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100200156.spop1(e,tp,eg,ep,ev,re,r,rp)
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or zone<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100200156.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c100200156.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c100200156.spfilter2(c,e,tp)
return c:IsSetCard(0x51) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100200156.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100200156.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100200156.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100200156.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--混沌の戦士 カオス・ソルジャー
--Black Luster Soldier, the Chaos Warrior
--Script by nekrozar
function c100235001.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,3,c100235001.lcheck)
c:EnableReviveLimit()
--summon success
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c100235001.regcon)
e1:SetOperation(c100235001.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c100235001.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--cannot target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100235001.tgcon)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c100235001.tgcon)
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
--effect
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100235001,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(aux.bdocon)
e5:SetTarget(c100235001.efftg)
e5:SetOperation(c100235001.effop)
c:RegisterEffect(e5)
end
function c100235001.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
end
function c100235001.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function c100235001.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(100235001,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(100235001,4))
end
function c100235001.tgcon(e)
return e:GetHandler():GetFlagEffect(100235001)>0
end
function c100235001.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=c:GetFlagEffect(100235101)==0
local b3=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
if chk==0 then return true end
local op=0
if b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(100235001,1),aux.Stringid(100235001,2),aux.Stringid(100235001,3))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(100235001,1),aux.Stringid(100235001,2))
elseif b3 then
op=Duel.SelectOption(tp,aux.Stringid(100235001,1),aux.Stringid(100235001,3))*2
else
op=Duel.SelectOption(tp,aux.Stringid(100235001,1))
end
e:SetLabel(op)
end
function c100235001.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==0 then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
elseif op==1 then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local tct=0
if Duel.GetTurnPlayer()==tp then tct=1 end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetCondition(c100235001.eacon)
e1:SetLabel(Duel.GetTurnCount())
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,1+tct)
c:RegisterEffect(e1)
c:RegisterFlagEffect(100235101,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,0,1+tct)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
function c100235001.eacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel()
end
function c100235001.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLevelAbove,1,nil,7) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--ハーピィ・コンダクター
--Harpie Conductor
--Script by nekrozar
function c100235006.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WIND),2,2)
c:EnableReviveLimit()
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(76812113)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235006)
e2:SetTarget(c100235006.desreptg)
e2:SetValue(c100235006.desrepval)
e2:SetOperation(c100235006.desrepop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100235006,0))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100235106)
e3:SetCondition(c100235006.thcon)
e3:SetTarget(c100235006.thtg)
e3:SetOperation(c100235006.thop)
c:RegisterEffect(e3)
end
function c100235006.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x64)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT)) and not c:IsReason(REASON_REPLACE)
end
function c100235006.desfilter(c,e,tp)
return c:IsControler(tp) and c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end
function c100235006.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c100235006.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c100235006.desfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,c100235006.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
e:SetLabelObject(g:GetFirst())
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
end
return false
end
function c100235006.desrepval(e,c)
return c100235006.repfilter(c,e:GetHandlerPlayer())
end
function c100235006.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
function c100235006.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsControler(tp) and c:IsSetCard(0x64)
end
function c100235006.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100235006.cfilter,1,nil,tp)
end
function c100235006.thfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToHand()
end
function c100235006.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100235006.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100235006.thfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100235006.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c100235006.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--轟雷機龍-サンダー・ドラゴン
--Thunder Dragon Goliath
--Script by nekrozar
function c100235011.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_THUNDER),2)
--apply effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235011,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100235011)
e1:SetCondition(c100235011.effcon)
e1:SetTarget(c100235011.efftg)
e1:SetOperation(c100235011.effop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c100235011.reptg)
e2:SetValue(c100235011.repval)
c:RegisterEffect(e2)
end
function c100235011.effcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100235011.efffilter(c,e,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0x11c) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())) then return false end
local m=_G["c"..c:GetCode()]
if not m then return false end
local te=m.discard_effect
if not te then return false end
local tg=te:GetTarget()
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c100235011.efftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c100235011.efffilter(chkc,e,tp,eg,ep,ev,re,r,rp) end
if chk==0 then return Duel.IsExistingTarget(c100235011.efffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100235011.efffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
local tc=g:GetFirst()
Duel.ClearTargetCard()
tc:CreateEffectRelation(e)
e:SetLabelObject(tc)
local m=_G["c"..tc:GetCode()]
local te=m.discard_effect
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
end
function c100235011.effop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
local m=_G["c"..tc:GetCode()]
local te=m.discard_effect
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect()
local opt=Duel.SelectOption(tp,aux.Stringid(100235011,1),aux.Stringid(100235011,2))
if opt==0 then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
else
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
end
end
function c100235011.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_THUNDER) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c100235011.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c100235011.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,3,nil) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true
end
return false
end
function c100235011.repval(e,c)
return c100235011.repfilter(c,e:GetHandlerPlayer())
end
--天空神騎士ロードパーシアス
--The Celestial Knight Lord Parshath
--Script by nekrozar
function c100235016.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_FAIRY),2)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235016,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100235016)
e1:SetCost(c100235016.thcost)
e1:SetTarget(c100235016.thtg)
e1:SetOperation(c100235016.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235016,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235116)
e2:SetCondition(c100235016.spcon)
e2:SetCost(c100235016.spcost)
e2:SetTarget(c100235016.sptg)
e2:SetOperation(c100235016.spop)
c:RegisterEffect(e2)
end
c100235016.card_code_list={56433456}
function c100235016.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100235016.thfilter(c,thchk)
return (c:IsCode(56433456) or aux.IsCodeListed(c,56433456) or (thchk and c:IsRace(RACE_FAIRY))) and c:IsAbleToHand()
end
function c100235016.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local thchk=Duel.IsEnvironment(56433456)
if chk==0 then return Duel.IsExistingMatchingCard(c100235016.thfilter,tp,LOCATION_DECK,0,1,nil,thchk) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100235016.thop(e,tp,eg,ep,ev,re,r,rp)
local thchk=Duel.IsEnvironment(56433456)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100235016.thfilter,tp,LOCATION_DECK,0,1,1,nil,thchk)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c100235016.cfilter(c,tp)
return bit.band(c:GetPreviousRaceOnField(),RACE_FAIRY)~=0 and c:IsRace(RACE_FAIRY)
and c:GetPreviousControler()==tp and c:GetPreviousLocation()==LOCATION_MZONE and c:IsPreviousPosition(POS_FACEUP)
end
function c100235016.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100235016.cfilter,1,nil,tp)
end
function c100235016.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c100235016.costfilter(c,e,tp)
local lv=c:GetLevel()
return lv>0 and c:IsRace(RACE_FAIRY) and Duel.IsExistingMatchingCard(c100235016.spfilter,tp,LOCATION_HAND,0,1,nil,lv+1,e,tp)
end
function c100235016.spfilter(c,lv,e,tp)
return c:IsLevelAbove(lv) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100235016.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c100235016.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c100235016.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetLevel())
Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100235016.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100235016.spfilter,tp,LOCATION_HAND,0,1,1,nil,lv+1,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--エーリアン・ソルジャー M/フレーム
--Alien Shocktrooper Mighty/Frame
--Script by nekrozar
function c100235026.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_REPTILE),2,2)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235026,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100235026)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c100235026.ctcost)
e1:SetTarget(c100235026.cttg)
e1:SetOperation(c100235026.ctop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235026,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,100235126)
e2:SetCondition(c100235026.spcon)
e2:SetTarget(c100235026.sptg)
e2:SetOperation(c100235026.spop)
c:RegisterEffect(e2)
end
function c100235026.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1) and c:IsDiscardable()
end
function c100235026.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235026.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c100235026.costfilter,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabel(g:GetFirst():GetOriginalLevel())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c100235026.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetLabel(),0,0x100e)
end
function c100235026.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100235026,2))
local sg=g:Select(tp,1,1,nil)
sg:GetFirst():AddCounter(0x100e,1)
end
end
function c100235026.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100235026.spfilter(c,e,tp)
return c:IsRace(RACE_REPTILE) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100235026.ctfilter(c)
return c:GetCounter(0x100e)>0
end
function c100235026.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100235026.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c100235026.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100235026.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100235026.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
local ct=Duel.GetMatchingGroupCount(c100235026.ctfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 or ct==0 then return end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
g:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft-1
ct=ct-1
until ft<=0 or g:GetCount()==0 or ct==0 or not Duel.SelectYesNo(tp,aux.Stringid(100235026,3))
Duel.SpecialSummonComplete()
end
--ドラグニティナイト-ロムルス
--Dragunity Knight - Romulus
--Script by nekrozar
function c100235031.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100235031.mfilter,2,2)
c:EnableReviveLimit()
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235031,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100235031)
e1:SetCondition(c100235031.thcon)
e1:SetTarget(c100235031.thtg)
e1:SetOperation(c100235031.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235031,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235131)
e2:SetCondition(c100235031.spcon)
e2:SetTarget(c100235031.sptg)
e2:SetOperation(c100235031.spop)
c:RegisterEffect(e2)
end
function c100235031.mfilter(c)
return not c:IsType(TYPE_TOKEN) and c:IsLinkRace(RACE_DRAGON+RACE_WINDBEAST)
end
function c100235031.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100235031.thfilter(c)
return ((c:IsSetCard(0x29) and c:IsType(TYPE_SPELL+TYPE_TRAP)) or c:IsCode(62265044)) and c:IsAbleToHand()
end
function c100235031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235031.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100235031.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100235031.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 c100235031.cfilter(c,lg)
return c:IsRace(RACE_DRAGON) and bit.band(c:GetSummonLocation(),LOCATION_EXTRA)~=0 and lg:IsContains(c)
end
function c100235031.spcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c100235031.cfilter,1,nil,lg)
end
function c100235031.spfilter(c,e,tp)
return c:IsRace(RACE_DRAGON+RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100235031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100235031.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c100235031.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100235031.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
end
end
--スクラップ・ワイバーン
--Scrap Wyvern
--Script by nekrozar
function c100235036.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c100235036.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235036,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100235036)
e1:SetTarget(c100235036.sptg1)
e1:SetOperation(c100235036.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235036,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235136)
e2:SetCondition(c100235036.spcon2)
e2:SetTarget(c100235036.sptg2)
e2:SetOperation(c100235036.spop2)
c:RegisterEffect(e2)
end
function c100235036.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x24)
end
function c100235036.spfilter(c,e,tp)
return c:IsSetCard(0x24) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100235036.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100235036.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100235036.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c100235036.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g2=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end
function c100235036.spop1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function c100235036.cfilter(c)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousSetCard(0x24) and c:IsPreviousPosition(POS_FACEUP)
end
function c100235036.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100235036.cfilter,1,nil)
end
function c100235036.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100235036.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100235036.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c100235036.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 and Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g2:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g2)
Duel.Destroy(g2,REASON_EFFECT)
end
end
end
--六武衆の軍大将
--Script by nekrozar
function c100235046.initial_effect(c)
c:EnableCounterPermit(0x3)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_WARRIOR),2,2,c100235046.lcheck)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235046,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100235046)
e1:SetCondition(c100235046.thcon)
e1:SetCost(c100235046.thcost)
e1:SetTarget(c100235046.thtg)
e1:SetOperation(c100235046.thop)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100235046.ctcon)
e2:SetOperation(c100235046.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c100235046.atkval)
c:RegisterEffect(e4)
if not aux.IsCounterAdded then
function aux.IsCounterAdded(c,counter)
if not c.counter_add_list then return false end
for i,ccounter in ipairs(c.counter_add_list) do
if counter==ccounter then return true end
end
return false
end
end
end
c100235046.counter_add_list={0x3}
function c100235046.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x3d)
end
function c100235046.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100235046.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100235046.thfilter(c)
return aux.IsCounterAdded(c,0x3) and c:IsAbleToHand()
end
function c100235046.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235046.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100235046.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100235046.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 c100235046.cfilter(c,ec)
if c:IsLocation(LOCATION_MZONE) then
return c:IsSetCard(0x3d) and c:IsFaceup() and ec:GetLinkedGroup():IsContains(c)
else
return c:IsPreviousSetCard(0x3d) and c:IsPreviousPosition(POS_FACEUP)
and bit.extract(ec:GetLinkedZone(c:GetPreviousControler()),c:GetPreviousSequence())~=0
end
end
function c100235046.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100235046.cfilter,1,nil,e:GetHandler())
end
function c100235046.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x3,1)
end
function c100235046.atkval(e,c)
return Duel.GetCounter(c:GetControler(),1,0,0x3)*100
end
--機関重連アンガー・ナックル
--
--Script by mercury233
function c100235051.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2,2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235051,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100235051)
e1:SetCondition(c100235051.spcon1)
e1:SetCost(c100235051.spcost1)
e1:SetTarget(c100235051.sptg1)
e1:SetOperation(c100235051.spop1)
c:RegisterEffect(e1)
--revive
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100235051)
e2:SetCost(c100235051.spcost2)
e2:SetTarget(c100235051.sptg2)
e2:SetOperation(c100235051.spop2)
c:RegisterEffect(e2)
--cannot be link material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c100235051.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100235051.cfilter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function c100235051.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235051.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100235051.cfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c100235051.spfilter1(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100235051.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100235051.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100235051.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100235051.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100235051.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c100235051.cfilter2(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function c100235051.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235051.cfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100235051.cfilter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c100235051.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100235051.spop2(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
--炎星仙-ワシンジン
--Script by nekrozar
function c100235056.initial_effect(c)
c:SetSPSummonOnce(100235056)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_BEASTWARRIOR),2,2)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(100235056)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235056,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100235056)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c100235056.thtg)
e2:SetOperation(c100235056.thop)
c:RegisterEffect(e2)
end
function c100235056.thfilter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c100235056.tgfilter(c)
return c:IsSetCard(0x79) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c100235056.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and c100235056.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100235056.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c100235056.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100235056.thfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100235056.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local sg=Duel.GetMatchingGroup(c100235056.tgfilter,tp,LOCATION_DECK,0,nil)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=sg:Select(tp,1,1,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
end
--セラの蟲惑魔
--Traptrix Sera
--Script by nekrozar
function c100235061.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100235061.matfilter,1,1)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100235061.imcon)
e1:SetValue(c100235061.efilter)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100235061,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100235061)
e3:SetCondition(c100235061.spcon)
e3:SetTarget(c100235061.sptg)
e3:SetOperation(c100235061.spop)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100235061,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100235161)
e4:SetCondition(c100235061.setcon)
e4:SetTarget(c100235061.settg)
e4:SetOperation(c100235061.setop)
c:RegisterEffect(e4)
end
function c100235061.matfilter(c)
return c:IsLinkSetCard(0x108a) and not c:IsLinkType(TYPE_LINK)
end
function c100235061.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100235061.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c100235061.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_TRAP and e:GetHandler():GetFlagEffect(1)
end
function c100235061.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c100235061.spfilter(c,e,tp)
return c:IsSetCard(0x108a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c100235061.cfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c100235061.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100235061.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100235061.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100235061.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100235061.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc~=c and rc:IsSetCard(0x108a) and rc:IsControler(tp) and c:GetFlagEffect(1)>0
end
function c100235061.setfilter(c)
return (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function c100235061.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235061.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c100235061.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100235061.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
end
--DDD深淵王ビルガメス
--D/D/D Abyss King Gilgamesh
--Script by nekrozar
function c100235066.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xaf),2)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235066,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100235066)
e1:SetTarget(c100235066.settg)
e1:SetOperation(c100235066.setop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235066,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,100235166)
e2:SetCondition(c100235066.spcon)
e2:SetTarget(c100235066.sptg)
e2:SetOperation(c100235066.spop)
c:RegisterEffect(e2)
end
function c100235066.setfilter1(c,tp)
return c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
and Duel.IsExistingMatchingCard(c100235066.setfilter2,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c100235066.setfilter2(c,code)
return c:IsSetCard(0xaf) and not c:IsCode(code) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c100235066.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)
and Duel.IsExistingMatchingCard(c100235066.setfilter1,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000)
end
function c100235066.setop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100235066.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g1=Duel.SelectMatchingCard(tp,c100235066.setfilter1,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc1=g1:GetFirst()
if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g2=Duel.SelectMatchingCard(tp,c100235066.setfilter2,tp,LOCATION_DECK,0,1,1,nil,tc1:GetCode())
local tc2=g2:GetFirst()
Duel.MoveToField(tc1,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(tc2,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.Damage(tp,1000,REASON_EFFECT)
end
function c100235066.splimit(e,c)
return not c:IsSetCard(0xaf)
end
function c100235066.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsReason(REASON_EFFECT) and rp==1-tp or c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))
end
function c100235066.spfilter(c,e,tp)
return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100235066.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if chk==0 then return loc~=0 and Duel.IsExistingMatchingCard(c100235066.spfilter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end
function c100235066.spop(e,tp,eg,ep,ev,re,r,rp)
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_GRAVE end
if Duel.GetLocationCountFromEx(tp)>0 then loc=loc+LOCATION_EXTRA end
if loc==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100235066.spfilter),tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--RR-ワイズ・ストリクス
--Raidraptor - Wise Strix
--Script by nekrozar
function c100235071.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c100235071.matfilter,2,2)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235071,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100235071)
e1:SetCondition(c100235071.spcon)
e1:SetTarget(c100235071.sptg)
e1:SetOperation(c100235071.spop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100235071,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100235071+100)
e3:SetCondition(c100235071.setcon)
e3:SetOperation(c100235071.setop)
c:RegisterEffect(e3)
end
function c100235071.matfilter(c)
return c:IsLinkRace(RACE_WINDBEAST) and c:IsLinkAttribute(ATTRIBUTE_DARK)
end
function c100235071.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100235071.spfilter(c,e,tp)
return c:IsLevel(4) and c:IsRace(RACE_WINDBEAST) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100235071.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100235071.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c100235071.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100235071.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
function c100235071.setcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_XYZ) and rc:IsSetCard(0xba) and rc:IsControler(tp) and e:GetHandler():GetFlagEffect(1)>0
end
function c100235071.setfilter(c)
return c:IsSetCard(0x95) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c100235071.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100235071.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.ConfirmCards(1-tp,g)
end
end
--HSR-GOMガン
--Hi-Speedroid GOM Gun
--Script by mercury233
function c100235081.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_WIND),2,2)
c:EnableReviveLimit()
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235081,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100235081)
e1:SetTarget(c100235081.sumtg)
e1:SetOperation(c100235081.sumop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235081,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235081+100)
e2:SetTarget(c100235081.thtg)
e2:SetOperation(c100235081.thop)
c:RegisterEffect(e2)
end
function c100235081.sumfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSummonable(true,nil)
end
function c100235081.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235081.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c100235081.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c100235081.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c100235081.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100235081.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function c100235081.costfilter(c,g)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsType(TYPE_SYNCHRO) and c:IsAbleToRemoveAsCost()
and g:IsExists(c100235081.thfilter1,1,nil,g,c:GetLevel())
end
function c100235081.thfilter1(c,g,lv)
return g:IsExists(c100235081.thfilter2,1,c,c,lv)
end
function c100235081.thfilter2(c,mc,lv)
return not c:IsCode(mc:GetCode()) and c:GetLevel()+mc:GetLevel()==lv
end
function c100235081.thfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100235081.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100235081.thfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c100235081.costfilter,tp,LOCATION_EXTRA,0,1,nil,g) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c100235081.costfilter,tp,LOCATION_EXTRA,0,1,1,nil,g)
e:SetLabel(sg:GetFirst():GetLevel())
Duel.Remove(sg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100235081.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100235081.thfilter,tp,LOCATION_DECK,0,nil)
local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c100235081.thfilter1,1,1,nil,g,lv)
if #sg>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g:FilterSelect(tp,c100235081.thfilter2,1,1,sg:GetFirst(),sg:GetFirst(),lv)
sg:Merge(sg2)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:RandomSelect(1-tp,1)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
sg:Sub(tg)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--PSYフレームロード・Λ
--Script by nekrozar
function c100235086.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkType,TYPE_TOKEN)),2,2)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(100235086)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235086,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,100235086)
e2:SetCondition(c100235086.regcon)
e2:SetTarget(c100235086.regtg)
e2:SetOperation(c100235086.regop)
c:RegisterEffect(e2)
end
function c100235086.cfilter(c,tp)
return c:IsFaceup() and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE)
and bit.band(c:GetPreviousRaceOnField(),RACE_PSYCHO)~=0 and c:GetPreviousControler()==tp
end
function c100235086.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100235086.cfilter,1,nil,tp)
end
function c100235086.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0xc1) end
end
function c100235086.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c100235086.thcon)
e1:SetOperation(c100235086.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100235086.thfilter(c)
return c:IsSetCard(0xc1) and c:IsAbleToHand()
end
function c100235086.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100235086.thfilter,tp,LOCATION_DECK,0,1,nil)
end
function c100235086.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,100235086)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100235086.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
--失楽の堕天使
--Condemned Darklord
--Script by nekrozar
function c100235091.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_FAIRY),2,2)
--summon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100235091,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100235091.otcon)
e1:SetTarget(c100235091.ottg)
e1:SetOperation(c100235091.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100235091,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100235091)
e2:SetCost(c100235091.thcost)
e2:SetTarget(c100235091.thtg)
e2:SetOperation(c100235091.thop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100235091,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1)
e3:SetCondition(c100235091.reccon)
e3:SetTarget(c100235091.rectg)
e3:SetOperation(c100235091.recop)
c:RegisterEffect(e3)
end
function c100235091.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c100235091.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc<=2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100235091.rmfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c100235091.ottg(e,c)
local mi,ma=c:GetTributeRequirement()
return mi<=2 and ma>=2 and c:IsRace(RACE_FAIRY)
end
function c100235091.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100235091.rmfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100235091.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c100235091.thfilter(c)
return c:IsSetCard(0xef) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function c100235091.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100235091.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100235091.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100235091,3))
local g=Duel.SelectMatchingCard(tp,c100235091.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function c100235091.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c100235091.recfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY)
end
function c100235091.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local rec=Duel.GetMatchingGroupCount(c100235091.recfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*500
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function c100235091.recop(e,tp,eg,ep,ev,re,r,rp)
local rec=Duel.GetMatchingGroupCount(c100235091.recfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*500
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rec,REASON_EFFECT)
end
--魔弾の射手 マックス
--Script by nekrozar
function c100235096.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c100235096.matfilter,1,1)
--effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,100235096)
e1:SetCondition(c100235096.effcon)
e1:SetTarget(c100235096.efftg)
e1:SetOperation(c100235096.effop)
c:RegisterEffect(e1)
--activate from hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e2:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e3)
end
function c100235096.matfilter(c)
return c:IsLevelBelow(8) and c:IsLinkSetCard(0x108)
end
function c100235096.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c100235096.thfilter(c)
return c:IsSetCard(0x108) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c100235096.spfilter(c,e,tp)
return c:IsSetCard(0x108) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100235096.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100235096.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)>0
and Duel.IsExistingMatchingCard(c100235096.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(100235096,0),aux.Stringid(100235096,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(100235096,0))
else op=Duel.SelectOption(tp,aux.Stringid(100235096,1))+1 end
e:SetLabel(op)
if op==0 then
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(100235096,0))
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(100235096,1))
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
end
function c100235096.effop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c100235096.thfilter,tp,LOCATION_DECK,0,nil)
if ct<=0 or g:GetCount()==0 then return end
local sg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:Select(tp,1,1,nil)
local tc=sg1:GetFirst()
sg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
ct=ct-1
until ct<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(100235096,2))
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
else
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
local g=Duel.GetMatchingGroup(c100235096.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ft<=0 or ct<=0 or g:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
g:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft-1
ct=ct-1
until ft<=0 or ct<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(100235096,3))
Duel.SpecialSummonComplete()
end
end
--魂の開封
--Script by nekrozar
function c100237002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c100237002.condition)
e1:SetTarget(c100237002.target)
e1:SetOperation(c100237002.activate)
c:RegisterEffect(e1)
end
function c100237002.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function c100237002.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100237002.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100237002.filter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToHand()
end
function c100237002.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350)
and Duel.IsExistingMatchingCard(c100237002.filter,tp,LOCATION_DECK,0,5,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100237002.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,30459350) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100237002,0))
local g=Duel.SelectMatchingCard(tp,c100237002.filter,tp,LOCATION_DECK,0,5,5,nil)
if g:GetCount()<5 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
g:Sub(sg)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--農園からの配送
--Script by nekrozar
function c100237003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c100237003.condition)
e1:SetTarget(c100237003.target)
e1:SetOperation(c100237003.activate)
c:RegisterEffect(e1)
end
function c100237003.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function c100237003.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100237003.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100237003.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsAbleToDeck()
end
function c100237003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100237003.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100237003.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100237003.filter,tp,LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c100237003.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--天空の使者 ゼラディアス
function c12171659.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12171659,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c12171659.cost)
e1:SetTarget(c12171659.target)
e1:SetOperation(c12171659.operation)
c:RegisterEffect(e1)
--self destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c12171659.descon)
c:RegisterEffect(e2)
end
c12171659.card_code_list={56433456}
function c12171659.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c12171659.filter(c)
return c:IsCode(56433456) and c:IsAbleToHand()
end
function c12171659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c12171659.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12171659.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(c12171659.filter,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function c12171659.descon(e)
return not Duel.IsEnvironment(56433456)
end
--天空勇士ネオパーシアス
function c12510878.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c12510878.spcon)
e1:SetOperation(c12510878.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12510878,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c12510878.condition)
e2:SetTarget(c12510878.target)
e2:SetOperation(c12510878.operation)
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
--update atk,def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c12510878.val)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
end
c12510878.card_code_list={56433456}
function c12510878.spcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,18036057)
end
function c12510878.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsCode,1,1,nil,18036057)
Duel.Release(g,REASON_COST)
end
function c12510878.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c12510878.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c12510878.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c12510878.val(e,c)
if not Duel.IsEnvironment(56433456) then return 0 end
local v=Duel.GetLP(c:GetControler())-Duel.GetLP(1-c:GetControler())
if v>0 then return v else return 0 end
end
--パーシアスの神域
function c15449853.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e2:SetValue(56433456)
c:RegisterEffect(e2)
--atk/def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
e3:SetValue(300)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--cannot be target/indestructable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e5:SetTarget(aux.TargetBoolFunction(Card.IsPosition,POS_FACEDOWN))
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
c:RegisterEffect(e6)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TODECK)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_SZONE)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetCountLimit(1)
e7:SetTarget(c15449853.tdtg)
e7:SetOperation(c15449853.tdop)
c:RegisterEffect(e7)
end
c15449853.card_code_list={56433456}
function c15449853.tdfilter(c,e)
return (c:IsRace(RACE_FAIRY) or c:IsType(TYPE_COUNTER)) and c:IsAbleToDeck() and (not e or c:IsCanBeEffectTarget(e))
end
function c15449853.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local g=Duel.GetMatchingGroup(c15449853.tdfilter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:GetClassCount(Card.GetCode)>=3 end
local tg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
tg:Merge(sg)
g:Remove(Card.IsCode,nil,sg:GetFirst():GetCode())
until tg:GetCount()==3
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,tg:GetCount(),0,0)
end
function c15449853.tdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()==0 then return end
if Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)==0 then return end
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_DECK)
if ct>0 then Duel.SortDecktop(tp,tp,ct) end
end
--PSYフレームギア・ε
function c1697104.initial_effect(c)
c:EnableUnsummonable()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c1697104.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1697104,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c1697104.condition)
e2:SetTarget(c1697104.target)
e2:SetOperation(c1697104.operation)
c:RegisterEffect(e2)
end
function c1697104.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c1697104.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,100235086))
and ep~=tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c1697104.spfilter(c,e,tp)
return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1697104.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c1697104.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c1697104.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c1697104.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(1697104,RESET_EVENT+RESETS_STANDARD,0,1,fid)
c:RegisterFlagEffect(1697104,RESET_EVENT+RESETS_STANDARD,0,1,fid)
Duel.SpecialSummonComplete()
g:AddCard(c)
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c1697104.rmcon)
e1:SetOperation(c1697104.rmop)
Duel.RegisterEffect(e1,tp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c1697104.rmfilter(c,fid)
return c:GetFlagEffectLabel(1697104)==fid
end
function c1697104.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c1697104.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c1697104.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c1697104.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
--大天使ゼラート
function c18378582.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c18378582.spcon)
e2:SetOperation(c18378582.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(18378582,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c18378582.descost)
e3:SetTarget(c18378582.destg)
e3:SetOperation(c18378582.desop)
c:RegisterEffect(e3)
end
c18378582.card_code_list={56433456}
function c18378582.rfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c18378582.spcon(e,c)
if c==nil then return Duel.IsEnvironment(56433456) end
return Duel.CheckReleaseGroup(c:GetControler(),c18378582.rfilter,1,nil,66073051)
end
function c18378582.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,c18378582.rfilter,1,1,nil,66073051)
Duel.Release(g,REASON_COST)
end
function c18378582.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c18378582.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18378582.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c18378582.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c18378582.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c18378582.desop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsEnvironment(56433456) then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
end
--雷源龍-サンダー・ドラゴン
function c20318029.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(20318029,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e1:SetCountLimit(1,20318029)
e1:SetCondition(c20318029.atkcon)
e1:SetCost(c20318029.atkcost)
e1:SetTarget(c20318029.atktg)
e1:SetOperation(c20318029.atkop)
c:RegisterEffect(e1)
c20318029.discard_effect=e1
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(20318029,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,20318029)
e2:SetTarget(c20318029.thtg)
e2:SetOperation(c20318029.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c20318029.thcon)
c:RegisterEffect(e3)
end
function c20318029.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c20318029.atkcost(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 c20318029.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_THUNDER)
end
function c20318029.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c20318029.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c20318029.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c20318029.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c20318029.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c20318029.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c20318029.thfilter(c)
return c:IsCode(20318029) and c:IsAbleToHand()
end
function c20318029.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c20318029.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c20318029.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c20318029.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 c27970830.initial_effect(c)
c:EnableCounterPermit(0x3)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c27970830.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atkup
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetDescription(aux.Stringid(27970830,0))
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c27970830.cost1)
e4:SetTarget(c27970830.tg1)
e4:SetOperation(c27970830.op1)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetDescription(aux.Stringid(27970830,1))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCost(c27970830.cost2)
e5:SetTarget(c27970830.tg2)
e5:SetOperation(c27970830.op2)
c:RegisterEffect(e5)
--special summon
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetDescription(aux.Stringid(27970830,2))
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE)
e6:SetCost(c27970830.cost3)
e6:SetTarget(c27970830.tg3)
e6:SetOperation(c27970830.op3)
c:RegisterEffect(e6)
end
c27970830.counter_add_list={0x3}
function c27970830.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d)
end
function c27970830.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c27970830.ctfilter,1,nil) then
e:GetHandler():AddCounter(0x3,2)
end
end
function c27970830.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3,2,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x3,2,REASON_COST)
end
function c27970830.filter1(c)
return c:IsFaceup() and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) and c:IsType(TYPE_EFFECT)
end
function c27970830.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27970830.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500)
end
function c27970830.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(500)
tc:RegisterEffect(e1)
end
end
function c27970830.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3,4,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x3,4,REASON_COST)
end
function c27970830.filter2(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3d) and c:IsAbleToHand()
end
function c27970830.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c27970830.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c27970830.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c27970830.filter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c27970830.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x3,6,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.RemoveCounter(tp,1,0,0x3,6,REASON_COST)
end
function c27970830.filter3(c,e,tp)
return c:IsSetCard(0x20) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27970830.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c27970830.filter3(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c27970830.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c27970830.filter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c27970830.op3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--PSYフレームギア・β
function c2810642.initial_effect(c)
c:EnableUnsummonable()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c2810642.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2810642,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(c2810642.condition)
e2:SetTarget(c2810642.target)
e2:SetOperation(c2810642.operation)
c:RegisterEffect(e2)
end
function c2810642.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c2810642.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,100235086))
and Duel.GetAttacker():GetControler()~=tp
end
function c2810642.spfilter(c,e,tp)
return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c2810642.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.GetAttacker():IsRelateToBattle()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c2810642.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetTargetCard(Duel.GetAttacker())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0)
end
function c2810642.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c2810642.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(2810642,RESET_EVENT+RESETS_STANDARD,0,1,fid)
c:RegisterFlagEffect(2810642,RESET_EVENT+RESETS_STANDARD,0,1,fid)
Duel.SpecialSummonComplete()
g:AddCard(c)
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c2810642.rmcon)
e1:SetOperation(c2810642.rmop)
Duel.RegisterEffect(e1,tp)
local dc=Duel.GetFirstTarget()
if dc:IsRelateToEffect(e) and Duel.Destroy(dc,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
function c2810642.rmfilter(c,fid)
return c:GetFlagEffectLabel(2810642)==fid
end
function c2810642.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c2810642.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c2810642.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c2810642.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
--奇跡の代行者 ジュピター
function c28573958.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28573958,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c28573958.atcost)
e1:SetTarget(c28573958.attg)
e1:SetOperation(c28573958.atop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28573958,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c28573958.spcon)
e2:SetCost(c28573958.spcost)
e2:SetTarget(c28573958.sptg)
e2:SetOperation(c28573958.spop)
c:RegisterEffect(e2)
end
c28573958.card_code_list={56433456}
function c28573958.cfilter1(c)
return c:IsSetCard(0x44) and c:IsAbleToRemoveAsCost()
end
function c28573958.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28573958.cfilter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c28573958.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c28573958.filter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY)
end
function c28573958.attg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c28573958.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28573958.filter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c28573958.filter1,tp,LOCATION_MZONE,0,1,1,nil)
end
function c28573958.atop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c28573958.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(56433456)
end
function c28573958.cfilter2(c)
return c:IsRace(RACE_FAIRY) and c:IsDiscardable()
end
function c28573958.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28573958.cfilter2,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c28573958.cfilter2,1,1,REASON_COST+REASON_DISCARD)
end
function c28573958.filter2(c,e,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c28573958.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c28573958.filter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c28573958.filter2,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c28573958.filter2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c28573958.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsEnvironment(56433456) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--雷獣龍-サンダー・ドラゴン
function c29596581.initial_effect(c)
--recycle
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29596581,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29596581)
e1:SetCost(c29596581.cost)
e1:SetTarget(c29596581.target)
e1:SetOperation(c29596581.operation)
c:RegisterEffect(e1)
c29596581.discard_effect=e1
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29596581,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29596581)
e2:SetTarget(c29596581.sptg)
e2:SetOperation(c29596581.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c29596581.spcon)
c:RegisterEffect(e3)
end
function c29596581.cost(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 c29596581.filter(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x11c) and not c:IsCode(29596581) and c:IsAbleToHand()
end
function c29596581.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c29596581.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c29596581.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29596581.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c29596581.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29596581.spfilter(c,e,tp)
return c:IsSetCard(0x11c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c29596581.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29596581.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29596581.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c29596581.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(29596581,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c29596581.thcon)
e1:SetOperation(c29596581.thop)
Duel.RegisterEffect(e1,tp)
end
end
function c29596581.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(29596581)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c29596581.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
--立炎星-トウケイ
function c30929786.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(30929786,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,30929786)
e1:SetCondition(c30929786.thcon)
e1:SetTarget(c30929786.thtg)
e1:SetOperation(c30929786.thop)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(30929786,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c30929786.setcost)
e2:SetTarget(c30929786.settg)
e2:SetOperation(c30929786.setop)
c:RegisterEffect(e2)
end
function c30929786.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x79) and re:GetHandler():IsType(TYPE_MONSTER)
end
function c30929786.thfilter(c)
return c:IsSetCard(0x79) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c30929786.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30929786.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c30929786.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c30929786.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 c30929786.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c30929786.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
or (Duel.IsPlayerAffectedByEffect(tp,100235056) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) end
if Duel.IsExistingMatchingCard(c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,100235056) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not Duel.SelectYesNo(tp,aux.Stringid(100235056,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c30929786.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c30929786.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true)
end
function c30929786.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1
and Duel.IsExistingMatchingCard(c30929786.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c30929786.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c30929786.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
--サンダー・ドラゴン
function c31786629.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31786629,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c31786629.cost)
e1:SetTarget(c31786629.target)
e1:SetOperation(c31786629.operation)
c:RegisterEffect(e1)
c31786629.discard_effect=e1
end
function c31786629.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c31786629.filter(c)
return c:IsCode(31786629) and c:IsAbleToHand()
end
function c31786629.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c31786629.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c31786629.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c31786629.filter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--PSYフレームギア・γ
function c38814750.initial_effect(c)
c:EnableUnsummonable()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c38814750.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38814750,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c38814750.condition)
e2:SetTarget(c38814750.target)
e2:SetOperation(c38814750.operation)
c:RegisterEffect(e2)
end
function c38814750.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c38814750.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,100235086))
and ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c38814750.spfilter(c,e,tp)
return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c38814750.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c38814750.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c38814750.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c38814750.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(38814750,RESET_EVENT+RESETS_STANDARD,0,1,fid)
c:RegisterFlagEffect(38814750,RESET_EVENT+RESETS_STANDARD,0,1,fid)
Duel.SpecialSummonComplete()
g:AddCard(c)
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c38814750.rmcon)
e1:SetOperation(c38814750.rmop)
Duel.RegisterEffect(e1,tp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c38814750.rmfilter(c,fid)
return c:GetFlagEffectLabel(38814750)==fid
end
function c38814750.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c38814750.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c38814750.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c38814750.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
--微炎星-リュウシシン
function c43748308.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(43748308,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c43748308.setcon)
e2:SetTarget(c43748308.settg)
e2:SetOperation(c43748308.setop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43748308,1))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c43748308.spcost)
e3:SetTarget(c43748308.sptg)
e3:SetOperation(c43748308.spop)
c:RegisterEffect(e3)
end
function c43748308.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and re:GetHandler():IsSetCard(0x7c) and e:GetHandler():GetFlagEffect(1)>0
end
function c43748308.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c43748308.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c43748308.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c43748308.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c43748308.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
function c43748308.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c43748308.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
or Duel.IsPlayerAffectedByEffect(tp,100235056) end
if Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,100235056) or not Duel.SelectYesNo(tp,aux.Stringid(100235056,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c43748308.spfilter(c,e,tp)
return c:IsSetCard(0x79) and c:GetCode()~=43748308 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c43748308.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c43748308.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c43748308.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c43748308.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c43748308.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 c44595286.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMING_TOHAND+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c44595286.condition)
e1:SetCost(c44595286.cost)
e1:SetTarget(c44595286.target)
e1:SetOperation(c44595286.activate)
c:RegisterEffect(e1)
end
c44595286.card_code_list={56433456}
function c44595286.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(56433456)
end
function c44595286.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c44595286.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c44595286.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c44595286.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c44595286.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end
end
function c44595286.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local g2=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local opt=0
if g1:GetCount()>0 and g2:GetCount()>0 then
opt=Duel.SelectOption(tp,aux.Stringid(44595286,0),aux.Stringid(44595286,1))+1
elseif g1:GetCount()>0 then opt=1
elseif g2:GetCount()>0 then opt=2
end
if opt==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
elseif opt==2 then
Duel.ConfirmCards(tp,g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g2:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
end
--紫炎の道場
function c47436247.initial_effect(c)
c:EnableCounterPermit(0x3)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c47436247.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(aux.Stringid(47436247,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c47436247.spcost)
e4:SetTarget(c47436247.sptg)
e4:SetOperation(c47436247.spop)
c:RegisterEffect(e4)
end
c47436247.counter_add_list={0x3}
function c47436247.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d)
end
function c47436247.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c47436247.ctfilter,1,nil) then
e:GetHandler():AddCounter(0x3,1)
end
end
function c47436247.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
local ct=e:GetHandler():GetCounter(0x3)
e:SetLabel(ct)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c47436247.filter(c,ct,e,tp)
return c:IsLevelBelow(ct) and (c:IsSetCard(0x3d) or c:IsSetCard(0x20))
and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c47436247.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c47436247.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(0x3),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c47436247.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47436247.filter,tp,LOCATION_DECK,0,1,1,nil,ct,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--コーリング・ノヴァ
function c48783998.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(48783998,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c48783998.condition)
e1:SetTarget(c48783998.target)
e1:SetOperation(c48783998.operation)
c:RegisterEffect(e1)
end
c48783998.card_code_list={56433456}
function c48783998.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c48783998.filter1(c,e,tp)
return c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c48783998.filter2(c,e,tp)
return (c:IsCode(18036057) or (c:IsAttackBelow(1500) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY)))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c48783998.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
if not Duel.IsEnvironment(56433456) then
return Duel.IsExistingMatchingCard(c48783998.filter1,tp,LOCATION_DECK,0,1,nil,e,tp)
else
return Duel.IsExistingMatchingCard(c48783998.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c48783998.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if not Duel.IsEnvironment(56433456) then
g=Duel.SelectMatchingCard(tp,c48783998.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
else
g=Duel.SelectMatchingCard(tp,c48783998.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
end
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--天空聖者メルティウス
function c49905576.initial_effect(c)
--recover&destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c49905576.drop)
c:RegisterEffect(e1)
end
c49905576.card_code_list={56433456}
function c49905576.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_COUNTER) or not c:IsLocation(LOCATION_MZONE) or not c:IsFaceup() then return end
Duel.Recover(tp,1000,REASON_EFFECT)
if not Duel.IsEnvironment(56433456) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
--天空賢者ミネルヴァ
function c53666449.initial_effect(c)
--atk
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_MZONE)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c53666449.atkcon)
e1:SetOperation(c53666449.atkop)
c:RegisterEffect(e1)
end
c53666449.card_code_list={56433456}
function c53666449.atkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_COUNTER) and e:GetHandler():GetFlagEffect(1)>0
end
function c53666449.thfilter(c,code)
return c:IsType(TYPE_COUNTER) and not c:IsCode(code) and c:IsAbleToHand()
end
function c53666449.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local rc=re:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c53666449.thfilter),tp,LOCATION_GRAVE,0,nil,rc:GetCode())
if Duel.IsEnvironment(56433456) and g:GetCount()>0 then
Duel.Hint(HINT_CARD,0,53666449)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--六武院
function c53819808.initial_effect(c)
c:EnableCounterPermit(0x3)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c53819808.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk down
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(c53819808.val)
c:RegisterEffect(e4)
end
c53819808.counter_add_list={0x3}
function c53819808.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d)
end
function c53819808.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c53819808.ctfilter,1,nil) then
e:GetHandler():AddCounter(0x3,1)
end
end
function c53819808.val(e)
return e:GetHandler():GetCounter(0x3)*-100
end
--マスター・ヒュペリオン
function c55794644.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c55794644.hspcon)
e1:SetOperation(c55794644.hspop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55794644,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c55794644.condition)
e2:SetCost(c55794644.cost)
e2:SetTarget(c55794644.target)
e2:SetOperation(c55794644.operation)
c:RegisterEffect(e2)
end
c55794644.card_code_list={56433456}
function c55794644.spfilter(c)
return c:IsSetCard(0x44) and c:IsAbleToRemoveAsCost() and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup())
end
function c55794644.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=-1 then return false end
if ft<=0 then
return Duel.IsExistingMatchingCard(c55794644.spfilter,tp,LOCATION_MZONE,0,1,nil)
else return Duel.IsExistingMatchingCard(c55794644.spfilter,tp,0x16,0,1,nil) end
end
function c55794644.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then
local g=Duel.SelectMatchingCard(tp,c55794644.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
else
local g=Duel.SelectMatchingCard(tp,c55794644.spfilter,tp,0x16,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c55794644.condition(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsEnvironment(56433456) then return e:GetHandler():GetFlagEffect(55794644)<2
else return e:GetHandler():GetFlagEffect(55794644)<1 end
end
function c55794644.costfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c55794644.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c55794644.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c55794644.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c55794644.target(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)
e:GetHandler():RegisterFlagEffect(55794644,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c55794644.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--雷電龍-サンダー・ドラゴン
function c56713174.initial_effect(c)
--search itself
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56713174,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,56713174)
e1:SetCost(c56713174.cost)
e1:SetTarget(c56713174.target)
e1:SetOperation(c56713174.operation)
c:RegisterEffect(e1)
c56713174.discard_effect=e1
--search thunder dragon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(56713174,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,56713174)
e2:SetTarget(c56713174.thtg)
e2:SetOperation(c56713174.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c56713174.thcon)
c:RegisterEffect(e3)
end
function c56713174.cost(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 c56713174.filter(c)
return c:IsCode(56713174) and c:IsAbleToHand()
end
function c56713174.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c56713174.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c56713174.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c56713174.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c56713174.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c56713174.thfilter(c)
return c:IsSetCard(0x11c) and not c:IsCode(56713174) and c:IsAbleToHand()
end
function c56713174.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c56713174.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c56713174.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c56713174.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 c6353603.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(6353603,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCountLimit(1)
e1:SetCondition(c6353603.setcon)
e1:SetTarget(c6353603.settg)
e1:SetOperation(c6353603.setop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(6353603,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c6353603.destg)
e2:SetOperation(c6353603.desop)
c:RegisterEffect(e2)
end
function c6353603.setcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c6353603.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c6353603.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c6353603.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c6353603.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c6353603.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
function c6353603.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c6353603.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil)
or (Duel.IsPlayerAffectedByEffect(tp,100235056) and Duel.IsExistingTarget(aux.TRUE,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)) end
if Duel.IsExistingMatchingCard(c6353603.filter1,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,100235056) or not Duel.SelectYesNo(tp,aux.Stringid(100235056,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c6353603.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g1,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end
function c6353603.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 c70355994.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70355994,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1)
e1:SetCondition(c70355994.setcon)
e1:SetTarget(c70355994.settg)
e1:SetOperation(c70355994.setop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(70355994,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c70355994.descost)
e2:SetTarget(c70355994.destg)
e2:SetOperation(c70355994.desop)
c:RegisterEffect(e2)
end
function c70355994.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsReason(REASON_BATTLE)
end
function c70355994.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c70355994.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c70355994.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c70355994.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c70355994.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
function c70355994.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(c70355994.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c70355994.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c70355994.filter1,tp,LOCATION_ONFIELD,0,1,nil)
or (Duel.IsPlayerAffectedByEffect(tp,100235056) and Duel.IsExistingTarget(c70355994.filter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)) end
if Duel.IsExistingMatchingCard(c70355994.filter1,tp,LOCATION_ONFIELD,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,100235056) or not Duel.SelectYesNo(tp,aux.Stringid(100235056,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c70355994.filter1,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c70355994.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c70355994.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c70355994.filter2(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,c70355994.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end
function c70355994.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 c72345736.initial_effect(c)
c:EnableCounterPermit(0x3)
c:SetCounterLimit(0x3,2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c72345736.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetDescription(aux.Stringid(72345736,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCost(c72345736.drcost)
e4:SetTarget(c72345736.drtg)
e4:SetOperation(c72345736.drop)
c:RegisterEffect(e4)
end
c72345736.counter_add_list={0x3}
function c72345736.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d)
end
function c72345736.ctop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(c72345736.ctfilter,1,nil) then
e:GetHandler():AddCounter(0x3,1)
end
end
function c72345736.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
local ct=e:GetHandler():GetCounter(0x3)
e:SetLabel(ct)
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c72345736.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetCounter(0x3)>0 and Duel.IsPlayerCanDraw(tp,c:GetCounter(0x3)) end
local ct=e:GetLabel()
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c72345736.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--PSYフレームギア・δ
function c74203495.initial_effect(c)
c:EnableUnsummonable()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c74203495.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74203495,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c74203495.condition)
e2:SetTarget(c74203495.target)
e2:SetOperation(c74203495.operation)
c:RegisterEffect(e2)
end
function c74203495.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c74203495.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,100235086))
and ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end
function c74203495.spfilter(c,e,tp)
return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74203495.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c74203495.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c74203495.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c74203495.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(74203495,RESET_EVENT+RESETS_STANDARD,0,1,fid)
c:RegisterFlagEffect(74203495,RESET_EVENT+RESETS_STANDARD,0,1,fid)
Duel.SpecialSummonComplete()
g:AddCard(c)
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c74203495.rmcon)
e1:SetOperation(c74203495.rmop)
Duel.RegisterEffect(e1,tp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c74203495.rmfilter(c,fid)
return c:GetFlagEffectLabel(74203495)==fid
end
function c74203495.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c74203495.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c74203495.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c74203495.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
--雄炎星-スネイリン
function c75132317.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75132317,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c75132317.setcon)
e1:SetTarget(c75132317.settg)
e1:SetOperation(c75132317.setop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75132317,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c75132317.drcon)
e2:SetCost(c75132317.drcost)
e2:SetTarget(c75132317.drtg)
e2:SetOperation(c75132317.drop)
c:RegisterEffect(e2)
end
function c75132317.tgfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c75132317.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c75132317.tgfilter,1,nil,tp)
end
function c75132317.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c75132317.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c75132317.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c75132317.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c75132317.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
function c75132317.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
end
function c75132317.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c75132317.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
or Duel.IsPlayerAffectedByEffect(tp,100235056) end
if Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,100235056) or not Duel.SelectYesNo(tp,aux.Stringid(100235056,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c75132317.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c75132317.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--PSYフレームギア・α
function c75425043.initial_effect(c)
c:EnableUnsummonable()
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c75425043.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75425043,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c75425043.condition)
e2:SetTarget(c75425043.target)
e2:SetOperation(c75425043.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c75425043.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c75425043.cfilter(c,tp)
return c:GetSummonPlayer()==tp
end
function c75425043.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or Duel.IsPlayerAffectedByEffect(tp,100235086))
and eg:IsExists(c75425043.cfilter,1,nil,1-tp)
end
function c75425043.spfilter1(c,e,tp)
return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c75425043.thfilter,tp,LOCATION_DECK,0,1,c)
end
function c75425043.spfilter2(c,e,tp)
return c:IsCode(49036338) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c75425043.thfilter0,tp,LOCATION_DECK,0,1,c)
end
function c75425043.thfilter0(c)
return c:IsSetCard(0xc1) and not c:IsCode(75425043)
end
function c75425043.thfilter(c)
return c:IsSetCard(0xc1) and not c:IsCode(75425043) and c:IsAbleToHand()
end
function c75425043.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c75425043.spfilter1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75425043.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c75425043.spfilter2),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
local tc=g:GetFirst()
local c=e:GetHandler()
local fid=c:GetFieldID()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(75425043,RESET_EVENT+RESETS_STANDARD,0,1,fid)
c:RegisterFlagEffect(75425043,RESET_EVENT+RESETS_STANDARD,0,1,fid)
Duel.SpecialSummonComplete()
g:AddCard(c)
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c75425043.rmcon)
e1:SetOperation(c75425043.rmop)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c75425043.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
function c75425043.rmfilter(c,fid)
return c:GetFlagEffectLabel(75425043)==fid
end
function c75425043.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c75425043.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c75425043.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c75425043.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
--神罰
function c81066751.initial_effect(c)
--Activate(effect)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c81066751.condition)
e4:SetTarget(c81066751.target)
e4:SetOperation(c81066751.activate)
c:RegisterEffect(e4)
end
c81066751.card_code_list={56433456}
function c81066751.cfilter(c)
return c:IsFaceup() and c:IsCode(56433456)
end
function c81066751.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c81066751.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c81066751.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c81066751.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--雷鳥龍-サンダー・ドラゴン
function c83107873.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83107873,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,83107873)
e1:SetCost(c83107873.cost)
e1:SetTarget(c83107873.target)
e1:SetOperation(c83107873.operation)
c:RegisterEffect(e1)
c83107873.discard_effect=e1
--shuffle and draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(83107873,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,83107873)
e2:SetTarget(c83107873.thtg)
e2:SetOperation(c83107873.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c83107873.thcon)
c:RegisterEffect(e3)
end
function c83107873.cost(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 c83107873.spfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x11c) and not c:IsCode(83107873) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c83107873.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c83107873.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c83107873.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c83107873.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c83107873.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c83107873.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c83107873.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,Card.IsAbleToDeck,p,LOCATION_HAND,0,1,63,nil)
if g:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,g:GetCount(),REASON_EFFECT)
end
--ホーリー・ジェラル
function c84177693.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(84177693,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c84177693.reccon)
e1:SetTarget(c84177693.rectg)
e1:SetOperation(c84177693.recop)
c:RegisterEffect(e1)
end
c84177693.card_code_list={56433456}
function c84177693.reccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_BATTLE) and Duel.IsEnvironment(56433456)
end
function c84177693.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c84177693.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--力の代行者 マーズ
function c91123920.initial_effect(c)
--immune spell
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c91123920.efilter)
c:RegisterEffect(e1)
--update atk,def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c91123920.val)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
c91123920.card_code_list={56433456}
function c91123920.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
function c91123920.val(e,c)
local tp=c:GetControler()
if not Duel.IsEnvironment(56433456,tp) then return 0 end
local v=Duel.GetLP(tp)-Duel.GetLP(1-tp)
if v>0 then return v else return 0 end
end
--神秘の代行者 アース
function c91188343.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(91188343,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c91188343.tg)
e1:SetOperation(c91188343.op)
c:RegisterEffect(e1)
end
c91188343.card_code_list={56433456}
function c91188343.filter1(c)
return c:IsSetCard(0x44) and c:GetCode()~=91188343 and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c91188343.filter2(c)
return ((c:IsSetCard(0x44) and c:GetCode()~=91188343 and c:IsType(TYPE_MONSTER)) or c:IsCode(55794644)) and c:IsAbleToHand()
end
function c91188343.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsEnvironment(56433456) then
return Duel.IsExistingMatchingCard(c91188343.filter1,tp,LOCATION_DECK,0,1,nil) end
return Duel.IsExistingMatchingCard(c91188343.filter2,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c91188343.op(e,tp,eg,ep,ev,re,r,rp)
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if not Duel.IsEnvironment(56433456) then
g=Duel.SelectMatchingCard(tp,c91188343.filter1,tp,LOCATION_DECK,0,1,1,nil)
else g=Duel.SelectMatchingCard(tp,c91188343.filter2,tp,LOCATION_DECK,0,1,1,nil) end
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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