Commit 1f5d20f4 authored by POLYMER's avatar POLYMER

fix

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