Commit cd8540d4 authored by TanakaKotoha's avatar TanakaKotoha

tianqiao

parent 81ae183a
...@@ -81,11 +81,10 @@ function c12005004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -81,11 +81,10 @@ function c12005004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c12005004.operation(e,tp,eg,ep,ev,re,r,rp) function c12005004.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget() Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
end end
\ No newline at end of file
...@@ -32,16 +32,16 @@ function c12030009.initial_effect(c) ...@@ -32,16 +32,16 @@ function c12030009.initial_effect(c)
e2:SetOperation(cm.disop) e2:SetOperation(cm.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave --to grave
-- local e3=Effect.CreateEffect(c) -- local e3=Effect.CreateEffect(c)
-- e3:SetDescription(aux.Stringid(m,2)) -- e3:SetDescription(aux.Stringid(m,2))
-- e3:SetCategory(CATEGORY_TOHAND) -- e3:SetCategory(CATEGORY_TOHAND)
-- e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) -- e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
-- e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) -- e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
-- e3:SetCode(EVENT_TO_GRAVE) -- e3:SetCode(EVENT_TO_GRAVE)
-- e3:SetCondition(cm.drcon) -- e3:SetCondition(cm.drcon)
-- e3:SetTarget(cm.drtg) -- e3:SetTarget(cm.drtg)
-- e3:SetOperation(cm.drop) -- e3:SetOperation(cm.drop)
-- c:RegisterEffect(e3) -- c:RegisterEffect(e3)
end end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp) function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -67,12 +67,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -67,12 +67,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget() Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
......
...@@ -59,8 +59,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -59,8 +59,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c,tc=e:GetHandler(),Duel.GetFirstTarget() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -41,12 +41,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -41,12 +41,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget() Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end end
end end
function cm.tgfilter(c,e,tp) function cm.tgfilter(c,e,tp)
......
...@@ -33,6 +33,7 @@ end ...@@ -33,6 +33,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -213,7 +214,7 @@ function scorp.SelectGroup(tp,desc,g,f,cg,min,max,...) ...@@ -213,7 +214,7 @@ function scorp.SelectGroup(tp,desc,g,f,cg,min,max,...)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup() local cg=cg or Group.CreateGroup()
sg:Merge(cg) sg:Merge(cg)
local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while #sg<max and #ag>0 do while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...)) local finish=(#sg>=min and #sg<=max and f(sg,...))
local seg=sg-cg local seg=sg-cg
...@@ -238,7 +239,7 @@ function scorp.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...) ...@@ -238,7 +239,7 @@ function scorp.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local cg=cg or Group.CreateGroup() local cg=cg or Group.CreateGroup()
sg:Merge(cg) sg:Merge(cg)
local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) local ag=g:Filter(scorp.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while #sg<max and #ag>0 do while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...)) local finish=(#sg>=min and #sg<=max and f(sg,...))
local cancel=finish or #sg==0 local cancel=finish or #sg==0
......
...@@ -65,6 +65,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -65,6 +65,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.GetMZoneCount(tp)>0 and tc:IsRelateToEffect(e) then if Duel.GetMZoneCount(tp)>0 and tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetLevel(),tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetLevel(),tc:GetCode())
......
...@@ -34,6 +34,7 @@ end ...@@ -34,6 +34,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
if #g>0 then if #g>0 then
......
...@@ -33,6 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,6 +33,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetCode())
if #g>0 then if #g>0 then
......
...@@ -2,155 +2,156 @@ ...@@ -2,155 +2,156 @@
local m=60152311 local m=60152311
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152311,0)) e1:SetDescription(aux.Stringid(60152311,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:SetCondition(c60152311.e1con) e1:SetCondition(c60152311.e1con)
e1:SetTarget(c60152311.e1tg) e1:SetTarget(c60152311.e1tg)
e1:SetOperation(c60152311.e1op) e1:SetOperation(c60152311.e1op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152311,2)) e2:SetDescription(aux.Stringid(60152311,2))
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60152311) e2:SetCountLimit(1,60152311)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c60152311.e2cost) e2:SetCost(c60152311.e2cost)
e2:SetTarget(c60152311.e2tg) e2:SetTarget(c60152311.e2tg)
e2:SetOperation(c60152311.e2op) e2:SetOperation(c60152311.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon --summon
local e99=Effect.CreateEffect(c) local e99=Effect.CreateEffect(c)
e99:SetDescription(aux.Stringid(60152311,4)) e99:SetDescription(aux.Stringid(60152311,4))
e99:SetCategory(CATEGORY_SPECIAL_SUMMON) e99:SetCategory(CATEGORY_SPECIAL_SUMMON)
e99:SetType(EFFECT_TYPE_QUICK_O) e99:SetType(EFFECT_TYPE_QUICK_O)
e99:SetRange(LOCATION_MZONE) e99:SetRange(LOCATION_MZONE)
e99:SetCountLimit(1,6012311) e99:SetCountLimit(1,6012311)
e99:SetCode(EVENT_FREE_CHAIN) e99:SetCode(EVENT_FREE_CHAIN)
e99:SetProperty(EFFECT_FLAG_CARD_TARGET) e99:SetProperty(EFFECT_FLAG_CARD_TARGET)
e99:SetTarget(c60152311.e99tg) e99:SetTarget(c60152311.e99tg)
e99:SetOperation(c60152311.e99op) e99:SetOperation(c60152311.e99op)
c:RegisterEffect(e99) c:RegisterEffect(e99)
end end
function c60152311.e1con(e,tp,eg,ep,ev,re,r,rp) function c60152311.e1con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c60152311.e1tgfilter(c,e) function c60152311.e1tgfilter(c,e)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function c60152311.e1tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152311.e1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152311.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingMatchingCard(c60152311.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0))
end end
function c60152311.e1op(e,tp,eg,ep,ev,re,r,rp) function c60152311.e1op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152311.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152311.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Overlay(e:GetHandler(),g) Duel.Overlay(e:GetHandler(),g)
end end
function c60152311.e2cost(e,tp,eg,ep,ev,re,r,rp,chk) function c60152311.e2cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c60152311.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152311.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local rd=Duel.GetOverlayCount(tp,1,1)-1 local rd=Duel.GetOverlayCount(tp,1,1)-1
if chk==0 then return rd>0 end if chk==0 then return rd>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c60152311.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152311.e2op(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 atk=Duel.GetOverlayCount(tp,1,1)*600 local atk=Duel.GetOverlayCount(tp,1,1)*600
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk) e1:SetValue(atk)
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=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152311,3)) e2:SetDescription(aux.Stringid(60152311,3))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE) e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCondition(c60152311.e2opcon) e2:SetCondition(c60152311.e2opcon)
e2:SetOperation(c60152311.e2opop) e2:SetOperation(c60152311.e2opop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
end end
function c60152311.e2opcon(e,tp,eg,ep,ev,re,r,rp) function c60152311.e2opcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil return ep~=tp and e:GetHandler():GetBattleTarget()~=nil
end end
function c60152311.e2opop(e,tp,eg,ep,ev,re,r,rp) function c60152311.e2opop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(ep,ev*2)
end end
function c60152311.e99tgfilter(c) function c60152311.e99tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
end end
function c60152311.e99tgfilter3(c,e,tp) function c60152311.e99tgfilter3(c,e,tp)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true)
end end
function c60152311.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152311.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g0=Group.CreateGroup() local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local ga=Duel.GetOverlayGroup(tp,1,0) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,ga) Group.Merge(g0,ga)
Group.Merge(g0,gb) Group.Merge(g0,gb)
local gc=g0:Filter(c60152311.e99tgfilter3,nil,e,tp) local gc=g0:Filter(c60152311.e99tgfilter3,nil,e,tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152311.e99tgfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152311.e99tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152311.e99tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c60152311.e99tgfilter,tp,LOCATION_MZONE,0,1,nil)
and gc:GetCount()>0 end and gc:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c60152311.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c60152311.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4))
end end
function c60152311.e99op(e,tp,eg,ep,ev,re,r,rp) function c60152311.e99op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local g0=Group.CreateGroup() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local g0=Group.CreateGroup()
local ga=Duel.GetOverlayGroup(tp,1,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
Group.Merge(g0,ga) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,gb) Group.Merge(g0,ga)
local gc=g0:Filter(c60152311.e99tgfilter3,nil,e,tp) Group.Merge(g0,gb)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local gc=g0:Filter(c60152311.e99tgfilter3,nil,e,tp)
local g=gc:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if g:GetCount()>0 then local g=gc:Select(tp,1,1,nil)
Duel.HintSelection(g) if g:GetCount()>0 then
local tc2=g:GetFirst() Duel.HintSelection(g)
Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) local tc2=g:GetFirst()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP)
local og=tc:GetOverlayGroup() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if og:GetCount()>0 then local og=tc:GetOverlayGroup()
Duel.SendtoGrave(og,REASON_RULE) if og:GetCount()>0 then
end Duel.SendtoGrave(og,REASON_RULE)
Duel.Overlay(tc2,Group.FromCards(tc)) end
end Duel.Overlay(tc2,Group.FromCards(tc))
if Duel.IsPlayerAffectedByEffect(tp,60152321) then end
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.IsPlayerAffectedByEffect(tp,60152321) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c60152311.e99opfilter) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN) e1:SetValue(c60152311.e99opfilter)
tc2:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN)
end tc2:RegisterEffect(e1)
tc2:CompleteProcedure() end
end tc2:CompleteProcedure()
end end
end
end end
function c60152311.e99opfilter(e,re) function c60152311.e99opfilter(e,re)
return e:GetHandler()~=re:GetOwner() return e:GetHandler()~=re:GetOwner()
end end
\ No newline at end of file
...@@ -116,6 +116,7 @@ end ...@@ -116,6 +116,7 @@ end
function c60152312.e99op(e,tp,eg,ep,ev,re,r,rp) function c60152312.e99op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g0=Group.CreateGroup() local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
......
...@@ -2,178 +2,179 @@ ...@@ -2,178 +2,179 @@
local m=60152313 local m=60152313
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152311,0)) e1:SetDescription(aux.Stringid(60152311,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:SetCondition(c60152313.e1con) e1:SetCondition(c60152313.e1con)
e1:SetTarget(c60152313.e1tg) e1:SetTarget(c60152313.e1tg)
e1:SetOperation(c60152313.e1op) e1:SetOperation(c60152313.e1op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152313,0)) e2:SetDescription(aux.Stringid(60152313,0))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60152313) e2:SetCountLimit(1,60152313)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c60152313.e2cost) e2:SetCost(c60152313.e2cost)
e2:SetTarget(c60152313.e2tg) e2:SetTarget(c60152313.e2tg)
e2:SetOperation(c60152313.e2op) e2:SetOperation(c60152313.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon --summon
local e99=Effect.CreateEffect(c) local e99=Effect.CreateEffect(c)
e99:SetDescription(aux.Stringid(60152311,4)) e99:SetDescription(aux.Stringid(60152311,4))
e99:SetCategory(CATEGORY_SPECIAL_SUMMON) e99:SetCategory(CATEGORY_SPECIAL_SUMMON)
e99:SetType(EFFECT_TYPE_QUICK_O) e99:SetType(EFFECT_TYPE_QUICK_O)
e99:SetRange(LOCATION_MZONE) e99:SetRange(LOCATION_MZONE)
e99:SetCountLimit(1,6012313) e99:SetCountLimit(1,6012313)
e99:SetCode(EVENT_FREE_CHAIN) e99:SetCode(EVENT_FREE_CHAIN)
e99:SetProperty(EFFECT_FLAG_CARD_TARGET) e99:SetProperty(EFFECT_FLAG_CARD_TARGET)
e99:SetTarget(c60152313.e99tg) e99:SetTarget(c60152313.e99tg)
e99:SetOperation(c60152313.e99op) e99:SetOperation(c60152313.e99op)
c:RegisterEffect(e99) c:RegisterEffect(e99)
end end
function c60152313.e1con(e,tp,eg,ep,ev,re,r,rp) function c60152313.e1con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c60152313.e1tgfilter(c,e) function c60152313.e1tgfilter(c,e)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function c60152313.e1tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152313.e1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152313.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingMatchingCard(c60152313.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0))
end end
function c60152313.e1op(e,tp,eg,ep,ev,re,r,rp) function c60152313.e1op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152313.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152313.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Overlay(e:GetHandler(),g) Duel.Overlay(e:GetHandler(),g)
end end
function c60152313.e2cost(e,tp,eg,ep,ev,re,r,rp,chk) function c60152313.e2cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c60152313.e2tgfilter(c) function c60152313.e2tgfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c60152313.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152313.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=e:GetHandler():GetOverlayCount()-1 local ct=e:GetHandler():GetOverlayCount()-1
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c60152313.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152313.e2op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,nil)
local ct=e:GetHandler():GetOverlayCount() local ct=e:GetHandler():GetOverlayCount()
local ct2=g:GetCount() local ct2=g:GetCount()
if ct<=0 then return end if ct<=0 then return end
if ct>ct2 then if ct>ct2 then
e:GetHandler():RemoveOverlayCard(tp,1,ct2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,ct2,REASON_COST)
local a=Duel.GetOperatedGroup():GetCount() local a=Duel.GetOperatedGroup():GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,a,a,nil) local g2=Duel.SelectMatchingCard(tp,c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,a,a,nil)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.HintSelection(g2) Duel.HintSelection(g2)
if Duel.Destroy(g2,REASON_EFFECT)>0 then if Duel.Destroy(g2,REASON_EFFECT)>0 then
local b=Duel.GetOperatedGroup() local b=Duel.GetOperatedGroup()
local tc=b:GetFirst() local tc=b:GetFirst()
while tc do while tc do
if not tc:IsLocation(LOCATION_ONFIELD) and not tc:IsLocation(LOCATION_GRAVE) if not tc:IsLocation(LOCATION_ONFIELD) and not tc:IsLocation(LOCATION_GRAVE)
and e:GetHandler():IsLocation(LOCATION_MZONE) and not tc:IsImmuneToEffect(e) then and e:GetHandler():IsLocation(LOCATION_MZONE) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(e:GetHandler(),Group.FromCards(tc)) Duel.Overlay(e:GetHandler(),Group.FromCards(tc))
end end
tc=b:GetNext() tc=b:GetNext()
end end
end end
end end
else else
e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST)
local a=Duel.GetOperatedGroup():GetCount() local a=Duel.GetOperatedGroup():GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,a,a,nil) local g2=Duel.SelectMatchingCard(tp,c60152313.e2tgfilter,tp,0,LOCATION_ONFIELD,a,a,nil)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.HintSelection(g2) Duel.HintSelection(g2)
if Duel.Destroy(g2,REASON_EFFECT)>0 then if Duel.Destroy(g2,REASON_EFFECT)>0 then
local b=Duel.GetOperatedGroup() local b=Duel.GetOperatedGroup()
local tc=b:GetFirst() local tc=b:GetFirst()
while tc do while tc do
if not tc:IsLocation(LOCATION_ONFIELD) and not tc:IsLocation(LOCATION_GRAVE) if not tc:IsLocation(LOCATION_ONFIELD) and not tc:IsLocation(LOCATION_GRAVE)
and e:GetHandler():IsLocation(LOCATION_MZONE) and not tc:IsImmuneToEffect(e) then and e:GetHandler():IsLocation(LOCATION_MZONE) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(e:GetHandler(),Group.FromCards(tc)) Duel.Overlay(e:GetHandler(),Group.FromCards(tc))
end end
tc=b:GetNext() tc=b:GetNext()
end end
end end
end end
end end
end end
function c60152313.e99tgfilter(c) function c60152313.e99tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
end end
function c60152313.e99tgfilter3(c,e,tp) function c60152313.e99tgfilter3(c,e,tp)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true)
end end
function c60152313.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152313.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g0=Group.CreateGroup() local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local ga=Duel.GetOverlayGroup(tp,1,0) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,ga) Group.Merge(g0,ga)
Group.Merge(g0,gb) Group.Merge(g0,gb)
local gc=g0:Filter(c60152313.e99tgfilter3,nil,e,tp) local gc=g0:Filter(c60152313.e99tgfilter3,nil,e,tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152313.e99tgfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152313.e99tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152313.e99tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c60152313.e99tgfilter,tp,LOCATION_MZONE,0,1,nil)
and gc:GetCount()>0 end and gc:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c60152313.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c60152313.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4))
end end
function c60152313.e99op(e,tp,eg,ep,ev,re,r,rp) function c60152313.e99op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local g0=Group.CreateGroup() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local g0=Group.CreateGroup()
local ga=Duel.GetOverlayGroup(tp,1,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
Group.Merge(g0,ga) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,gb) Group.Merge(g0,ga)
local gc=g0:Filter(c60152313.e99tgfilter3,nil,e,tp) Group.Merge(g0,gb)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local gc=g0:Filter(c60152313.e99tgfilter3,nil,e,tp)
local g=gc:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if g:GetCount()>0 then local g=gc:Select(tp,1,1,nil)
Duel.HintSelection(g) if g:GetCount()>0 then
local tc2=g:GetFirst() Duel.HintSelection(g)
Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) local tc2=g:GetFirst()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP)
local og=tc:GetOverlayGroup() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if og:GetCount()>0 then local og=tc:GetOverlayGroup()
Duel.SendtoGrave(og,REASON_RULE) if og:GetCount()>0 then
end Duel.SendtoGrave(og,REASON_RULE)
Duel.Overlay(tc2,Group.FromCards(tc)) end
end Duel.Overlay(tc2,Group.FromCards(tc))
if Duel.IsPlayerAffectedByEffect(tp,60152321) then end
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.IsPlayerAffectedByEffect(tp,60152321) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c60152311.e99opfilter) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN) e1:SetValue(c60152311.e99opfilter)
tc2:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN)
end tc2:RegisterEffect(e1)
tc2:CompleteProcedure() end
end tc2:CompleteProcedure()
end end
end
end end
function c60152313.e99opfilter(e,re) function c60152313.e99opfilter(e,re)
return e:GetHandler()~=re:GetOwner() return e:GetHandler()~=re:GetOwner()
end end
\ No newline at end of file
...@@ -2,209 +2,210 @@ ...@@ -2,209 +2,210 @@
local m=60152314 local m=60152314
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152311,0)) e1:SetDescription(aux.Stringid(60152311,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:SetCondition(c60152314.e1con) e1:SetCondition(c60152314.e1con)
e1:SetTarget(c60152314.e1tg) e1:SetTarget(c60152314.e1tg)
e1:SetOperation(c60152314.e1op) e1:SetOperation(c60152314.e1op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152314,0)) e2:SetDescription(aux.Stringid(60152314,0))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60152314) e2:SetCountLimit(1,60152314)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c60152314.e2cost) e2:SetCost(c60152314.e2cost)
e2:SetTarget(c60152314.e2tg) e2:SetTarget(c60152314.e2tg)
e2:SetOperation(c60152314.e2op) e2:SetOperation(c60152314.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon --summon
local e99=Effect.CreateEffect(c) local e99=Effect.CreateEffect(c)
e99:SetDescription(aux.Stringid(60152311,4)) e99:SetDescription(aux.Stringid(60152311,4))
e99:SetCategory(CATEGORY_SPECIAL_SUMMON) e99:SetCategory(CATEGORY_SPECIAL_SUMMON)
e99:SetType(EFFECT_TYPE_QUICK_O) e99:SetType(EFFECT_TYPE_QUICK_O)
e99:SetRange(LOCATION_MZONE) e99:SetRange(LOCATION_MZONE)
e99:SetCountLimit(1,6012314) e99:SetCountLimit(1,6012314)
e99:SetCode(EVENT_FREE_CHAIN) e99:SetCode(EVENT_FREE_CHAIN)
e99:SetProperty(EFFECT_FLAG_CARD_TARGET) e99:SetProperty(EFFECT_FLAG_CARD_TARGET)
e99:SetTarget(c60152314.e99tg) e99:SetTarget(c60152314.e99tg)
e99:SetOperation(c60152314.e99op) e99:SetOperation(c60152314.e99op)
c:RegisterEffect(e99) c:RegisterEffect(e99)
end end
function c60152314.e1con(e,tp,eg,ep,ev,re,r,rp) function c60152314.e1con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c60152314.e1tgfilter(c,e) function c60152314.e1tgfilter(c,e)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function c60152314.e1tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152314.e1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152314.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingMatchingCard(c60152314.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0))
end end
function c60152314.e1op(e,tp,eg,ep,ev,re,r,rp) function c60152314.e1op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152314.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152314.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Overlay(e:GetHandler(),g) Duel.Overlay(e:GetHandler(),g)
end end
function c60152314.e2cost(e,tp,eg,ep,ev,re,r,rp,chk) function c60152314.e2cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c60152314.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152314.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=e:GetHandler():GetOverlayCount()-1 local ct=e:GetHandler():GetOverlayCount()-1
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c60152314.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152314.e2op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ct=e:GetHandler():GetOverlayCount() local ct=e:GetHandler():GetOverlayCount()
local ct2=g:GetCount() local ct2=g:GetCount()
if ct<=0 then return end if ct<=0 then return end
if ct>ct2 then if ct>ct2 then
e:GetHandler():RemoveOverlayCard(tp,1,ct2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,ct2,REASON_COST)
local a=Duel.GetOperatedGroup():GetCount() local a=Duel.GetOperatedGroup():GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,a,a,nil) local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,a,a,nil)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.HintSelection(g2) Duel.HintSelection(g2)
local tc=g2:GetFirst() local tc=g2:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(60152314,1)) e1:SetDescription(aux.Stringid(60152314,1))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCondition(c60152314.e2opcon) e1:SetCondition(c60152314.e2opcon)
e1:SetOperation(c60152314.e2opop) e1:SetOperation(c60152314.e2opop)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(60152314,2)) e2:SetDescription(aux.Stringid(60152314,2))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(1) e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
tc=g2:GetNext() tc=g2:GetNext()
end end
end end
else else
e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST)
local a=Duel.GetOperatedGroup():GetCount() local a=Duel.GetOperatedGroup():GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,a,a,nil) local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,a,a,nil)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.HintSelection(g2) Duel.HintSelection(g2)
local tc=g2:GetFirst() local tc=g2:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(60152314,1)) e1:SetDescription(aux.Stringid(60152314,1))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCondition(c60152314.e2opcon) e1:SetCondition(c60152314.e2opcon)
e1:SetOperation(c60152314.e2opop) e1:SetOperation(c60152314.e2opop)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(60152314,2)) e2:SetDescription(aux.Stringid(60152314,2))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(1) e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
tc=g2:GetNext() tc=g2:GetNext()
end end
end end
end end
end end
function c60152314.e2opcon(e,tp,eg,ep,ev,re,r,rp) function c60152314.e2opcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c60152314.e2opop(e,tp,eg,ep,ev,re,r,rp) function c60152314.e2opop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60152314) Duel.Hint(HINT_CARD,0,60152314)
Duel.Draw(e:GetHandler():GetPreviousControler(),1,REASON_EFFECT) Duel.Draw(e:GetHandler():GetPreviousControler(),1,REASON_EFFECT)
e:Reset() e:Reset()
end end
function c60152314.e99tgfilter(c) function c60152314.e99tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
end end
function c60152314.e99tgfilter3(c,e,tp) function c60152314.e99tgfilter3(c,e,tp)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true)
end end
function c60152314.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152314.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g0=Group.CreateGroup() local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local ga=Duel.GetOverlayGroup(tp,1,0) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,ga) Group.Merge(g0,ga)
Group.Merge(g0,gb) Group.Merge(g0,gb)
local gc=g0:Filter(c60152314.e99tgfilter3,nil,e,tp) local gc=g0:Filter(c60152314.e99tgfilter3,nil,e,tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152314.e99tgfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152314.e99tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152314.e99tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c60152314.e99tgfilter,tp,LOCATION_MZONE,0,1,nil)
and gc:GetCount()>0 end and gc:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c60152314.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c60152314.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4))
end end
function c60152314.e99op(e,tp,eg,ep,ev,re,r,rp) function c60152314.e99op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local g0=Group.CreateGroup() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local g0=Group.CreateGroup()
local ga=Duel.GetOverlayGroup(tp,1,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
Group.Merge(g0,ga) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,gb) Group.Merge(g0,ga)
local gc=g0:Filter(c60152314.e99tgfilter3,nil,e,tp) Group.Merge(g0,gb)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local gc=g0:Filter(c60152314.e99tgfilter3,nil,e,tp)
local g=gc:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if g:GetCount()>0 then local g=gc:Select(tp,1,1,nil)
Duel.HintSelection(g) if g:GetCount()>0 then
local tc2=g:GetFirst() Duel.HintSelection(g)
Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) local tc2=g:GetFirst()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP)
local og=tc:GetOverlayGroup() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if og:GetCount()>0 then local og=tc:GetOverlayGroup()
Duel.SendtoGrave(og,REASON_RULE) if og:GetCount()>0 then
end Duel.SendtoGrave(og,REASON_RULE)
Duel.Overlay(tc2,Group.FromCards(tc)) end
end Duel.Overlay(tc2,Group.FromCards(tc))
if Duel.IsPlayerAffectedByEffect(tp,60152321) then end
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.IsPlayerAffectedByEffect(tp,60152321) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c60152311.e99opfilter) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN) e1:SetValue(c60152311.e99opfilter)
tc2:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN)
end tc2:RegisterEffect(e1)
tc2:CompleteProcedure() end
end tc2:CompleteProcedure()
end end
end
end end
function c60152314.e99opfilter(e,re) function c60152314.e99opfilter(e,re)
return e:GetHandler()~=re:GetOwner() return e:GetHandler()~=re:GetOwner()
end end
\ No newline at end of file
...@@ -2,234 +2,235 @@ ...@@ -2,234 +2,235 @@
local m=60152315 local m=60152315
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152311,0)) e1:SetDescription(aux.Stringid(60152311,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:SetCondition(c60152315.e1con) e1:SetCondition(c60152315.e1con)
e1:SetTarget(c60152315.e1tg) e1:SetTarget(c60152315.e1tg)
e1:SetOperation(c60152315.e1op) e1:SetOperation(c60152315.e1op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152315,0)) e2:SetDescription(aux.Stringid(60152315,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60152315) e2:SetCountLimit(1,60152315)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c60152315.e2cost) e2:SetCost(c60152315.e2cost)
e2:SetTarget(c60152315.e2tg) e2:SetTarget(c60152315.e2tg)
e2:SetOperation(c60152315.e2op) e2:SetOperation(c60152315.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon --summon
local e99=Effect.CreateEffect(c) local e99=Effect.CreateEffect(c)
e99:SetDescription(aux.Stringid(60152311,4)) e99:SetDescription(aux.Stringid(60152311,4))
e99:SetCategory(CATEGORY_SPECIAL_SUMMON) e99:SetCategory(CATEGORY_SPECIAL_SUMMON)
e99:SetType(EFFECT_TYPE_QUICK_O) e99:SetType(EFFECT_TYPE_QUICK_O)
e99:SetRange(LOCATION_MZONE) e99:SetRange(LOCATION_MZONE)
e99:SetCountLimit(1,6012315) e99:SetCountLimit(1,6012315)
e99:SetCode(EVENT_FREE_CHAIN) e99:SetCode(EVENT_FREE_CHAIN)
e99:SetProperty(EFFECT_FLAG_CARD_TARGET) e99:SetProperty(EFFECT_FLAG_CARD_TARGET)
e99:SetTarget(c60152315.e99tg) e99:SetTarget(c60152315.e99tg)
e99:SetOperation(c60152315.e99op) e99:SetOperation(c60152315.e99op)
c:RegisterEffect(e99) c:RegisterEffect(e99)
if not c60152315.global_check then if not c60152315.global_check then
c60152315.global_check=true c60152315.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED) ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(c60152315.checkop) ge1:SetOperation(c60152315.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function c60152315.checkop(e,tp,eg,ep,ev,re,r,rp) function c60152315.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
if tc:IsLocation(LOCATION_GRAVE) then if tc:IsLocation(LOCATION_GRAVE) then
tc:RegisterFlagEffect(60152315,RESET_EVENT+0x1f20000+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(60152315,RESET_EVENT+0x1f20000+RESET_PHASE+PHASE_END,0,1)
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
end end
function c60152315.e1con(e,tp,eg,ep,ev,re,r,rp) function c60152315.e1con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c60152315.e1tgfilter(c,e) function c60152315.e1tgfilter(c,e)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function c60152315.e1tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152315.e1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152315.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingMatchingCard(c60152315.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0))
end end
function c60152315.e1op(e,tp,eg,ep,ev,re,r,rp) function c60152315.e1op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152315.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152315.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Overlay(e:GetHandler(),g) Duel.Overlay(e:GetHandler(),g)
end end
function c60152315.e2cost(e,tp,eg,ep,ev,re,r,rp,chk) function c60152315.e2cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c60152315.e2tgfilter(c,e,tp,tid) function c60152315.e2tgfilter(c,e,tp,tid)
return c:GetFlagEffect(60152315)~=0 and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetFlagEffect(60152315)~=0 and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c60152315.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152315.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=e:GetHandler():GetOverlayCount()-1 local ct=e:GetHandler():GetOverlayCount()-1
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function c60152315.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152315.e2op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local ct=e:GetHandler():GetOverlayCount() local ct=e:GetHandler():GetOverlayCount()
local ct2=g:GetCount() local ct2=g:GetCount()
if ct<=0 then return end if ct<=0 then return end
if ct>ct2 then if ct>ct2 then
e:GetHandler():RemoveOverlayCard(tp,1,ct2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,ct2,REASON_COST)
local a=Duel.GetOperatedGroup():GetCount() local a=Duel.GetOperatedGroup():GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,a,a,nil,e,tp) local g2=Duel.SelectMatchingCard(tp,c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,a,a,nil,e,tp)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.HintSelection(g2) Duel.HintSelection(g2)
local tc=g2:GetFirst() local tc=g2:GetFirst()
while tc do while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if Duel.IsPlayerAffectedByEffect(tp,60152321) then if Duel.IsPlayerAffectedByEffect(tp,60152321) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c60152315.e2opfilter2) e1:SetValue(c60152315.e2opfilter2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
tc=g2:GetNext() tc=g2:GetNext()
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
else else
e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,ct,REASON_COST)
local a=Duel.GetOperatedGroup():GetCount() local a=Duel.GetOperatedGroup():GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,a,a,nil,e,tp) local g2=Duel.SelectMatchingCard(tp,c60152315.e2tgfilter,tp,LOCATION_GRAVE,0,a,a,nil,e,tp)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.HintSelection(g2) Duel.HintSelection(g2)
local tc=g2:GetFirst() local tc=g2:GetFirst()
while tc do while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if Duel.IsPlayerAffectedByEffect(tp,60152321) then if Duel.IsPlayerAffectedByEffect(tp,60152321) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c60152315.e2opfilter2) e1:SetValue(c60152315.e2opfilter2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
tc=g2:GetNext() tc=g2:GetNext()
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
end end
function c60152315.e2opfilter2(e,re) function c60152315.e2opfilter2(e,re)
return e:GetHandler()~=re:GetOwner() return e:GetHandler()~=re:GetOwner()
end end
function c60152315.e2opcon(e,tp,eg,ep,ev,re,r,rp) function c60152315.e2opcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c60152315.e2opop(e,tp,eg,ep,ev,re,r,rp) function c60152315.e2opop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60152315) Duel.Hint(HINT_CARD,0,60152315)
Duel.Draw(e:GetHandler():GetPreviousControler(),1,REASON_EFFECT) Duel.Draw(e:GetHandler():GetPreviousControler(),1,REASON_EFFECT)
e:Reset() e:Reset()
end end
function c60152315.e99tgfilter(c) function c60152315.e99tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
end end
function c60152315.e99tgfilter3(c,e,tp) function c60152315.e99tgfilter3(c,e,tp)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true)
end end
function c60152315.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152315.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g0=Group.CreateGroup() local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local ga=Duel.GetOverlayGroup(tp,1,0) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,ga) Group.Merge(g0,ga)
Group.Merge(g0,gb) Group.Merge(g0,gb)
local gc=g0:Filter(c60152315.e99tgfilter3,nil,e,tp) local gc=g0:Filter(c60152315.e99tgfilter3,nil,e,tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152315.e99tgfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152315.e99tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152315.e99tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c60152315.e99tgfilter,tp,LOCATION_MZONE,0,1,nil)
and gc:GetCount()>0 end and gc:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c60152315.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c60152315.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4))
end end
function c60152315.e99op(e,tp,eg,ep,ev,re,r,rp) function c60152315.e99op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local g0=Group.CreateGroup() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local g0=Group.CreateGroup()
local ga=Duel.GetOverlayGroup(tp,1,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
Group.Merge(g0,ga) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,gb) Group.Merge(g0,ga)
local gc=g0:Filter(c60152315.e99tgfilter3,nil,e,tp) Group.Merge(g0,gb)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local gc=g0:Filter(c60152315.e99tgfilter3,nil,e,tp)
local g=gc:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if g:GetCount()>0 then local g=gc:Select(tp,1,1,nil)
Duel.HintSelection(g) if g:GetCount()>0 then
local tc2=g:GetFirst() Duel.HintSelection(g)
Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) local tc2=g:GetFirst()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP)
local og=tc:GetOverlayGroup() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if og:GetCount()>0 then local og=tc:GetOverlayGroup()
Duel.SendtoGrave(og,REASON_RULE) if og:GetCount()>0 then
end Duel.SendtoGrave(og,REASON_RULE)
Duel.Overlay(tc2,Group.FromCards(tc)) end
end Duel.Overlay(tc2,Group.FromCards(tc))
if Duel.IsPlayerAffectedByEffect(tp,60152321) then end
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.IsPlayerAffectedByEffect(tp,60152321) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c60152311.e99opfilter) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN) e1:SetValue(c60152311.e99opfilter)
tc2:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN)
end tc2:RegisterEffect(e1)
tc2:CompleteProcedure() end
end tc2:CompleteProcedure()
end end
end
end end
function c60152315.e99opfilter(e,re) function c60152315.e99opfilter(e,re)
return e:GetHandler()~=re:GetOwner() return e:GetHandler()~=re:GetOwner()
end end
\ No newline at end of file
...@@ -2,172 +2,173 @@ ...@@ -2,172 +2,173 @@
local m=60152316 local m=60152316
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcb26),6,2,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152311,0)) e1:SetDescription(aux.Stringid(60152311,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:SetCondition(c60152316.e1con) e1:SetCondition(c60152316.e1con)
e1:SetTarget(c60152316.e1tg) e1:SetTarget(c60152316.e1tg)
e1:SetOperation(c60152316.e1op) e1:SetOperation(c60152316.e1op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152316,0)) e2:SetDescription(aux.Stringid(60152316,0))
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DISABLE) e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,60152316) e2:SetCountLimit(1,60152316)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c60152316.e2cost) e2:SetCost(c60152316.e2cost)
e2:SetTarget(c60152316.e2tg) e2:SetTarget(c60152316.e2tg)
e2:SetOperation(c60152316.e2op) e2:SetOperation(c60152316.e2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--summon --summon
local e99=Effect.CreateEffect(c) local e99=Effect.CreateEffect(c)
e99:SetDescription(aux.Stringid(60152311,4)) e99:SetDescription(aux.Stringid(60152311,4))
e99:SetCategory(CATEGORY_SPECIAL_SUMMON) e99:SetCategory(CATEGORY_SPECIAL_SUMMON)
e99:SetType(EFFECT_TYPE_QUICK_O) e99:SetType(EFFECT_TYPE_QUICK_O)
e99:SetRange(LOCATION_MZONE) e99:SetRange(LOCATION_MZONE)
e99:SetCountLimit(1,6012316) e99:SetCountLimit(1,6012316)
e99:SetCode(EVENT_FREE_CHAIN) e99:SetCode(EVENT_FREE_CHAIN)
e99:SetProperty(EFFECT_FLAG_CARD_TARGET) e99:SetProperty(EFFECT_FLAG_CARD_TARGET)
e99:SetTarget(c60152316.e99tg) e99:SetTarget(c60152316.e99tg)
e99:SetOperation(c60152316.e99op) e99:SetOperation(c60152316.e99op)
c:RegisterEffect(e99) c:RegisterEffect(e99)
end end
function c60152316.e1con(e,tp,eg,ep,ev,re,r,rp) function c60152316.e1con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c60152316.e1tgfilter(c,e) function c60152316.e1tgfilter(c,e)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e)
end end
function c60152316.e1tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152316.e1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152316.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingMatchingCard(c60152316.e1tgfilter,tp,LOCATION_GRAVE,0,1,nil,e) and e:GetHandler():IsFaceup() and e:GetHandler():IsLocation(LOCATION_MZONE) end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,0))
end end
function c60152316.e1op(e,tp,eg,ep,ev,re,r,rp) function c60152316.e1op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end if not e:GetHandler():IsLocation(LOCATION_MZONE) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152311,1))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152316.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152316.e1tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Overlay(e:GetHandler(),g) Duel.Overlay(e:GetHandler(),g)
end end
function c60152316.e2cost(e,tp,eg,ep,ev,re,r,rp,chk) function c60152316.e2cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c60152316.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152316.e2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local rd=Duel.GetOverlayCount(tp,1,1)-1 local rd=Duel.GetOverlayCount(tp,1,1)-1
if chk==0 then return rd>0 end if chk==0 then return rd>0 end
local rd=Duel.GetOverlayCount(tp,1,1)*600 local rd=Duel.GetOverlayCount(tp,1,1)*600
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rd) Duel.SetTargetParam(rd)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rd) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rd)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152316,0)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152316,0))
end end
function c60152316.e2opfilter(c,e) function c60152316.e2opfilter(c,e)
return c:IsFaceup() and c:GetAttack()>0 return c:IsFaceup() and c:GetAttack()>0
end end
function c60152316.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152316.e2op(e,tp,eg,ep,ev,re,r,rp)
local rd=Duel.GetOverlayCount(tp,1,1)*600 local rd=Duel.GetOverlayCount(tp,1,1)*600
Duel.Recover(tp,rd,REASON_EFFECT) Duel.Recover(tp,rd,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c60152316.e2opfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c60152316.e2opfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-rd) e1:SetValue(-rd)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
if tc:GetAttack()<=0 and not tc:IsDisabled() then if tc:GetAttack()<=0 and not tc:IsDisabled() then
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
tc=g:GetNext() tc=g:GetNext()
end end
end end
end end
function c60152316.e2opcon(e,tp,eg,ep,ev,re,r,rp) function c60152316.e2opcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c60152316.e2opop(e,tp,eg,ep,ev,re,r,rp) function c60152316.e2opop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60152316) Duel.Hint(HINT_CARD,0,60152316)
Duel.Draw(e:GetHandler():GetPreviousControler(),1,REASON_EFFECT) Duel.Draw(e:GetHandler():GetPreviousControler(),1,REASON_EFFECT)
e:Reset() e:Reset()
end end
function c60152316.e99tgfilter(c) function c60152316.e99tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
end end
function c60152316.e99tgfilter3(c,e,tp) function c60152316.e99tgfilter3(c,e,tp)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true) return c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,true)
end end
function c60152316.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60152316.e99tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g0=Group.CreateGroup() local g0=Group.CreateGroup()
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local ga=Duel.GetOverlayGroup(tp,1,0) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,ga) Group.Merge(g0,ga)
Group.Merge(g0,gb) Group.Merge(g0,gb)
local gc=g0:Filter(c60152316.e99tgfilter3,nil,e,tp) local gc=g0:Filter(c60152316.e99tgfilter3,nil,e,tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152316.e99tgfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c60152316.e99tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152316.e99tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c60152316.e99tgfilter,tp,LOCATION_MZONE,0,1,nil)
and gc:GetCount()>0 end and gc:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c60152316.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c60152316.e99tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4)) Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(60152311,4))
end end
function c60152316.e99op(e,tp,eg,ep,ev,re,r,rp) function c60152316.e99op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local g0=Group.CreateGroup() if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) local g0=Group.CreateGroup()
local ga=Duel.GetOverlayGroup(tp,1,0) local gb=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
Group.Merge(g0,ga) local ga=Duel.GetOverlayGroup(tp,1,0)
Group.Merge(g0,gb) Group.Merge(g0,ga)
local gc=g0:Filter(c60152316.e99tgfilter3,nil,e,tp) Group.Merge(g0,gb)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local gc=g0:Filter(c60152316.e99tgfilter3,nil,e,tp)
local g=gc:Select(tp,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if g:GetCount()>0 then local g=gc:Select(tp,1,1,nil)
Duel.HintSelection(g) if g:GetCount()>0 then
local tc2=g:GetFirst() Duel.HintSelection(g)
Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP) local tc2=g:GetFirst()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then Duel.SpecialSummon(tc2,SUMMON_TYPE_XYZ,tp,tp,false,true,POS_FACEUP)
local og=tc:GetOverlayGroup() if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
if og:GetCount()>0 then local og=tc:GetOverlayGroup()
Duel.SendtoGrave(og,REASON_RULE) if og:GetCount()>0 then
end Duel.SendtoGrave(og,REASON_RULE)
Duel.Overlay(tc2,Group.FromCards(tc)) end
end Duel.Overlay(tc2,Group.FromCards(tc))
if Duel.IsPlayerAffectedByEffect(tp,60152321) then end
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.IsPlayerAffectedByEffect(tp,60152321) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c60152311.e99opfilter) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN) e1:SetValue(c60152311.e99opfilter)
tc2:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_CHAIN)
end tc2:RegisterEffect(e1)
tc2:CompleteProcedure() end
end tc2:CompleteProcedure()
end end
end
end end
function c60152316.e99opfilter(e,re) function c60152316.e99opfilter(e,re)
return e:GetHandler()~=re:GetOwner() return e:GetHandler()~=re:GetOwner()
end end
\ No newline at end of file
...@@ -39,9 +39,10 @@ function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,9 +39,10 @@ function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp) function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsFaceup() and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack() local atk=tc:GetTextAttack()
if atk<0 then atk=0 end if atk<0 then atk=0 end
......
...@@ -47,9 +47,10 @@ function c76121005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,9 +47,10 @@ function c76121005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c76121005.spop1(e,tp,eg,ep,ev,re,r,rp) function c76121005.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
......
...@@ -42,9 +42,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,9 +42,10 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if tc:GetSummonLocation()==LOCATION_EXTRA then if tc:GetSummonLocation()==LOCATION_EXTRA then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
......
...@@ -37,6 +37,7 @@ end ...@@ -37,6 +37,7 @@ end
function c9910237.operation(e,tp,eg,ep,ev,re,r,rp) function c9910237.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910237.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c9910237.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
if g:GetCount()>0 then if g:GetCount()>0 then
......
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