Commit 36b42525 authored by dest's avatar dest Committed by DailyShana

fix Storm Neos + Chaos Neos (#461)

parent 75a987fa
...@@ -51,51 +51,54 @@ end ...@@ -51,51 +51,54 @@ end
function c17032740.splimit(e,se,sp,st) function c17032740.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c17032740.spfilter(c,code) function c17032740.spfilter(c,code1,code2,code3)
return c:IsAbleToDeckOrExtraAsCost() and c:IsFusionCode(code) return c:IsAbleToDeckOrExtraAsCost() and (c:IsFusionCode(code1) or c:IsFusionCode(code2) or c:IsFusionCode(code3))
end
function c17032740.spfilter1(c,mg,ft)
local mg2=mg:Clone()
mg2:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return ft>=-1 and c:IsFusionCode(89943723) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(nil,true)
and mg2:IsExists(c17032740.spfilter2,1,nil,mg2,ft)
end
function c17032740.spfilter2(c,mg,ft)
local mg2=mg:Clone()
mg2:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return ft>=0 and c:IsFusionCode(43237273) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(nil,true)
and mg2:IsExists(c17032740.spfilter3,1,nil,ft)
end
function c17032740.spfilter3(c,ft)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return ft>=1 and c:IsFusionCode(17732278) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(nil,true)
end end
function c17032740.spcon(e,c) function c17032740.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-2 then return false end if ft<-2 then return false end
local g1=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) local mg=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723,43237273,17732278)
local g2=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273) return mg:IsExists(c17032740.spfilter1,1,nil,mg,ft)
local g3=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278)
if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
if ft==-2 then return f1+f2+f3==3
elseif ft==-1 then return f1+f2+f3>=2
else return f1+f2+f3>=1 end
end end
function c17032740.spop(e,tp,eg,ep,ev,re,r,rp,c) function c17032740.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) local mg=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723,43237273,17732278)
local g2=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,43237273)
local g3=Duel.GetMatchingGroup(c17032740.spfilter,tp,LOCATION_ONFIELD,0,nil,17732278)
g1:Merge(g2)
g1:Merge(g3)
local g=Group.CreateGroup() local g=Group.CreateGroup()
local tc=nil local tc=nil
for i=1,3 do for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then if i==1 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() tc=mg:FilterSelect(tp,c17032740.spfilter1,1,1,nil,mg,ft):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end end
g:AddCard(tc) if i==2 then
if tc:IsFusionCode(89943723) then tc=mg:FilterSelect(tp,c17032740.spfilter2,1,1,nil,mg,ft):GetFirst()
g1:Remove(Card.IsFusionCode,nil,89943723) end
elseif tc:IsFusionCode(43237273) then if i==3 then
g1:Remove(Card.IsFusionCode,nil,43237273) tc=mg:FilterSelect(tp,c17032740.spfilter3,1,1,nil,ft):GetFirst()
elseif tc:IsFusionCode(17732278) then
g1:Remove(Card.IsFusionCode,nil,17732278)
end end
ft=ft+1 g:AddCard(tc)
mg:RemoveCard(tc)
if tc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
end end
local cg=g:Filter(Card.IsFacedown,nil) local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then if cg:GetCount()>0 then
......
...@@ -59,51 +59,54 @@ end ...@@ -59,51 +59,54 @@ end
function c49352945.splimit(e,se,sp,st) function c49352945.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c49352945.spfilter(c,code) function c49352945.spfilter(c,code1,code2,code3)
return c:IsAbleToDeckOrExtraAsCost() and c:IsFusionCode(code) return c:IsAbleToDeckOrExtraAsCost() and (c:IsFusionCode(code1) or c:IsFusionCode(code2) or c:IsFusionCode(code3))
end
function c49352945.spfilter1(c,mg,ft)
local mg2=mg:Clone()
mg2:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return ft>=-1 and c:IsFusionCode(89943723) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(nil,true)
and mg2:IsExists(c49352945.spfilter2,1,nil,mg2,ft)
end
function c49352945.spfilter2(c,mg,ft)
local mg2=mg:Clone()
mg2:RemoveCard(c)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return ft>=0 and c:IsFusionCode(17955766) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(nil,true)
and mg2:IsExists(c49352945.spfilter3,1,nil,ft)
end
function c49352945.spfilter3(c,ft)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return ft>=1 and c:IsFusionCode(54959865) and c:IsAbleToDeckOrExtraAsCost() and c:IsCanBeFusionMaterial(nil,true)
end end
function c49352945.spcon(e,c) function c49352945.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-2 then return false end if ft<-2 then return false end
local g1=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) local mg=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723,17955766,54959865)
local g2=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766) return mg:IsExists(c49352945.spfilter1,1,nil,mg,ft)
local g3=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865)
if g1:GetCount()==0 or g2:GetCount()==0 or g3:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
local f3=g3:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 and 1 or 0
if ft==-2 then return f1+f2+f3==3
elseif ft==-1 then return f1+f2+f3>=2
else return f1+f2+f3>=1 end
end end
function c49352945.spop(e,tp,eg,ep,ev,re,r,rp,c) function c49352945.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723) local mg=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723,17955766,54959865)
local g2=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,17955766)
local g3=Duel.GetMatchingGroup(c49352945.spfilter,tp,LOCATION_ONFIELD,0,nil,54959865)
g1:Merge(g2)
g1:Merge(g3)
local g=Group.CreateGroup() local g=Group.CreateGroup()
local tc=nil local tc=nil
for i=1,3 do for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then if i==1 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() tc=mg:FilterSelect(tp,c49352945.spfilter1,1,1,nil,mg,ft):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end end
g:AddCard(tc) if i==2 then
if tc:IsFusionCode(89943723) then tc=mg:FilterSelect(tp,c49352945.spfilter2,1,1,nil,mg,ft):GetFirst()
g1:Remove(Card.IsFusionCode,nil,89943723) end
elseif tc:IsFusionCode(17955766) then if i==3 then
g1:Remove(Card.IsFusionCode,nil,17955766) tc=mg:FilterSelect(tp,c49352945.spfilter3,1,1,nil,ft):GetFirst()
elseif tc:IsFusionCode(54959865) then
g1:Remove(Card.IsFusionCode,nil,54959865)
end end
ft=ft+1 g:AddCard(tc)
mg:RemoveCard(tc)
if tc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
end end
local cg=g:Filter(Card.IsFacedown,nil) local cg=g:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then if cg:GetCount()>0 then
......
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