Commit 1f5d20f4 authored by POLYMER's avatar POLYMER

fix

parent dcd22cc4
......@@ -3,7 +3,8 @@ local cm,m,o=GetID()
function c13000772.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.check,cm.xyzcheck,2,2)
local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -12,43 +13,56 @@ local e2=Effect.CreateEffect(c)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e3:SetCountLimit(1,m+1000)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetCost(cm.cost2)
e3:SetTarget(cm.tg2)
e3:SetOperation(cm.op2)
c:RegisterEffect(e3)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,m)
end
function cm.cost2(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)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetCondition(cm.con2)
e1:SetCost(cm.cost2)
e1:SetTarget(cm.tg2)
e1:SetOperation(cm.op2)
c:RegisterEffect(e1)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local mc=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,mc) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local mc=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,mc)
local g=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,sg:GetFirst(),nil)
end
end
function cm.check(c)
return c:GetRank()>0
end
......@@ -62,30 +76,17 @@ end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveOverlayCard(e:GetHandlerPlayer(),1,0,2,2,REASON_EFFECT)
end
function cm.tgfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsImmuneToEffect(e)
function cm.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,0,1,c,e) and c:IsCanOverlay() then
local aa=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,c,e):GetFirst()
Duel.Overlay(aa,c)
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,0,1,c) and c:IsCanOverlay() then
local tg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,c,e)
Duel.HintSelection(tg)
if tg:GetFirst():IsImmuneToEffect(e) then return end
local og=c:GetOverlayGroup()
if #og>0 then Duel.SendtoGrave(og,REASON_RULE) end
Duel.Overlay(tg:GetFirst(),c)
end
end
......@@ -105,9 +105,9 @@ function c60010059.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(ae:GetCost())
e3:SetTarget(ae:GetTarget())
e3:SetOperation(ae:GetOperation())
if ae:GetCost() then e3:SetCost(ae:GetCost()) end
if ae:GetTarget() then e3:SetTarget(ae:GetTarget()) end
if ae:GetOperation() then e3:SetOperation(ae:GetOperation()) end
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
......
......@@ -5,12 +5,12 @@ function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
--e1:SetCode(EFFECT_SPSUMMON_CONDITION)
--e1:SetValue(aux.FALSE)
--c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
......@@ -5,11 +5,11 @@ function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
--local e1=Effect.CreateEffect(c)
--e1:SetType(EFFECT_TYPE_SINGLE)
--e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
--e1:SetCode(EFFECT_SPSUMMON_CONDITION)
--e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
......
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