Commit 0923b804 authored by VanillaSalt's avatar VanillaSalt

fix

parent 7b91fc25
...@@ -21,8 +21,7 @@ function c23536866.filter(c,e,tp) ...@@ -21,8 +21,7 @@ function c23536866.filter(c,e,tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23536866.xyzfilter(c,mg) function c23536866.xyzfilter(c,mg)
if c.xyz_count~=2 then return false end return c:IsAttribute(ATTRIBUTE_WATER) and c:IsXyzSummonable(mg,2,2)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsXyzSummonable(mg)
end end
function c23536866.mfilter1(c,mg,exg) function c23536866.mfilter1(c,mg,exg)
return mg:IsExists(c23536866.mfilter2,1,c,c,exg) return mg:IsExists(c23536866.mfilter2,1,c,c,exg)
......
...@@ -58,8 +58,6 @@ function c24658418.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,8 +58,6 @@ function c24658418.spop(e,tp,eg,ep,ev,re,r,rp)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst() local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.XyzSummon(tp,xyz,g,1,5)
local sg=g:FilterSelect(tp,xyz.xyz_filter,xyz.xyz_count,xyz.xyz_count,nil)
Duel.XyzSummon(tp,xyz,sg)
end end
end end
...@@ -15,7 +15,7 @@ function c29087919.filter(c,e,tp) ...@@ -15,7 +15,7 @@ function c29087919.filter(c,e,tp)
return c:IsSetCard(0x1072) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x1072) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c29087919.xyzfilter(c,mg,ct) function c29087919.xyzfilter(c,mg,ct)
return c:IsXyzSummonable(mg) and c.xyz_count<=ct return c:IsXyzSummonable(mg,2,ct)
end end
function c29087919.mfilter1(c,mg,exg,ct) function c29087919.mfilter1(c,mg,exg,ct)
return mg:IsExists(c29087919.mfilter2,1,nil,Group.FromCards(c),mg,exg,ct) return mg:IsExists(c29087919.mfilter2,1,nil,Group.FromCards(c),mg,exg,ct)
...@@ -27,7 +27,7 @@ function c29087919.mfilter2(c,g,mg,exg,ct) ...@@ -27,7 +27,7 @@ function c29087919.mfilter2(c,g,mg,exg,ct)
tc=g:GetNext() tc=g:GetNext()
end end
g:AddCard(c) g:AddCard(c)
local result=exg:IsExists(Card.IsXyzSummonable,1,nil,g) local result=exg:IsExists(Card.IsXyzSummonable,1,nil,g,g:GetCount(),g:GetCount())
or (g:GetCount()<ct and mg:IsExists(c29087919.mfilter2,1,nil,g,mg,exg,ct)) or (g:GetCount()<ct and mg:IsExists(c29087919.mfilter2,1,nil,g,mg,exg,ct))
g:RemoveCard(c) g:RemoveCard(c)
return result return result
...@@ -45,7 +45,7 @@ function c29087919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -45,7 +45,7 @@ function c29087919.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sg2=mg:FilterSelect(tp,c29087919.mfilter2,1,1,nil,sg1,mg,exg,ct) local sg2=mg:FilterSelect(tp,c29087919.mfilter2,1,1,nil,sg1,mg,exg,ct)
sg1:Merge(sg2) sg1:Merge(sg2)
while sg1:GetCount()<ct and mg:IsExists(c29087919.mfilter2,1,nil,sg1,mg,exg,ct) while sg1:GetCount()<ct and mg:IsExists(c29087919.mfilter2,1,nil,sg1,mg,exg,ct)
and (not exg:IsExists(Card.IsXyzSummonable,1,nil,sg1) or Duel.SelectYesNo(tp,aux.Stringid(29087919,0))) do and (not exg:IsExists(Card.IsXyzSummonable,1,nil,sg1,sg1:GetCount(),sg1:GetCount()) or Duel.SelectYesNo(tp,aux.Stringid(29087919,0))) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg3=mg:FilterSelect(tp,c29087919.mfilter2,1,1,nil,sg1,mg,exg,ct) local sg3=mg:FilterSelect(tp,c29087919.mfilter2,1,1,nil,sg1,mg,exg,ct)
sg1:Merge(sg3) sg1:Merge(sg3)
...@@ -57,7 +57,7 @@ function c29087919.filter2(c,e,tp) ...@@ -57,7 +57,7 @@ function c29087919.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c29087919.spfilter(c,mg,ct) function c29087919.spfilter(c,mg,ct)
return c:IsXyzSummonable(mg) and c.xyz_count==ct return c:IsXyzSummonable(mg,ct,ct)
end end
function c29087919.activate(e,tp,eg,ep,ev,re,r,rp) function c29087919.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c29087919.filter2,nil,e,tp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c29087919.filter2,nil,e,tp)
......
...@@ -25,8 +25,7 @@ function c56611470.filter(c,e) ...@@ -25,8 +25,7 @@ function c56611470.filter(c,e)
return c:IsFaceup() and c:IsSetCard(0x97) and c:IsCanBeEffectTarget(e) return c:IsFaceup() and c:IsSetCard(0x97) and c:IsCanBeEffectTarget(e)
end end
function c56611470.xyzfilter(c,mg) function c56611470.xyzfilter(c,mg)
if c.xyz_count~=2 then return false end return c:IsXyzSummonable(mg,2,2)
return c:IsXyzSummonable(mg)
end end
function c56611470.mfilter1(c,mg,exg) function c56611470.mfilter1(c,mg,exg)
return mg:IsExists(c56611470.mfilter2,1,c,c,exg) return mg:IsExists(c56611470.mfilter2,1,c,c,exg)
......
...@@ -14,8 +14,7 @@ function c61314842.filter(c,e,tp) ...@@ -14,8 +14,7 @@ function c61314842.filter(c,e,tp)
return c:IsSetCard(0x76) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x76) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c61314842.xyzfilter(c,mg) function c61314842.xyzfilter(c,mg)
if c.xyz_count~=2 then return false end return c:IsXyzSummonable(mg,2,2)
return c:IsXyzSummonable(mg)
end end
function c61314842.mfilter1(c,mg,exg) function c61314842.mfilter1(c,mg,exg)
return mg:IsExists(c61314842.mfilter2,1,c,c,exg) return mg:IsExists(c61314842.mfilter2,1,c,c,exg)
......
...@@ -30,8 +30,7 @@ function c62829077.filter(c,e,tp) ...@@ -30,8 +30,7 @@ function c62829077.filter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c62829077.xyzfilter(c,mg) function c62829077.xyzfilter(c,mg)
if c.xyz_count~=3 then return false end return c:IsSetCard(0x7f) and c:IsXyzSummonable(mg,3,3)
return c:IsSetCard(0x7f) and c:IsXyzSummonable(mg)
end end
function c62829077.mfilter1(c,mg,exg) function c62829077.mfilter1(c,mg,exg)
return mg:IsExists(c62829077.mfilter2,1,c,c,mg,exg) return mg:IsExists(c62829077.mfilter2,1,c,c,mg,exg)
......
--究極幻神 アルティミトル・ビシバールキン --究極幻神 アルティミトル・ビシバールキン
function c90884403.initial_effect(c) function c90884403.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
......
...@@ -213,35 +213,46 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op) ...@@ -213,35 +213,46 @@ function Auxiliary.AddXyzProcedure(c,f,lv,ct,alterf,desc,maxct,op)
e1:SetValue(SUMMON_TYPE_XYZ) e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Xyz Summon(normnal) --Xyz Summon(normal)
function Auxiliary.XyzCondition(f,lv,minc,maxc) function Auxiliary.XyzCondition(f,lv,minc,maxc)
--og: use special material --og: use special material
return function(e,c,og) return function(e,c,og,min,max)
if c==nil then return true end if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE) local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)
local ct=-ft local ct=-ft
if minc<=ct then return false end local minc=minc
return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
return ct<minc and Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
end end
end end
function Auxiliary.XyzTarget(f,lv,minc,maxc) function Auxiliary.XyzTarget(f,lv,minc,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og) return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og then if og and not min then
return true return true
else
local g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end end
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc,og)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end end
end end
function Auxiliary.XyzOperation(f,lv,minc,maxc) function Auxiliary.XyzOperation(f,lv,minc,maxc)
return function(e,tp,eg,ep,ev,re,r,rp,c,og) return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og then if og and not min then
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
while tc do while tc do
...@@ -270,48 +281,59 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc) ...@@ -270,48 +281,59 @@ function Auxiliary.XyzOperation(f,lv,minc,maxc)
end end
--Xyz summon(alterf) --Xyz summon(alterf)
function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op) function Auxiliary.XyzCondition2(f,lv,minc,maxc,alterf,desc,op)
return function(e,c,og) return function(e,c,og,min,max)
if c==nil then return true end if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft local ct=-ft
if minc<=ct then return false end
if ct<1 and not og and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c) if ct<1 and not og and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c)
and (not op or op(e,tp,0)) then and (not op or op(e,tp,0)) then
return true return true
end end
return Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
if minc>maxc then return false end
end
return ct<minc and Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
end end
end end
function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op) function Auxiliary.XyzTarget2(f,lv,minc,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og) return function(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og then if og and not min then
return true
end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft
local minc=minc
local maxc=maxc
if min then
if min>minc then minc=min end
if max<maxc then maxc=max end
end
local b1=ct<minc and Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og)
local b2=ct<1 and not og and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c)
and (not op or op(e,tp,0))
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
e:SetLabel(1)
return true return true
else else
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) e:SetLabel(0)
local ct=-ft local g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc,og)
local b1=Duel.CheckXyzMaterial(c,f,lv,minc,maxc,og) if g then
local b2=ct<1 and Duel.IsExistingMatchingCard(Auxiliary.XyzAlterFilter,tp,LOCATION_MZONE,0,1,nil,alterf,c) g:KeepAlive()
and (not op or op(e,tp,0)) e:SetLabelObject(g)
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
e:SetLabel(1)
return true return true
else else return false end
e:SetLabel(0)
local g=Duel.SelectXyzMaterial(tp,c,f,lv,minc,maxc)
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
end end
end end
end end
function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op) function Auxiliary.XyzOperation2(f,lv,minc,maxc,alterf,desc,op)
return function(e,tp,eg,ep,ev,re,r,rp,c,og) return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og then if og and not min then
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local tc=og:GetFirst() local tc=og:GetFirst()
while tc do while tc do
......
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