Commit 9f8c7f05 authored by Nemo Ma's avatar Nemo Ma

fix

parent d1dc6bb8
......@@ -2,134 +2,135 @@
local m=60152301
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(60152301,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c60152301.e0con)
e0:SetOperation(c60152301.e0op)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152301,1))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,60152301)
e1:SetTarget(c60152301.e1tg)
e1:SetOperation(c60152301.e1op)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--XYZ
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152301,5))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,6012301)
e2:SetCondition(c60152301.e2con)
e2:SetTarget(c60152301.e2tg)
e2:SetOperation(c60152301.e2op)
c:RegisterEffect(e2)
--spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(60152301,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c60152301.e0con)
e0:SetOperation(c60152301.e0op)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152301,1))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,60152301)
e1:SetTarget(c60152301.e1tg)
e1:SetOperation(c60152301.e1op)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--XYZ
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152301,5))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,6012301)
e2:SetCondition(c60152301.e2con)
e2:SetTarget(c60152301.e2tg)
e2:SetOperation(c60152301.e2op)
c:RegisterEffect(e2)
end
function c60152301.e0con(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_COST)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_COST)
end
function c60152301.e0op(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_COST)
Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_COST)
end
function c60152301.e1tgfilter(c,tp)
local code=c:GetCode()
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
and Duel.IsExistingTarget(c60152301.e1tgfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,code)
local code=c:GetCode()
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
and Duel.IsExistingTarget(c60152301.e1tgfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,code)
end
function c60152301.e1tgfilter2(c,code)
return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsCode(code)
and (c:IsAbleToGrave() or c:IsAbleToHand())
return c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) and not c:IsCode(code)
and (c:IsAbleToGrave() or c:IsAbleToHand())
end
function c60152301.e1tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c60152301.e1tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60152301.e1tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if chk==0 then return Duel.IsExistingTarget(c60152301.e1tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60152301.e1tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60152301.e1op(e,tp,eg,ep,ev,re,r,rp)
local tc0=Duel.GetFirstTarget()
local code=tc0:GetCode()
local g=Duel.GetMatchingGroup(c60152301.e1tgfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,code)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,3))
local sg=g:Select(tp,1,1,nil)
local tc2=sg:GetFirst()
if tc2:IsAbleToGrave() and tc2:IsAbleToHand() then
if Duel.SelectYesNo(tp,aux.Stringid(60152301,2)) then
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
else
Duel.SendtoGrave(tc2,REASON_EFFECT)
end
elseif not tc2:IsAbleToGrave() and tc2:IsAbleToHand() then
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
elseif tc2:IsAbleToGrave() and not tc2:IsAbleToHand() then
Duel.SendtoGrave(tc2,REASON_EFFECT)
end
if tc0:IsType(TYPE_XYZ) and e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsImmuneToEffect(e)
and tc0:IsLocation(LOCATION_MZONE) and tc0:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(60152301,4)) then
Duel.Overlay(tc0,Group.FromCards(e:GetHandler()))
end
end
local tc0=Duel.GetFirstTarget()
local code=tc0:GetCode()
local g=Duel.GetMatchingGroup(c60152301.e1tgfilter2,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,code)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,3))
local sg=g:Select(tp,1,1,nil)
local tc2=sg:GetFirst()
if tc2:IsAbleToGrave() and tc2:IsAbleToHand() then
if Duel.SelectYesNo(tp,aux.Stringid(60152301,2)) then
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
else
Duel.SendtoGrave(tc2,REASON_EFFECT)
end
elseif not tc2:IsAbleToGrave() and tc2:IsAbleToHand() then
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc2)
elseif tc2:IsAbleToGrave() and not tc2:IsAbleToHand() then
Duel.SendtoGrave(tc2,REASON_EFFECT)
end
if tc0:IsType(TYPE_XYZ) and e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsImmuneToEffect(e)
and tc0:IsLocation(LOCATION_MZONE) and tc0:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(60152301,4)) then
Duel.Overlay(tc0,Group.FromCards(e:GetHandler()))
end
end
end
function c60152301.e2con(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c60152301.e2tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_XYZ)
end
function c60152301.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetOverlayCount(tp,1,1)-1
if chk==0 then return ct>0 or (Duel.IsExistingMatchingCard(c60152301.e2opfilter,tp,LOCATION_GRAVE,0,1,nil,e)
and Duel.IsExistingMatchingCard(c60152301.e2tgfilter,tp,LOCATION_MZONE,0,1,nil)) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local ct=Duel.GetOverlayCount(tp,1,1)-1
if chk==0 then return ct>0 or (Duel.IsExistingMatchingCard(c60152301.e2opfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e)
and Duel.IsExistingMatchingCard(c60152301.e2tgfilter,tp,LOCATION_MZONE,0,1,nil)) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60152301.e2opfilter(c,e)
return not c:IsImmuneToEffect(e) and not c:IsCode(60152301)
return not c:IsImmuneToEffect(e) and not c:IsCode(60152301)
end
function c60152301.e2op(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetOverlayCount(tp,1,1)
local g0=Duel.GetMatchingGroup(c60152301.e2tgfilter,tp,LOCATION_MZONE,0,nil)
if g0:GetCount()>0 and ct>0 then
if Duel.SelectYesNo(tp,aux.Stringid(60152301,8)) then
Duel.RemoveOverlayCard(tp,1,1,1,3,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,6))
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152301.e2opfilter),tp,LOCATION_GRAVE,0,1,2,nil,e)
Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,7))
local g2=Duel.SelectMatchingCard(tp,c60152301.e2tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local tc2=g2:GetFirst()
Duel.Overlay(tc2,g1)
end
elseif not g0:GetCount()>0 and ct>0 then
Duel.RemoveOverlayCard(tp,1,1,1,3,REASON_EFFECT)
elseif g0:GetCount()>0 and not ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,6))
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152301.e2opfilter),tp,LOCATION_GRAVE,0,1,2,nil,e)
Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,7))
local g2=Duel.SelectMatchingCard(tp,c60152301.e2tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local tc2=g2:GetFirst()
Duel.Overlay(tc2,g1)
end
local ct=Duel.GetOverlayCount(tp,1,1)
local g0=Duel.GetMatchingGroup(c60152301.e2tgfilter,tp,LOCATION_MZONE,0,nil)
local g00=Duel.GetMatchingGroup(c60152301.e2opfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e)
if (g0:GetCount()>0 and g00:GetCount()>0) and ct>0 then
if Duel.SelectYesNo(tp,aux.Stringid(60152301,8)) then
Duel.RemoveOverlayCard(tp,1,1,1,3,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,6))
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152301.e2opfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil,e)
Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,7))
local g2=Duel.SelectMatchingCard(tp,c60152301.e2tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local tc2=g2:GetFirst()
Duel.Overlay(tc2,g1)
end
elseif g0:GetCount()==0 and ct>0 then
Duel.RemoveOverlayCard(tp,1,1,1,3,REASON_EFFECT)
elseif g0:GetCount()>0 and not ct==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,6))
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c60152301.e2opfilter),tp,LOCATION_GRAVE,0,1,2,nil,e)
Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60152301,7))
local g2=Duel.SelectMatchingCard(tp,c60152301.e2tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g2)
local tc2=g2:GetFirst()
Duel.Overlay(tc2,g1)
end
end
\ No newline at end of file
......@@ -2,88 +2,88 @@
local m=60152304
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(60152304,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c60152304.spcon)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152304,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,60152304)
e1:SetTarget(c60152304.e1tg)
e1:SetOperation(c60152304.e1op)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152304,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,6012304)
e2:SetCondition(c60152304.e2con)
e2:SetTarget(c60152304.e2tg)
e2:SetOperation(c60152304.e2op)
c:RegisterEffect(e2)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(60152304,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c60152304.spcon)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60152304,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,60152304)
e1:SetTarget(c60152304.e1tg)
e1:SetOperation(c60152304.e1op)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152304,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,6012304)
e2:SetCondition(c60152304.e2con)
e2:SetTarget(c60152304.e2tg)
e2:SetOperation(c60152304.e2op)
c:RegisterEffect(e2)
end
function c60152304.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c60152304.e1tgfilter(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 c60152304.e1tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60152304.e1tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c60152304.e1tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsAbleToEnterBP() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60152304.e1tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60152304.e1op(e,tp,eg,ep,ev,re,r,rp)
local tc0=Duel.GetFirstTarget()
if tc0:IsRelateToEffect(e) and tc0:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc0:RegisterEffect(e1)
if tc0:IsType(TYPE_XYZ) and e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsImmuneToEffect(e)
and tc0:IsLocation(LOCATION_MZONE) and tc0:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(60152301,4)) then
Duel.Overlay(tc0,Group.FromCards(e:GetHandler()))
end
end
local tc0=Duel.GetFirstTarget()
if tc0:IsRelateToEffect(e) and tc0:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc0:RegisterEffect(e1)
if tc0:IsType(TYPE_XYZ) and e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsImmuneToEffect(e)
and tc0:IsLocation(LOCATION_MZONE) and tc0:IsFaceup() and Duel.SelectYesNo(tp,aux.Stringid(60152301,4)) then
Duel.Overlay(tc0,Group.FromCards(e:GetHandler()))
end
end
end
function c60152304.e2con(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c60152304.e2tgfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c60152304.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152304.e2tgfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c60152304.e2tgfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if chk==0 then return Duel.IsExistingMatchingCard(c60152304.e2tgfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c60152304.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 c60152304.e2op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c60152304.e2tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c60152304.e2tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -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
......@@ -87,7 +87,7 @@ function c60152314.e2op(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT)
e1:SetCategory(CATEGORY_DRAW)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetReset(RESET_EVENT+RESET_TURN_SET+RESET_OVERLAY+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCondition(c60152314.e2opcon)
e1:SetOperation(c60152314.e2opop)
tc:RegisterEffect(e1)
......@@ -120,7 +120,7 @@ function c60152314.e2op(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CLIENT_HINT)
e1:SetCategory(CATEGORY_DRAW)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetReset(RESET_EVENT+RESET_TURN_SET+RESET_OVERLAY+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCondition(c60152314.e2opcon)
e1:SetOperation(c60152314.e2opop)
tc:RegisterEffect(e1)
......@@ -172,6 +172,7 @@ end
function c60152314.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,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
......@@ -52,7 +52,7 @@ end
function c60159907.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>-2
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.CheckReleaseGroup(tp,c60159907.spfilter1,1,nil,tp,c)
end
function c60159907.spop(e,tp,eg,ep,ev,re,r,rp,c)
......
--假面的舞踏会
function c60159909.initial_effect(c)
c:SetUniqueOnField(1,1,60159909)
--Activate
c:SetUniqueOnField(1,1,60159909)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,60159909)
e1:SetCountLimit(1,60159909+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,0x1c0)
c:RegisterEffect(e1)
--adjust
--adjust
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -16,7 +16,7 @@ function c60159909.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c60159909.adjustop)
c:RegisterEffect(e2)
--disable spsummon
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
......@@ -25,16 +25,16 @@ function c60159909.initial_effect(c)
e3:SetTargetRange(1,1)
e3:SetTarget(c60159909.splimit)
c:RegisterEffect(e3)
--
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(60159909,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,0x1c0)
e4:SetCondition(c60159909.atcon)
e4:SetHintTiming(0,0x1c0)
e4:SetCondition(c60159909.atcon)
e4:SetTarget(c60159909.attg)
e4:SetOperation(c60159909.atop)
c:RegisterEffect(e4)
......@@ -62,13 +62,13 @@ function c60159909.atcon(e,tp,eg,ep,ev,re,r,rp)
end
function c60159909.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) end
Duel.Hint(HINT_SELECTMSG,tp,562)
Duel.Hint(HINT_SELECTMSG,tp,562)
local rc=Duel.AnnounceAttribute(tp,1,0xffff)
e:SetLabel(rc)
end
function c60159909.atop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -7,16 +7,21 @@ function c60159910.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,60159910)
e1:SetCost(c60159910.cost)
e1:SetTarget(c60159910.target)
e1:SetOperation(c60159910.activate)
c:RegisterEffect(e1)
end
function c60159910.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c60159910.filter(c)
return c:IsFacedown() and c:IsAbleToChangeControler()
return c:IsAbleToChangeControler() and not c:IsType(TYPE_PENDULUM)
end
function c60159910.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(1-tp) and c60159910.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>1
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>2
and Duel.IsExistingTarget(c60159910.filter,tp,0,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c60159910.filter,tp,0,LOCATION_SZONE,1,1,nil)
......
......@@ -52,7 +52,7 @@ function c60159911.spfilter(c)
end
function c60159911.spcon(e,c)
if c==nil then return true end
return Duel.GetMZoneCount(c:GetControler())>0
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60159911.spfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,2,nil)
end
function c60159911.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
......@@ -60,6 +60,7 @@ function c60159911.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
end
function c60159911.aclimit(e,re,tp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and e:GetHandler():GetSummonLocation()==LOCATION_HAND and e:GetHandler():IsFaceup() and re:IsActiveType(TYPE_MONSTER) and bit.band(re:GetHandler():GetSummonLocation(),LOCATION_EXTRA+LOCATION_GRAVE)~=0
and not re:GetHandler():IsImmuneToEffect(e)
end
function c60159911.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--地狱使者亲临
function c60159915.initial_effect(c)
aux.AddRitualProcGreaterCode(c,60159914)
aux.AddCodeList(c,60159914)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -22,6 +22,7 @@ function c60159915.initial_effect(c)
e2:SetOperation(c60159915.activate)
c:RegisterEffect(e2)
end
c60159915.fit_monster={60159914}
function c60159915.filter(c,e,tp,m)
if not c:IsCode(60159914) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
......@@ -130,4 +131,4 @@ function c60159915.activate(e,tp,eg,ep,ev,re,r,rp)
end
function c60159915.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
\ No newline at end of file
end
......@@ -57,7 +57,7 @@ function c60159917.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
......
......@@ -3,139 +3,145 @@ function c60159918.initial_effect(c)
c:SetUniqueOnField(1,1,60159918)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c60159918.sprcon)
e2:SetOperation(c60159918.sprop)
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c60159918.sprcon)
e2:SetOperation(c60159918.sprop)
e2:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e2)
c:RegisterEffect(e2)
--lv
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_LEVEL)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c60159918.val)
c:RegisterEffect(e4)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_LEVEL)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c60159918.val)
c:RegisterEffect(e4)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c60159918.adval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e5)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_BASE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c60159918.adval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e5)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60159918,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c60159918.atkcon)
e1:SetCost(c60159918.spcost)
e1:SetTarget(c60159918.target)
e1:SetOperation(c60159918.atkop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60159918,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c60159918.atkcon)
e1:SetCost(c60159918.spcost)
e1:SetTarget(c60159918.target)
e1:SetOperation(c60159918.atkop)
c:RegisterEffect(e1)
end
function c60159918.sprfilter1(c,tp)
local lv=c:GetLevel()
return c:IsFaceup() and c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c60159918.sprfilter2,tp,LOCATION_MZONE,0,1,nil,lv)
local lv=c:GetLevel()
return c:IsFaceup() and c:IsType(TYPE_TUNER) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c60159918.sprfilter2,tp,LOCATION_MZONE,0,1,nil,lv)
end
function c60159918.sprfilter2(c,lv)
return c:IsFaceup() and c:GetLevel()~=lv and not c:IsType(TYPE_TUNER) and not c:IsType(TYPE_XYZ)
and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToGraveAsCost()
return c:IsFaceup() and c:GetLevel()~=lv and not c:IsType(TYPE_TUNER) and not c:IsType(TYPE_XYZ)
and c:IsAbleToGraveAsCost()
end
function c60159918.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>-2
and Duel.IsExistingMatchingCard(c60159918.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c60159918.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c60159918.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c60159918.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c60159918.sprfilter2,tp,LOCATION_MZONE,0,1,1,nil,g1:GetFirst():GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
c:SetMaterial(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c60159918.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c60159918.sprfilter2,tp,LOCATION_MZONE,0,1,1,nil,g1:GetFirst():GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
c:SetMaterial(g1)
end
function c60159918.val(e,c)
local g=c:GetMaterial()
local lv=0
local tc=g:GetFirst()
while tc do
lv=lv+(tc:GetLevel())
tc=g:GetNext()
end
return lv
while tc do
lv=lv+(tc:GetLevel())
tc=g:GetNext()
end
return lv
end
function c60159918.adval(e,c)
return e:GetHandler():GetLevel()*300
return e:GetHandler():GetLevel()*300
end
function c60159918.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c60159918.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60159918.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c60159918.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue((tc:GetAttack())/2)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_DEFENSE_FINAL)
e5:SetValue((tc:GetDefense())/2)
c:RegisterEffect(e5)
tc=g:GetNext()
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c60159918.thcon)
e1:SetOperation(c60159918.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetTarget(c60159918.tg)
e1:SetValue(c60159918.atkval)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(c60159918.defval)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetCondition(c60159918.thcon)
e3:SetOperation(c60159918.thop)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c60159918.tg(e,c)
return c:IsFaceup()
end
function c60159918.atkval(e,c)
return c:GetAttack()/2
end
function c60159918.defval(e,c)
return c:GetDefense()/2
end
function c60159918.thfilter(c)
return c:IsFaceup() and (c:GetAttack()~=c:GetBaseAttack() or c:GetDefense()~=c:GetBaseDefense())
return c:IsFaceup() and (c:GetAttack()~=c:GetBaseAttack() or c:GetDefense()~=c:GetBaseDefense())
end
function c60159918.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c60159918.thfilter,tp,0,LOCATION_MZONE,1,nil)
return Duel.IsExistingMatchingCard(c60159918.thfilter,tp,0,LOCATION_MZONE,1,nil)
end
function c60159918.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,60159918)
local sg=Duel.GetMatchingGroup(c60159918.thfilter,tp,0,LOCATION_MZONE,nil)
local ct=Duel.Destroy(sg,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*600,REASON_EFFECT)
end
Duel.Hint(HINT_CARD,0,60159918)
local sg=Duel.GetMatchingGroup(c60159918.thfilter,tp,0,LOCATION_MZONE,nil)
local ct=Duel.Destroy(sg,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*600,REASON_EFFECT)
end
end
--朔时的祈愿
function c60159919.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c60159919.target)
e1:SetOperation(c60159919.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c60159919.target)
e1:SetOperation(c60159919.activate)
c:RegisterEffect(e1)
end
function c60159919.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c60159919.spfilter1(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function c60159919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c60159919.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c60159919.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 and Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c60159919.spfilter1,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c60159919.spfilter1,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60159919.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -39,7 +39,7 @@ function c60159921.effcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c60159921.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c60159921.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -29,7 +29,7 @@ function c60159924.filter(c)
and bit.band(c:GetSummonLocation(),LOCATION_EXTRA+LOCATION_GRAVE)~=0 and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c60159924.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c60159924.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c60159924.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c60159924.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60159924.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......@@ -37,8 +37,9 @@ end
function c60159924.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local code=tc:GetCode()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) then
local code=tc:GetCode()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled()
then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -55,7 +56,7 @@ function c60159924.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+0x1fe0000)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
......@@ -81,8 +82,8 @@ end
function c60159924.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local code=tc:GetCode()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) and tc:IsType(TYPE_EFFECT) then
local code=tc:GetCode()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsType(TYPE_EFFECT) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -161,21 +161,34 @@
!setname 0x6da0 幻梦迷境
!setname 0x9da0 星光歌剧
#LaiBill 601 0xb20-0xb2f
#LaiBill 529508379 601 0xb20-0xb2f
!setname 0xab20 幻想曲
!setname 0xcb20 乐章
!setname 0x3b21 千夜
!setname 0x5b21 天玲
!setname 0x9b21 天夜
!setname 0xab21 绘雨
!setname 0xb22 乖离
!setname 0x5b22 纯白型
!setname 0x3b23 爱莎
!setname 0x5b23 晓美焰
!setname 0x9b23 ├军团┤
!setname 0x6b23 FantasiaT
!setname 0x9b23 军团
!setname 0xab23 两仪式
!setname 0xcb23 圣白莲
!setname 0x3b24 天符
!setname 0x3b26 天空的水晶部队
!setname 0x6b25 佐仓杏子
!setname 0xcb25 鹿目圆香
!setname 0x3b26 天空的水晶部队
!setname 0x6b26 魔铳
!setname 0x9b26 魔缎
!setname 0xab26 线膛燧发枪
!setname 0xcb26 连结姬
!setname 0x6b27 皇家骑士
!setname 0x9b27 何蒙库鲁兹
!setname 0xab27 素晴
!setname 0x3b28 LUKA
!setname 0x9b28 RWBY
#星眼 334 0x340-0x34f
!setname 0x340 灵装
......
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