Commit 0923b804 authored by VanillaSalt's avatar VanillaSalt

fix

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