Commit 6996cde4 authored by POLYMER's avatar POLYMER

fix

parent bf9374de
--自天空飘落的那片羽 --自天空飘落的那片羽
local cm,m=GetID() local cm,m=GetID()
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,56433456)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,1,1) aux.AddLinkProcedure(c,cm.matfilter,1,1)
......
...@@ -59,11 +59,11 @@ function s.eqfilter1(c,tp) ...@@ -59,11 +59,11 @@ function s.eqfilter1(c,tp)
end end
function s.eqfilter2(c,tp) function s.eqfilter2(c,tp)
return aux.IsCodeListed(c,12866755) and c:IsType(TYPE_FUSION) and return aux.IsCodeListed(c,12866755) and c:IsType(TYPE_FUSION) and
c:CheckUniqueOnField(tp) and (c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_FIEND)) c:CheckUniqueOnField(tp) and (c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_FIEND)) and not c:IsForbidden()
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.eqfilter(chkc,tp) and if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.eqfilter2(chkc,tp) and
chkc:IsControler(tp) end chkc:IsControler(tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return ft>0 if chk==0 then return ft>0
......
...@@ -76,7 +76,7 @@ end ...@@ -76,7 +76,7 @@ end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tf=re:GetTarget() local tf=re:GetTarget()
local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true) local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true)
return eg:IsExists(cm.tgfilter,1,nil,tp) and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c) return re:GetHandlerPlayer()~=tp and eg:IsExists(cm.tgfilter,1,nil,tp) and tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -44,10 +44,16 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,10 +44,16 @@ function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return e:GetHandler():GetEquipTarget() and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function cm.desfilter(c,f) function cm.desfilter(c,f)
return f:IsExists(cm.desfilter1,1,nil,c) and f:IsContains(c) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and f:IsExists(cm.ffilter,1,nil,c)
end
function cm.ffilter(c,ec)
return not ec:GetColumnGroup():IsContains(c)
end end
function cm.desfilter1(c,ec) function cm.desfilter1(c,ec)
return not ec:GetColumnGroup():IsContains(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function cm.ffilter2(c,g)
return g:IsExists(cm.ffilter,1,nil,c)
end end
function cm.leftfilter(c,seq) function cm.leftfilter(c,seq)
return c:GetSequence()>4-seq and c:GetSequence()<5 return c:GetSequence()>4-seq and c:GetSequence()<5
...@@ -57,18 +63,18 @@ function cm.rightfilter(c,seq) ...@@ -57,18 +63,18 @@ function cm.rightfilter(c,seq)
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)
local f=tama.cosmicFighters_equipGetFormation(e:GetHandler()) local f=tama.cosmicFighters_equipGetFormation(e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil,f) end if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil,f) end
--local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,0,nil,f)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local f=tama.cosmicFighters_equipGetFormation(e:GetHandler()) local f=tama.cosmicFighters_equipGetFormation(e:GetHandler())
local g=Duel.GetMatchingGroup(cm.desfilter1,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local ec=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_MZONE,0,1,1,nil,f) local fsg=f:FilterSelect(tp,cm.ffilter2,1,1,nil,g)
local g=Duel.GetMatchingGroup(cm.desfilter1,tp,0,LOCATION_ONFIELD,nil,ec) if fsg:GetCount()>0 then
if g:GetCount()>0 then local ec=fsg:GetFirst()
local seq=ec:GetSequence() local seq=ec:GetSequence()
if seq==5 then seq=1 if seq==5 then seq=1
elseif seq==6 then seq=3 end elseif seq==6 then seq=3 end
...@@ -78,7 +84,6 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +84,6 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if g1:GetCount()>0 and (g2:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then if g1:GetCount()>0 and (g2:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg1=g1:Select(tp,1,1,nil) local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1) sg:Merge(sg1)
if sg1:GetFirst():IsLocation(LOCATION_FZONE) then if sg1:GetFirst():IsLocation(LOCATION_FZONE) then
g2:Sub(sg1) g2:Sub(sg1)
...@@ -87,7 +92,6 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +92,6 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if g2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(m,2))) then if g2:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(m,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg2=g2:Select(tp,1,1,nil) local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2) sg:Merge(sg2)
end end
Duel.HintSelection(sg) Duel.HintSelection(sg)
......
...@@ -23,7 +23,7 @@ function s.initial_effect(c) ...@@ -23,7 +23,7 @@ function s.initial_effect(c)
--negate --negate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
...@@ -77,12 +77,26 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,12 +77,26 @@ function s.discon(e,tp,eg,ep,ev,re,r,rp)
return number>=2 return number>=2
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end local g1,g2,g3=Group.CreateGroup(),Group.CreateGroup(),Group.CreateGroup()
for i=1,ev do for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if te:GetHandler():IsLocation(LOCATION_HAND) and tgp==1-tp then Duel.SetOperationInfo(0,CATEGORY_NEGATE,te:GetHandler(),1,0,0) end if te:GetHandler():IsLocation(LOCATION_HAND) and tgp==1-tp and Duel.IsChainDisablable(i) then g1:AddCard(te:GetHandler()) end
if te:GetHandler():IsLocation(LOCATION_DECK+LOCATION_EXTRA) and tgp==1-tp then Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,te:GetHandler(),1,0,0) end if te:GetHandler():IsLocation(LOCATION_ONFIELD) and tgp==1-tp and te:GetHandler():IsRelateToEffect(te) and te:GetHandler():IsAbleToHand() then g2:AddCard(te:GetHandler()) end
if te:GetHandler():IsLocation(LOCATION_ONFIELD) and tgp==1-tp then Duel.SetOperationInfo(0,CATEGORY_TOHAND,te:GetHandler(),1,0,0) end if te:GetHandler():IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and tgp==1-tp and te:GetHandler():IsRelateToEffect(te) and te:GetHandler():IsCanOverlay() and not te:GetHandler():IsImmuneToEffect(e) then g3:AddCard(te:GetHandler()) end
end
if chk==0 then return #(g1+g2+g3)>0 end
e:SetCategory(0)
if #g1>0 then
e:SetCategory(e:GetCategory()|CATEGORY_NEGATE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,g1,#g1,0,0)
end
if #g2>0 then
e:SetCategory(e:GetCategory()|CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,#g2,0,0)
end
if #g3:Filter(Card.IsLocation,nil,LOCATION_GRAVE)>0 then
e:SetCategory(e:GetCategory()|CATEGORY_GRAVE_ACTION)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g3:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
end end
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
...@@ -94,7 +108,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +108,7 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
if tc~=nil then if tc~=nil then
if tc:IsLocation(LOCATION_HAND) and tgp==1-tp then Duel.NegateEffect(ev) end if tc:IsLocation(LOCATION_HAND) and tgp==1-tp then Duel.NegateEffect(ev) end
if tc:IsLocation(LOCATION_ONFIELD) and tc:IsRelateToEffect(te) and tgp==1-tp then Duel.SendtoHand(tc,nil,REASON_EFFECT) end if tc:IsLocation(LOCATION_ONFIELD) and tc:IsRelateToEffect(te) and tgp==1-tp then Duel.SendtoHand(tc,nil,REASON_EFFECT) end
if tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and tc:IsRelateToEffect(te) and tgp==1-tp then Duel.Overlay(c,tc) end if tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and tc:IsRelateToEffect(te) and not tc:IsImmuneToEffect(e) and not tc:IsHasEffect(EFFECT_NECRO_VALLEY) and tgp==1-tp then Duel.Overlay(c,tc) end
end end
end end
end end
\ No newline at end of file
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