Commit 8b7791e8 authored by mercury233's avatar mercury233

format: crlf to lf

parent 42fcd894
--闇黒の夢魔鏡 --闇黒の夢魔鏡
function c1050355.initial_effect(c) function c1050355.initial_effect(c)
aux.AddCodeList(c,74665651) aux.AddCodeList(c,74665651)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate --activate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1050355,0)) e2:SetDescription(aux.Stringid(1050355,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,1050355) e2:SetCountLimit(1,1050355)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c1050355.acttg) e2:SetTarget(c1050355.acttg)
e2:SetOperation(c1050355.actop) e2:SetOperation(c1050355.actop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--damage --damage
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c1050355.damcon) e3:SetCondition(c1050355.damcon)
e3:SetOperation(c1050355.damop) e3:SetOperation(c1050355.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c1050355.actfilter(c,tp) function c1050355.actfilter(c,tp)
return c:IsCode(74665651) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsCode(74665651) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end end
function c1050355.acttg(e,tp,eg,ep,ev,re,r,rp,chk) function c1050355.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
end end
function c1050355.actop(e,tp,eg,ep,ev,re,r,rp) function c1050355.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c1050355.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
function c1050355.cfilter1(c) function c1050355.cfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_DARK)
end end
function c1050355.cfilter2(c,tp) function c1050355.cfilter2(c,tp)
return c:GetSummonPlayer()==tp return c:GetSummonPlayer()==tp
end end
function c1050355.damcon(e,tp,eg,ep,ev,re,r,rp) function c1050355.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c1050355.cfilter1,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c1050355.cfilter1,tp,LOCATION_MZONE,0,1,nil)
and eg:IsExists(c1050355.cfilter2,1,nil,1-tp) and eg:IsExists(c1050355.cfilter2,1,nil,1-tp)
end end
function c1050355.damop(e,tp,eg,ep,ev,re,r,rp) function c1050355.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1050355) Duel.Hint(HINT_CARD,0,1050355)
Duel.Damage(1-tp,300,REASON_EFFECT) Duel.Damage(1-tp,300,REASON_EFFECT)
end end
--夢魔鏡の白騎士-ルペウス --夢魔鏡の白騎士-ルペウス
function c1872843.initial_effect(c) function c1872843.initial_effect(c)
aux.AddCodeList(c,1050355) aux.AddCodeList(c,1050355)
--indestructable --indestructable
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1872843,0)) e1:SetDescription(aux.Stringid(1872843,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,1872843) e1:SetCountLimit(1,1872843)
e1:SetCondition(c1872843.indcon) e1:SetCondition(c1872843.indcon)
e1:SetOperation(c1872843.indop) e1:SetOperation(c1872843.indop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1872843,1)) e2:SetDescription(aux.Stringid(1872843,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1872844) e2:SetCountLimit(1,1872844)
e2:SetCondition(c1872843.spcon) e2:SetCondition(c1872843.spcon)
e2:SetCost(c1872843.spcost) e2:SetCost(c1872843.spcost)
e2:SetTarget(c1872843.sptg) e2:SetTarget(c1872843.sptg)
e2:SetOperation(c1872843.spop) e2:SetOperation(c1872843.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c1872843.indcon(e,tp,eg,ep,ev,re,r,rp) function c1872843.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER) return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end end
function c1872843.indop(e,tp,eg,ep,ev,re,r,rp) function c1872843.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function c1872843.spcon(e,tp,eg,ep,ev,re,r,rp) function c1872843.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end end
function c1872843.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c1872843.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c1872843.spfilter(c,e,tp) function c1872843.spfilter(c,e,tp)
return c:IsCode(38267552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(38267552) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c1872843.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c1872843.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c1872843.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c1872843.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c1872843.spop(e,tp,eg,ep,ev,re,r,rp) function c1872843.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1872843.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c1872843.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--夢現の夢魔鏡 --夢現の夢魔鏡
function c25964547.initial_effect(c) function c25964547.initial_effect(c)
aux.AddCodeList(c,74665651,1050355) aux.AddCodeList(c,74665651,1050355)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,25964547+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,25964547+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c25964547.target) e1:SetTarget(c25964547.target)
e1:SetOperation(c25964547.activate) e1:SetOperation(c25964547.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c25964547.cfilter1(c,tp) function c25964547.cfilter1(c,tp)
return c:IsCode(74665651,1050355) and c:CheckUniqueOnField(tp) and not c:IsForbidden() return c:IsCode(74665651,1050355) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
and Duel.IsExistingMatchingCard(c25964547.cfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c25964547.cfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,tp,c:GetCode())
end end
function c25964547.cfilter2(c,tp,code) function c25964547.cfilter2(c,tp,code)
return c:IsCode(74665651,1050355) and not c:IsCode(code) and c:CheckUniqueOnField(1-tp) and not c:IsForbidden() return c:IsCode(74665651,1050355) and not c:IsCode(code) and c:CheckUniqueOnField(1-tp) and not c:IsForbidden()
end end
function c25964547.target(e,tp,eg,ep,ev,re,r,rp,chk) function c25964547.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c25964547.cfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c25964547.cfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
end end
function c25964547.activate(e,tp,eg,ep,ev,re,r,rp) function c25964547.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25964547,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25964547,0))
local g1=Duel.SelectMatchingCard(tp,c25964547.cfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp) local g1=Duel.SelectMatchingCard(tp,c25964547.cfilter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
if not tc1 then return end if not tc1 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25964547,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(25964547,1))
local g2=Duel.SelectMatchingCard(tp,c25964547.cfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp,tc1:GetCode()) local g2=Duel.SelectMatchingCard(tp,c25964547.cfilter2,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp,tc1:GetCode())
local tc2=g2:GetFirst() local tc2=g2:GetFirst()
if Duel.MoveToField(tc1,tp,tp,LOCATION_FZONE,POS_FACEUP,false) then if Duel.MoveToField(tc1,tp,tp,LOCATION_FZONE,POS_FACEUP,false) then
if Duel.MoveToField(tc2,tp,1-tp,LOCATION_FZONE,POS_FACEUP,false) then if Duel.MoveToField(tc2,tp,1-tp,LOCATION_FZONE,POS_FACEUP,false) then
tc2:SetStatus(STATUS_EFFECT_ENABLED,true) tc2:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
tc1:SetStatus(STATUS_EFFECT_ENABLED,true) tc1:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
end end
--夢魔鏡の夢物語 --夢魔鏡の夢物語
function c37444964.initial_effect(c) function c37444964.initial_effect(c)
aux.AddCodeList(c,74665651,1050355) aux.AddCodeList(c,74665651,1050355)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_TODECK+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,37444964+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,37444964+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c37444964.condition) e1:SetCondition(c37444964.condition)
e1:SetTarget(c37444964.target) e1:SetTarget(c37444964.target)
e1:SetOperation(c37444964.activate) e1:SetOperation(c37444964.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy replace --destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c37444964.reptg) e2:SetTarget(c37444964.reptg)
e2:SetValue(c37444964.repval) e2:SetValue(c37444964.repval)
e2:SetOperation(c37444964.repop) e2:SetOperation(c37444964.repop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c37444964.cfilter(c) function c37444964.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x131) return c:IsFaceup() and c:IsSetCard(0x131)
end end
function c37444964.condition(e,tp,eg,ep,ev,re,r,rp) function c37444964.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c37444964.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c37444964.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c37444964.filter1(c) function c37444964.filter1(c)
return c:IsFaceup() and c:IsCode(74665651) and c:IsAbleToDeck() return c:IsFaceup() and c:IsCode(74665651) and c:IsAbleToDeck()
end end
function c37444964.filter2(c) function c37444964.filter2(c)
return c:IsFaceup() and c:IsCode(1050355) and c:IsAbleToDeck() return c:IsFaceup() and c:IsCode(1050355) and c:IsAbleToDeck()
end end
function c37444964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c37444964.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c37444964.filter1,tp,LOCATION_REMOVED,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c37444964.filter1,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingTarget(c37444964.filter2,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingTarget(c37444964.filter2,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c37444964.filter1,tp,LOCATION_REMOVED,0,1,1,nil) local g1=Duel.SelectTarget(tp,c37444964.filter1,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,c37444964.filter2,tp,LOCATION_REMOVED,0,1,1,nil) local g2=Duel.SelectTarget(tp,c37444964.filter2,tp,LOCATION_REMOVED,0,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g3,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g3,1,0,0)
end end
function c37444964.activate(e,tp,eg,ep,ev,re,r,rp) function c37444964.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e)) local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.HintSelection(sg) Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end end
end end
end end
function c37444964.repfilter(c,tp) function c37444964.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x131) return c:IsFaceup() and c:IsSetCard(0x131)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end end
function c37444964.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c37444964.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c37444964.repfilter,1,nil,tp) end if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c37444964.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
function c37444964.repval(e,c) function c37444964.repval(e,c)
return c37444964.repfilter(c,e:GetHandlerPlayer()) return c37444964.repfilter(c,e:GetHandlerPlayer())
end end
function c37444964.repop(e,tp,eg,ep,ev,re,r,rp) function c37444964.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end end
--夢魔鏡の黒騎士-ルペウス --夢魔鏡の黒騎士-ルペウス
function c38267552.initial_effect(c) function c38267552.initial_effect(c)
aux.AddCodeList(c,74665651) aux.AddCodeList(c,74665651)
--indestructable --indestructable
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38267552,0)) e1:SetDescription(aux.Stringid(38267552,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,38267552) e1:SetCountLimit(1,38267552)
e1:SetCondition(c38267552.descon) e1:SetCondition(c38267552.descon)
e1:SetTarget(c38267552.destg) e1:SetTarget(c38267552.destg)
e1:SetOperation(c38267552.desop) e1:SetOperation(c38267552.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38267552,1)) e2:SetDescription(aux.Stringid(38267552,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,38267553) e2:SetCountLimit(1,38267553)
e2:SetCondition(c38267552.spcon) e2:SetCondition(c38267552.spcon)
e2:SetCost(c38267552.spcost) e2:SetCost(c38267552.spcost)
e2:SetTarget(c38267552.sptg) e2:SetTarget(c38267552.sptg)
e2:SetOperation(c38267552.spop) e2:SetOperation(c38267552.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c38267552.descon(e,tp,eg,ep,ev,re,r,rp) function c38267552.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER) return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end end
function c38267552.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38267552.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c38267552.desop(e,tp,eg,ep,ev,re,r,rp) function c38267552.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c38267552.spcon(e,tp,eg,ep,ev,re,r,rp) function c38267552.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end end
function c38267552.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c38267552.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c38267552.spfilter(c,e,tp) function c38267552.spfilter(c,e,tp)
return c:IsCode(1872843) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(1872843) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c38267552.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c38267552.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c38267552.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c38267552.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c38267552.spop(e,tp,eg,ep,ev,re,r,rp) function c38267552.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c38267552.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c38267552.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
This diff is collapsed.
--夢魔鏡の乙女-イケロス --夢魔鏡の乙女-イケロス
function c49389190.initial_effect(c) function c49389190.initial_effect(c)
aux.AddCodeList(c,1050355) aux.AddCodeList(c,1050355)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49389190,0)) e1:SetDescription(aux.Stringid(49389190,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,49389190) e1:SetCountLimit(1,49389190)
e1:SetCondition(c49389190.thcon) e1:SetCondition(c49389190.thcon)
e1:SetTarget(c49389190.thtg) e1:SetTarget(c49389190.thtg)
e1:SetOperation(c49389190.thop) e1:SetOperation(c49389190.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49389190,1)) e2:SetDescription(aux.Stringid(49389190,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,49389191) e2:SetCountLimit(1,49389191)
e2:SetCondition(c49389190.spcon) e2:SetCondition(c49389190.spcon)
e2:SetCost(c49389190.spcost) e2:SetCost(c49389190.spcost)
e2:SetTarget(c49389190.sptg) e2:SetTarget(c49389190.sptg)
e2:SetOperation(c49389190.spop) e2:SetOperation(c49389190.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c49389190.thcon(e,tp,eg,ep,ev,re,r,rp) function c49389190.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER) return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end end
function c49389190.thfilter(c) function c49389190.thfilter(c)
return c:IsSetCard(0x131) and not c:IsCode(49389190) and c:IsAbleToHand() return c:IsSetCard(0x131) and not c:IsCode(49389190) and c:IsAbleToHand()
end end
function c49389190.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c49389190.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49389190.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c49389190.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c49389190.thop(e,tp,eg,ep,ev,re,r,rp) function c49389190.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c49389190.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c49389190.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c49389190.spcon(e,tp,eg,ep,ev,re,r,rp) function c49389190.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end end
function c49389190.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c49389190.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c49389190.spfilter(c,e,tp) function c49389190.spfilter(c,e,tp)
return c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c49389190.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c49389190.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c49389190.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c49389190.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c49389190.spop(e,tp,eg,ep,ev,re,r,rp) function c49389190.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49389190.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c49389190.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--氷結界の軍師 --氷結界の軍師
function c50032342.initial_effect(c) function c50032342.initial_effect(c)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50032342,0)) e1:SetDescription(aux.Stringid(50032342,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c50032342.cost) e1:SetCost(c50032342.cost)
e1:SetTarget(c50032342.target) e1:SetTarget(c50032342.target)
e1:SetOperation(c50032342.operation) e1:SetOperation(c50032342.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c50032342.cfilter(c,e,tp) function c50032342.cfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
else else
return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp) return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp)
end end
end end
function c50032342.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c50032342.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50032342.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c50032342.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c50032342.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c50032342.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local te=tc:IsHasEffect(18319762,tp) local te=tc:IsHasEffect(18319762,tp)
if te then if te then
te:UseCountLimit(tp) te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else else
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
end end
function c50032342.target(e,tp,eg,ep,ev,re,r,rp,chk) function c50032342.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c50032342.operation(e,tp,eg,ep,ev,re,r,rp) function c50032342.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
--氷結界の龍 ブリューナク --氷結界の龍 ブリューナク
function c50321796.initial_effect(c) function c50321796.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50321796,0)) e1:SetDescription(aux.Stringid(50321796,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,50321796) e1:SetCountLimit(1,50321796)
e1:SetCost(c50321796.cost) e1:SetCost(c50321796.cost)
e1:SetTarget(c50321796.target) e1:SetTarget(c50321796.target)
e1:SetOperation(c50321796.operation) e1:SetOperation(c50321796.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c50321796.costfilter(c,e,tp) function c50321796.costfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsDiscardable() and c:IsAbleToGraveAsCost() return c:IsDiscardable() and c:IsAbleToGraveAsCost()
else else
return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp) return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp)
end end
end end
function c50321796.fselect(g) function c50321796.fselect(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
end end
function c50321796.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c50321796.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50321796.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c50321796.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
local rt=Duel.GetTargetCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil) local rt=Duel.GetTargetCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(c50321796.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c50321796.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local cg=g:SelectSubGroup(tp,c50321796.fselect,false,1,rt) local cg=g:SelectSubGroup(tp,c50321796.fselect,false,1,rt)
e:SetLabel(cg:GetCount()) e:SetLabel(cg:GetCount())
local tc=cg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst() local tc=cg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
if tc then if tc then
local te=tc:IsHasEffect(18319762,tp) local te=tc:IsHasEffect(18319762,tp)
te:UseCountLimit(tp) te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
cg:RemoveCard(tc) cg:RemoveCard(tc)
end end
Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD)
end end
function c50321796.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c50321796.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
local ct=e:GetLabel() local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tg=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,ct,ct,nil) local tg=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,tg,ct,0,0)
end end
function c50321796.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c50321796.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e) local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then if rg:GetCount()>0 then
Duel.SendtoHand(rg,nil,REASON_EFFECT) Duel.SendtoHand(rg,nil,REASON_EFFECT)
end end
end end
--氷結界の風水師 --氷結界の風水師
function c56704140.initial_effect(c) function c56704140.initial_effect(c)
--untargetable --untargetable
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56704140,0)) e1:SetDescription(aux.Stringid(56704140,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c56704140.cost) e1:SetCost(c56704140.cost)
e1:SetTarget(c56704140.target) e1:SetTarget(c56704140.target)
e1:SetOperation(c56704140.operation) e1:SetOperation(c56704140.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c56704140.costfilter(c,e,tp) function c56704140.costfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsDiscardable() return c:IsDiscardable()
else else
return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp) return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp)
end end
end end
function c56704140.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c56704140.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c56704140.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c56704140.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c56704140.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c56704140.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local te=tc:IsHasEffect(18319762,tp) local te=tc:IsHasEffect(18319762,tp)
if te then if te then
te:UseCountLimit(tp) te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end end
end end
function c56704140.target(e,tp,eg,ep,ev,re,r,rp,chk) function c56704140.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
local aat=Duel.AnnounceAttribute(tp,1,0x7f) local aat=Duel.AnnounceAttribute(tp,1,0x7f)
e:SetLabel(aat) e:SetLabel(aat)
end end
function c56704140.operation(e,tp,eg,ep,ev,re,r,rp) function c56704140.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetLabel(e:GetLabel()) e1:SetLabel(e:GetLabel())
e1:SetValue(c56704140.tgval) e1:SetValue(c56704140.tgval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c56704140.tgval(e,c) function c56704140.tgval(e,c)
return c:IsAttribute(e:GetLabel()) and not c:IsImmuneToEffect(e) return c:IsAttribute(e:GetLabel()) and not c:IsImmuneToEffect(e)
end end
--夢魔鏡の夢占い --夢魔鏡の夢占い
function c61459246.initial_effect(c) function c61459246.initial_effect(c)
aux.AddCodeList(c,74665651,1050355) aux.AddCodeList(c,74665651,1050355)
--activate(effect) --activate(effect)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,61459246+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,61459246+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c61459246.condition1) e1:SetCondition(c61459246.condition1)
e1:SetTarget(c61459246.target1) e1:SetTarget(c61459246.target1)
e1:SetOperation(c61459246.activate1) e1:SetOperation(c61459246.activate1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate(spsummon) --activate(spsummon)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_SPSUMMON) e2:SetCode(EVENT_SPSUMMON)
e2:SetCountLimit(1,61459246+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,61459246+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c61459246.condition2) e2:SetCondition(c61459246.condition2)
e2:SetTarget(c61459246.target2) e2:SetTarget(c61459246.target2)
e2:SetOperation(c61459246.activate2) e2:SetOperation(c61459246.activate2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c61459246.condition1(e,tp,eg,ep,ev,re,r,rp) function c61459246.condition1(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and rp==1-tp and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and rp==1-tp and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end end
function c61459246.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c61459246.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function c61459246.activate1(e,tp,eg,ep,ev,re,r,rp) function c61459246.activate1(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function c61459246.condition2(e,tp,eg,ep,ev,re,r,rp) function c61459246.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and rp==1-tp and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) return Duel.GetCurrentChain()==0 and rp==1-tp and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end end
function c61459246.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c61459246.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end end
function c61459246.activate2(e,tp,eg,ep,ev,re,r,rp) function c61459246.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg) Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
--夢幻の夢魔鏡 --夢幻の夢魔鏡
function c62171834.initial_effect(c) function c62171834.initial_effect(c)
aux.AddCodeList(c,74665651,1050355) aux.AddCodeList(c,74665651,1050355)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,62171834+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,62171834+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c62171834.activate) e1:SetOperation(c62171834.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk/def up --atk/def up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(500) e2:SetValue(500)
e2:SetCondition(c62171834.upcon) e2:SetCondition(c62171834.upcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atk/def down --atk/def down
local e4=e2:Clone() local e4=e2:Clone()
e4:SetTargetRange(0,LOCATION_MZONE) e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetValue(-500) e4:SetValue(-500)
e4:SetCondition(c62171834.downcon) e4:SetCondition(c62171834.downcon)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e4:Clone() local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE) e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c62171834.thfilter(c) function c62171834.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x131) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x131) and c:IsAbleToHand()
end end
function c62171834.activate(e,tp,eg,ep,ev,re,r,rp) function c62171834.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c62171834.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c62171834.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(62171834,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(62171834,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
function c62171834.upcon(e) function c62171834.upcon(e)
return Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) return Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end end
function c62171834.downcon(e) function c62171834.downcon(e)
return Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) return Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end end
--夢魔鏡の聖獣-パンタス --夢魔鏡の聖獣-パンタス
function c62393472.initial_effect(c) function c62393472.initial_effect(c)
aux.AddCodeList(c,1050355) aux.AddCodeList(c,1050355)
--spsummon1 --spsummon1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62393472,0)) e1:SetDescription(aux.Stringid(62393472,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,62393472) e1:SetCountLimit(1,62393472)
e1:SetCondition(c62393472.spcon1) e1:SetCondition(c62393472.spcon1)
e1:SetTarget(c62393472.sptg1) e1:SetTarget(c62393472.sptg1)
e1:SetOperation(c62393472.spop1) e1:SetOperation(c62393472.spop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon2 --spsummon2
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62393472,1)) e2:SetDescription(aux.Stringid(62393472,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_END)
e2:SetCountLimit(1,62393473) e2:SetCountLimit(1,62393473)
e2:SetCondition(c62393472.spcon2) e2:SetCondition(c62393472.spcon2)
e2:SetCost(c62393472.spcost2) e2:SetCost(c62393472.spcost2)
e2:SetTarget(c62393472.sptg2) e2:SetTarget(c62393472.sptg2)
e2:SetOperation(c62393472.spop2) e2:SetOperation(c62393472.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c62393472.spcon1(e,tp,eg,ep,ev,re,r,rp) function c62393472.spcon1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER) return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER)
end end
function c62393472.spfilter1(c,e,tp) function c62393472.spfilter1(c,e,tp)
return c:IsSetCard(0x131) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(62393472) return c:IsSetCard(0x131) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(62393472)
end end
function c62393472.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62393472.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62393472.spfilter1(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c62393472.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c62393472.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c62393472.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c62393472.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c62393472.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c62393472.spop1(e,tp,eg,ep,ev,re,r,rp) function c62393472.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
function c62393472.spcon2(e,tp,eg,ep,ev,re,r,rp) function c62393472.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) and Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE)
end end
function c62393472.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c62393472.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST) Duel.Release(c,REASON_COST)
end end
function c62393472.spfilter2(c,e,tp) function c62393472.spfilter2(c,e,tp)
return c:IsCode(99792080) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(99792080) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c62393472.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c62393472.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c62393472.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c62393472.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c62393472.spop2(e,tp,eg,ep,ev,re,r,rp) function c62393472.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c62393472.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c62393472.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--氷結界の龍 グングニール --氷結界の龍 グングニール
function c65749035.initial_effect(c) function c65749035.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WATER),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WATER),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65749035,0)) e1:SetDescription(aux.Stringid(65749035,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c65749035.cost) e1:SetCost(c65749035.cost)
e1:SetTarget(c65749035.target) e1:SetTarget(c65749035.target)
e1:SetOperation(c65749035.operation) e1:SetOperation(c65749035.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c65749035.costfilter(c,e,tp) function c65749035.costfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsDiscardable() and c:IsAbleToGraveAsCost() return c:IsDiscardable() and c:IsAbleToGraveAsCost()
else else
return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp) return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp)
end end
end end
function c65749035.fselect(g) function c65749035.fselect(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
end end
function c65749035.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c65749035.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65749035.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c65749035.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
local rt=Duel.GetTargetCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local rt=Duel.GetTargetCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if rt>2 then rt=2 end if rt>2 then rt=2 end
local g=Duel.GetMatchingGroup(c65749035.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c65749035.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local cg=g:SelectSubGroup(tp,c65749035.fselect,false,1,rt) local cg=g:SelectSubGroup(tp,c65749035.fselect,false,1,rt)
e:SetLabel(cg:GetCount()) e:SetLabel(cg:GetCount())
local tc=cg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst() local tc=cg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
if tc then if tc then
local te=tc:IsHasEffect(18319762,tp) local te=tc:IsHasEffect(18319762,tp)
te:UseCountLimit(tp) te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
cg:RemoveCard(tc) cg:RemoveCard(tc)
end end
Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(cg,REASON_COST+REASON_DISCARD)
end end
function c65749035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c65749035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local ct=e:GetLabel() local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local eg=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,ct,ct,nil) local eg=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,ct,0,0)
end end
function c65749035.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c65749035.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e) local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then if rg:GetCount()>0 then
Duel.Destroy(rg,REASON_EFFECT) Duel.Destroy(rg,REASON_EFFECT)
end end
end end
--氷結界の封魔団 --氷結界の封魔団
function c73061465.initial_effect(c) function c73061465.initial_effect(c)
--act limit --act limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(73061465,0)) e1:SetDescription(aux.Stringid(73061465,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c73061465.cost) e1:SetCost(c73061465.cost)
e1:SetOperation(c73061465.operation) e1:SetOperation(c73061465.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73061465.cfilter(c,e,tp) function c73061465.cfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x2f) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
else else
return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp) return e:GetHandler():IsSetCard(0x2f) and c:IsAbleToRemove() and c:IsHasEffect(18319762,tp)
end end
end end
function c73061465.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c73061465.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73061465.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c73061465.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c73061465.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c73061465.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local te=tc:IsHasEffect(18319762,tp) local te=tc:IsHasEffect(18319762,tp)
if te then if te then
te:UseCountLimit(tp) te:UseCountLimit(tp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
else else
Duel.SendtoGrave(tc,REASON_COST) Duel.SendtoGrave(tc,REASON_COST)
end end
end end
function c73061465.operation(e,tp,eg,ep,ev,re,r,rp) function c73061465.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetValue(c73061465.tgval) e1:SetValue(c73061465.tgval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,3) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,3)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73061465.tgval(e,re,rp) function c73061465.tgval(e,re,rp)
return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
--聖光の夢魔鏡 --聖光の夢魔鏡
function c74665651.initial_effect(c) function c74665651.initial_effect(c)
aux.AddCodeList(c,1050355) aux.AddCodeList(c,1050355)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate --activate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74665651,0)) e2:SetDescription(aux.Stringid(74665651,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,74665651) e2:SetCountLimit(1,74665651)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c74665651.acttg) e2:SetTarget(c74665651.acttg)
e2:SetOperation(c74665651.actop) e2:SetOperation(c74665651.actop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--cannot be target --cannot be target
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,LOCATION_MZONE) e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c74665651.limcon) e3:SetCondition(c74665651.limcon)
e3:SetValue(c74665651.atlimit) e3:SetValue(c74665651.atlimit)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,0) e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCondition(c74665651.limcon) e4:SetCondition(c74665651.limcon)
e4:SetTarget(c74665651.tglimit) e4:SetTarget(c74665651.tglimit)
e4:SetValue(aux.tgoval) e4:SetValue(aux.tgoval)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c74665651.actfilter(c,tp) function c74665651.actfilter(c,tp)
return c:IsCode(1050355) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsCode(1050355) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end end
function c74665651.acttg(e,tp,eg,ep,ev,re,r,rp,chk) function c74665651.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
end end
function c74665651.actop(e,tp,eg,ep,ev,re,r,rp) function c74665651.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c74665651.actfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
function c74665651.cfilter(c) function c74665651.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsFaceup() and c:IsSetCard(0x131) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function c74665651.limcon(e) function c74665651.limcon(e)
return Duel.IsExistingMatchingCard(c74665651.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c74665651.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c74665651.limfilter(c,lv) function c74665651.limfilter(c,lv)
return c:IsFaceup() and c:IsSetCard(0x131) and c:GetLevel()>lv return c:IsFaceup() and c:IsSetCard(0x131) and c:GetLevel()>lv
end end
function c74665651.atlimit(e,c) function c74665651.atlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x131) and Duel.IsExistingMatchingCard(c74665651.limfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()) return c:IsFaceup() and c:IsSetCard(0x131) and Duel.IsExistingMatchingCard(c74665651.limfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel())
end end
function c74665651.tglimit(e,c) function c74665651.tglimit(e,c)
return c:IsSetCard(0x131) return c:IsSetCard(0x131)
and Duel.IsExistingMatchingCard(c74665651.limfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel()) and Duel.IsExistingMatchingCard(c74665651.limfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c:GetLevel())
end end
--夢魔鏡の夢魔-イケロス --夢魔鏡の夢魔-イケロス
function c75888208.initial_effect(c) function c75888208.initial_effect(c)
aux.AddCodeList(c,74665651) aux.AddCodeList(c,74665651)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75888208,0)) e1:SetDescription(aux.Stringid(75888208,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,75888208) e1:SetCountLimit(1,75888208)
e1:SetCondition(c75888208.spcon1) e1:SetCondition(c75888208.spcon1)
e1:SetTarget(c75888208.sptg1) e1:SetTarget(c75888208.sptg1)
e1:SetOperation(c75888208.spop1) e1:SetOperation(c75888208.spop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75888208,1)) e2:SetDescription(aux.Stringid(75888208,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,75888209) e2:SetCountLimit(1,75888209)
e2:SetCondition(c75888208.spcon2) e2:SetCondition(c75888208.spcon2)
e2:SetCost(c75888208.spcost2) e2:SetCost(c75888208.spcost2)
e2:SetTarget(c75888208.sptg2) e2:SetTarget(c75888208.sptg2)
e2:SetOperation(c75888208.spop2) e2:SetOperation(c75888208.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c75888208.spcon1(e,tp,eg,ep,ev,re,r,rp) function c75888208.spcon1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER) return re:GetHandler():IsSetCard(0x131) and re:GetHandler():IsType(TYPE_MONSTER)
end end
function c75888208.spfilter1(c,e,tp) function c75888208.spfilter1(c,e,tp)
return c:IsSetCard(0x131) and not c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x131) and not c:IsCode(75888208) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c75888208.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c75888208.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75888208.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c75888208.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c75888208.spop1(e,tp,eg,ep,ev,re,r,rp) function c75888208.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75888208.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c75888208.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c75888208.spcon2(e,tp,eg,ep,ev,re,r,rp) function c75888208.spcon2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end end
function c75888208.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c75888208.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c75888208.spfilter2(c,e,tp) function c75888208.spfilter2(c,e,tp)
return c:IsCode(49389190) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(49389190) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c75888208.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c75888208.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c75888208.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c75888208.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c75888208.spop2(e,tp,eg,ep,ev,re,r,rp) function c75888208.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75888208.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c75888208.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--混沌の夢魔鏡 --混沌の夢魔鏡
function c98570539.initial_effect(c) function c98570539.initial_effect(c)
aux.AddCodeList(c,74665651,1050355) aux.AddCodeList(c,74665651,1050355)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,98570539+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,98570539+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c98570539.target) e1:SetTarget(c98570539.target)
e1:SetOperation(c98570539.activate) e1:SetOperation(c98570539.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c98570539.filter0(c) function c98570539.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end end
function c98570539.filter1(c,e) function c98570539.filter1(c,e)
return not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function c98570539.filter2(c,e,tp,m,f,chkf) function c98570539.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x131) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x131) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c98570539.target(e,tp,eg,ep,ev,re,r,rp,chk) function c98570539.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil) local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=nil local mg2=nil
if Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) then if Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND) mg2=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
mg1:Merge(mg2) mg1:Merge(mg2)
end end
if Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) then if Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetMatchingGroup(c98570539.filter0,tp,LOCATION_GRAVE,0,nil) mg2=Duel.GetMatchingGroup(c98570539.filter0,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
end end
local res=Duel.IsExistingMatchingCard(c98570539.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c98570539.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp) local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c98570539.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf) res=Duel.IsExistingMatchingCard(c98570539.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end end
end end
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end end
function c98570539.activate(e,tp,eg,ep,ev,re,r,rp) function c98570539.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil):Filter(c98570539.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil):Filter(c98570539.filter1,nil,e)
local mg2=nil local mg2=nil
if Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) then if Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND) mg2=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
mg1:Merge(mg2) mg1:Merge(mg2)
end end
if Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) then if Duel.IsEnvironment(1050355,PLAYER_ALL,LOCATION_FZONE) then
mg2=Duel.GetMatchingGroup(c98570539.filter0,tp,LOCATION_GRAVE,0,nil) mg2=Duel.GetMatchingGroup(c98570539.filter0,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
end end
local sg1=Duel.GetMatchingGroup(c98570539.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c98570539.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce~=nil then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp) mg3=fgroup(ce,e,tp)
local mf=ce:GetValue() local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c98570539.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf) sg2=Duel.GetMatchingGroup(c98570539.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
local mat2=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE) local mat2=mat1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
mat1:Sub(mat2) mat1:Sub(mat2)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
--夢魔鏡の魔獣-パンタス --夢魔鏡の魔獣-パンタス
function c99792080.initial_effect(c) function c99792080.initial_effect(c)
aux.AddCodeList(c,74665651) aux.AddCodeList(c,74665651)
--direct attack --direct attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99792080,0)) e1:SetDescription(aux.Stringid(99792080,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,99792080) e1:SetCountLimit(1,99792080)
e1:SetCondition(c99792080.dircon) e1:SetCondition(c99792080.dircon)
e1:SetOperation(c99792080.dirop) e1:SetOperation(c99792080.dirop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99792080,1)) e2:SetDescription(aux.Stringid(99792080,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_END)
e2:SetCountLimit(1,99792081) e2:SetCountLimit(1,99792081)
e2:SetCondition(c99792080.spcon) e2:SetCondition(c99792080.spcon)
e2:SetCost(c99792080.spcost) e2:SetCost(c99792080.spcost)
e2:SetTarget(c99792080.sptg) e2:SetTarget(c99792080.sptg)
e2:SetOperation(c99792080.spop) e2:SetOperation(c99792080.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c99792080.dircon(e,tp,eg,ep,ev,re,r,rp) function c99792080.dircon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER) and aux.bpcon() return re:GetHandler():IsSetCard(0x131) and re:IsActiveType(TYPE_MONSTER) and aux.bpcon()
end end
function c99792080.dirop(e,tp,eg,ep,ev,re,r,rp) function c99792080.dirop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK) e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c99792080.spcon(e,tp,eg,ep,ev,re,r,rp) function c99792080.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE) and Duel.IsEnvironment(74665651,PLAYER_ALL,LOCATION_FZONE)
end end
function c99792080.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c99792080.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end if chk==0 then return c:IsReleasable() end
Duel.Release(c,REASON_COST) Duel.Release(c,REASON_COST)
end end
function c99792080.spfilter(c,e,tp) function c99792080.spfilter(c,e,tp)
return c:IsCode(62393472) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(62393472) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c99792080.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c99792080.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c99792080.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c99792080.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c99792080.spop(e,tp,eg,ep,ev,re,r,rp) function c99792080.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c99792080.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c99792080.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment