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