Commit 8bc1c094 authored by zengsxing's avatar zengsxing

fix 19-21

修复了因为没有正确理解参数导致的bug
parent 655b0a63
...@@ -70,8 +70,8 @@ function s.LSynCondition(e,c,tuner,mg,min,max) ...@@ -70,8 +70,8 @@ function s.LSynCondition(e,c,tuner,mg,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 minc=2 local minc=1
local maxc=c:GetLevel() local maxc=c:GetLevel()-1
if min then if min then
if min>minc then minc=min end if min>minc then minc=min end
if max<maxc then maxc=max end if max<maxc then maxc=max end
...@@ -93,16 +93,16 @@ function s.LSynCondition(e,c,tuner,mg,min,max) ...@@ -93,16 +93,16 @@ function s.LSynCondition(e,c,tuner,mg,min,max)
local lv=c:GetLevel() local lv=c:GetLevel()
local sg=nil local sg=nil
if tuner then if tuner then
return s.matfilter1(c,tp) and s.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp) return s.matfilter1(c,tp) and s.synfilter(tuner,c,lv,g2,g3,minc+1,maxc+1,tp)
elseif pe then elseif pe then
return s.matfilter1(pe:GetOwner(),tp) and s.synfilter(pe:GetOwner(),c,lv,g2,g3,minc,maxc,tp) return s.matfilter1(pe:GetOwner(),tp) and s.synfilter(pe:GetOwner(),c,lv,g2,g3,minc+1,maxc+1,tp)
else else
return g1:IsExists(s.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp) return g1:IsExists(s.synfilter,1,nil,c,lv,g2,g3,minc+1,maxc+1,tp)
end end
end end
function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
local minc=2 local minc=1
local maxc=c:GetLevel() local maxc=c:GetLevel()-1
if min then if min then
if min>minc then minc=min end if min>minc then minc=min end
if max<maxc then maxc=max end if max<maxc then maxc=max end
...@@ -128,7 +128,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) ...@@ -128,7 +128,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then if not pe then
tuc=g1:FilterSelect(tp,s.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp):GetFirst() tuc=g1:FilterSelect(tp,s.synfilter,1,1,nil,c,lv,g2,g3,minc+1,maxc+1,tp):GetFirst()
else else
tuc=pe:GetOwner() tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil) Group.FromCards(tuc):Select(tp,1,1,nil)
...@@ -137,7 +137,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) ...@@ -137,7 +137,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2 local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
if tuc then Duel.SetSelectedCard(tuc) end if tuc then Duel.SetSelectedCard(tuc) end
Duel.Hint(tp,HINT_SELECTMSG,HINTMSG_SMATERIAL) Duel.Hint(tp,HINT_SELECTMSG,HINTMSG_SMATERIAL)
local g=tsg:SelectSubGroup(tp,s.goal,false,minc,maxc,tp,lv,c,tuc) local g=tsg:SelectSubGroup(tp,s.goal,false,minc+1,maxc+1,tp,lv,c,tuc)
if g then if g then
g:KeepAlive() g:KeepAlive()
e:SetLabelObject(g) e:SetLabelObject(g)
......
...@@ -70,8 +70,8 @@ function s.LSynCondition(e,c,tuner,mg,min,max) ...@@ -70,8 +70,8 @@ function s.LSynCondition(e,c,tuner,mg,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 minc=2 local minc=1
local maxc=c:GetLevel() local maxc=c:GetLevel()-1
if min then if min then
if min>minc then minc=min end if min>minc then minc=min end
if max<maxc then maxc=max end if max<maxc then maxc=max end
...@@ -93,16 +93,16 @@ function s.LSynCondition(e,c,tuner,mg,min,max) ...@@ -93,16 +93,16 @@ function s.LSynCondition(e,c,tuner,mg,min,max)
local lv=c:GetLevel() local lv=c:GetLevel()
local sg=nil local sg=nil
if tuner then if tuner then
return s.matfilter1(c,tp) and s.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp) return s.matfilter1(c,tp) and s.synfilter(tuner,c,lv,g2,g3,minc+1,maxc+1,tp)
elseif pe then elseif pe then
return s.matfilter1(pe:GetOwner(),tp) and s.synfilter(pe:GetOwner(),c,lv,g2,g3,minc,maxc,tp) return s.matfilter1(pe:GetOwner(),tp) and s.synfilter(pe:GetOwner(),c,lv,g2,g3,minc+1,maxc+1,tp)
else else
return g1:IsExists(s.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp) return g1:IsExists(s.synfilter,1,nil,c,lv,g2,g3,minc+1,maxc+1,tp)
end end
end end
function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
local minc=2 local minc=1
local maxc=c:GetLevel() local maxc=c:GetLevel()-1
if min then if min then
if min>minc then minc=min end if min>minc then minc=min end
if max<maxc then maxc=max end if max<maxc then maxc=max end
...@@ -128,7 +128,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) ...@@ -128,7 +128,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then if not pe then
tuc=g1:FilterSelect(tp,s.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp):GetFirst() tuc=g1:FilterSelect(tp,s.synfilter,1,1,nil,c,lv,g2,g3,minc+1,maxc+1,tp):GetFirst()
else else
tuc=pe:GetOwner() tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil) Group.FromCards(tuc):Select(tp,1,1,nil)
...@@ -137,7 +137,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) ...@@ -137,7 +137,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2 local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
if tuc then Duel.SetSelectedCard(tuc) end if tuc then Duel.SetSelectedCard(tuc) end
Duel.Hint(tp,HINT_SELECTMSG,HINTMSG_SMATERIAL) Duel.Hint(tp,HINT_SELECTMSG,HINTMSG_SMATERIAL)
local g=tsg:SelectSubGroup(tp,s.goal,false,minc,maxc,tp,lv,c,tuc) local g=tsg:SelectSubGroup(tp,s.goal,false,minc+1,maxc+1,tp,lv,c,tuc)
if g then if g then
g:KeepAlive() g:KeepAlive()
e:SetLabelObject(g) e:SetLabelObject(g)
......
...@@ -70,8 +70,8 @@ function s.LSynCondition(e,c,tuner,mg,min,max) ...@@ -70,8 +70,8 @@ function s.LSynCondition(e,c,tuner,mg,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 minc=2 local minc=1
local maxc=c:GetLevel() local maxc=c:GetLevel()-1
if min then if min then
if min>minc then minc=min end if min>minc then minc=min end
if max<maxc then maxc=max end if max<maxc then maxc=max end
...@@ -93,16 +93,16 @@ function s.LSynCondition(e,c,tuner,mg,min,max) ...@@ -93,16 +93,16 @@ function s.LSynCondition(e,c,tuner,mg,min,max)
local lv=c:GetLevel() local lv=c:GetLevel()
local sg=nil local sg=nil
if tuner then if tuner then
return s.matfilter1(c,tp) and s.synfilter(tuner,c,lv,g2,g3,minc,maxc,tp) return s.matfilter1(c,tp) and s.synfilter(tuner,c,lv,g2,g3,minc+1,maxc+1,tp)
elseif pe then elseif pe then
return s.matfilter1(pe:GetOwner(),tp) and s.synfilter(pe:GetOwner(),c,lv,g2,g3,minc,maxc,tp) return s.matfilter1(pe:GetOwner(),tp) and s.synfilter(pe:GetOwner(),c,lv,g2,g3,minc+1,maxc+1,tp)
else else
return g1:IsExists(s.synfilter,1,nil,c,lv,g2,g3,minc,maxc,tp) return g1:IsExists(s.synfilter,1,nil,c,lv,g2,g3,minc+1,maxc+1,tp)
end end
end end
function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
local minc=2 local minc=1
local maxc=c:GetLevel() local maxc=c:GetLevel()-1
if min then if min then
if min>minc then minc=min end if min>minc then minc=min end
if max<maxc then maxc=max end if max<maxc then maxc=max end
...@@ -128,7 +128,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) ...@@ -128,7 +128,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
if not pe then if not pe then
tuc=g1:FilterSelect(tp,s.synfilter,1,1,nil,c,lv,g2,g3,minc,maxc,tp):GetFirst() tuc=g1:FilterSelect(tp,s.synfilter,1,1,nil,c,lv,g2,g3,minc+1,maxc+1,tp):GetFirst()
else else
tuc=pe:GetOwner() tuc=pe:GetOwner()
Group.FromCards(tuc):Select(tp,1,1,nil) Group.FromCards(tuc):Select(tp,1,1,nil)
...@@ -137,7 +137,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max) ...@@ -137,7 +137,7 @@ function s.LSynTarget(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg,min,max)
local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2 local tsg=tuc:IsHasEffect(EFFECT_HAND_SYNCHRO) and g3 or g2
if tuc then Duel.SetSelectedCard(tuc) end if tuc then Duel.SetSelectedCard(tuc) end
Duel.Hint(tp,HINT_SELECTMSG,HINTMSG_SMATERIAL) Duel.Hint(tp,HINT_SELECTMSG,HINTMSG_SMATERIAL)
local g=tsg:SelectSubGroup(tp,s.goal,false,minc,maxc,tp,lv,c,tuc) local g=tsg:SelectSubGroup(tp,s.goal,false,minc+1,maxc+1,tp,lv,c,tuc)
if g then if g then
g:KeepAlive() g:KeepAlive()
e:SetLabelObject(g) e:SetLabelObject(g)
......
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