Commit d4557247 authored by POLYMER's avatar POLYMER

fix

parent aab811ad
...@@ -126,7 +126,7 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,7 +126,7 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.xfilter(c,tp,g) function cm.xfilter(c,tp,g)
return c:IsFaceup() and c:IsControler(tp) and g:IsExists(Card.IsAttribute,1,c,c:GetAttribute()) return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and g:IsExists(Card.IsAttribute,1,c,c:GetAttribute())
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
...@@ -137,8 +137,12 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,8 +137,12 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=eg:Filter(Card.IsLocation,nil,LOCATION_MZONE) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetTargetCard(g) local xg=Duel.GetOverlayGroup(tp,1,1)
g:Merge(xg)
local tg=eg:Filter(cm.xfilter,nil,1-tp,g)
Duel.SetTargetCard(tg)
Duel.HintSelection(tg)
end end
function cm.imfilter(c,e) function cm.imfilter(c,e)
return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and c:IsCanOverlay() return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) and c:IsCanOverlay()
...@@ -167,7 +171,7 @@ function cm.leave(e,tp,eg,ep,ev,re,r,rp) ...@@ -167,7 +171,7 @@ function cm.leave(e,tp,eg,ep,ev,re,r,rp)
local b2=re and (re:GetCode()==EFFECT_SET_PROC or re:GetCode()==EFFECT_MSET_COST) local b2=re and (re:GetCode()==EFFECT_SET_PROC or re:GetCode()==EFFECT_MSET_COST)
local b3=(re and (re:GetCode()==EFFECT_SPSUMMON_PROC or re:GetCode()==EFFECT_SPSUMMON_PROC_G or re:GetCode()==EFFECT_SPSUMMON_COST or re:GetCode()==EVENT_SPSUMMON)) or Duel.CheckEvent(EVENT_SPSUMMON) --and (not re:GetHandler():IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp,tp,nil,re:GetHandler())==Duel.GetLocationCountFromEx(tp,tp,nil,re:GetHandler(),0x1f)) local b3=(re and (re:GetCode()==EFFECT_SPSUMMON_PROC or re:GetCode()==EFFECT_SPSUMMON_PROC_G or re:GetCode()==EFFECT_SPSUMMON_COST or re:GetCode()==EVENT_SPSUMMON)) or Duel.CheckEvent(EVENT_SPSUMMON) --and (not re:GetHandler():IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp,tp,nil,re:GetHandler())==Duel.GetLocationCountFromEx(tp,tp,nil,re:GetHandler(),0x1f))
local c=e:GetHandler() local c=e:GetHandler()
if c:IsPreviousControler(tp) then local tp=c:GetPreviousControler()
local og=c:GetOverlayGroup() local og=c:GetOverlayGroup()
local tg=og:Filter(cm.spfilter,nil,e,tp) local tg=og:Filter(cm.spfilter,nil,e,tp)
if #tg==0 then return end if #tg==0 then return end
...@@ -218,7 +222,6 @@ function cm.leave(e,tp,eg,ep,ev,re,r,rp) ...@@ -218,7 +222,6 @@ function cm.leave(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end
end end
function cm.ffilter(c,fid) function cm.ffilter(c,fid)
return c:GetFlagEffect(m)>0 and fid==c:GetFlagEffectLabel(m) return c:GetFlagEffect(m)>0 and fid==c:GetFlagEffectLabel(m)
......
...@@ -134,6 +134,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -134,6 +134,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(function(e) e1:SetOperation(function(e)
if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(11451902,2))
--change code --change code
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
......
...@@ -148,6 +148,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -148,6 +148,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(function(e) e1:SetOperation(function(e)
if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(11451902,2))
--change code --change code
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
...@@ -175,6 +176,7 @@ function cm.cpcost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -175,6 +176,7 @@ function cm.cpcost2(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(function(e) e1:SetOperation(function(e)
if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(11451902,2))
--change code --change code
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
......
...@@ -82,6 +82,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -82,6 +82,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(function(e) e1:SetOperation(function(e)
if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then if Duel.GetFlagEffect(1,11451901)==0 and Duel.GetCurrentChain()==e:GetLabel() then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(11451902,2))
--change code --change code
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
......
...@@ -50,7 +50,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
local rec=Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) local rec=Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
if rec>0 then if rec>0 then
Duel.Damage(1-tp.rec*200,REASON_EFFECT) Duel.Damage(1-tp,rec*200,REASON_EFFECT)
end end
end end
end end
......
...@@ -37,17 +37,17 @@ function s.initial_effect(c) ...@@ -37,17 +37,17 @@ function s.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsSetCard(0x569) return rp==tp and re:IsActiveType(TYPE_CONTINUOUS) and re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsSetCard(0x569)
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD~=0
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -46,17 +46,17 @@ function s.initial_effect(c) ...@@ -46,17 +46,17 @@ function s.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsSetCard(0x569) return rp==tp and re:IsActiveType(TYPE_CONTINUOUS) and re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsSetCard(0x569)
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD~=0
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -67,12 +67,12 @@ function s.tgfilter(c) ...@@ -67,12 +67,12 @@ function s.tgfilter(c)
return c:IsSetCard(0xa569) and c:IsAbleToGrave() return c:IsSetCard(0xa569) and c:IsAbleToGrave()
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
......
...@@ -5,7 +5,7 @@ function s.initial_effect(c) ...@@ -5,7 +5,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_CHAIN_SOLVED) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
...@@ -13,6 +13,9 @@ function s.initial_effect(c) ...@@ -13,6 +13,9 @@ function s.initial_effect(c)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--local e10=e1:Clone()
--e10:SetRange(LOCATION_GRAVE)
--c:RegisterEffect(e10)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
...@@ -34,17 +37,17 @@ function s.initial_effect(c) ...@@ -34,17 +37,17 @@ function s.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsSetCard(0x569) return rp==tp and re:IsActiveType(TYPE_CONTINUOUS) and re:IsActiveType(TYPE_TRAP) and re:GetHandler():IsSetCard(0x569)
and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)&LOCATION_ONFIELD~=0
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -15,7 +15,7 @@ function s.initial_effect(c) ...@@ -15,7 +15,7 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_GRAVE) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(s.spcon) e2:SetCondition(s.spcon)
...@@ -54,7 +54,7 @@ end ...@@ -54,7 +54,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil) end and not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local m=89387022 local m=89387022
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,93031067)
aux.AddLinkProcedure(c,cm.mfilter,1,1) aux.AddLinkProcedure(c,cm.mfilter,1,1)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=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