Commit e486cb90 authored by VanillaSalt's avatar VanillaSalt

fix

parent 08e559e5
......@@ -55,8 +55,8 @@ end
function c20366274.ffilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) or c:GetFlagEffect(4904633)~=0
end
function c20366274.exfilter(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
function c20366274.exfilter(c,g)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c)
end
function c20366274.fuscon(e,g,gc,chkf)
if g==nil then return true end
......@@ -64,7 +64,7 @@ function c20366274.fuscon(e,g,gc,chkf)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
local exg=Group.CreateGroup()
if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
local sg=Duel.GetMatchingGroup(c20366274.exfilter,tp,0,LOCATION_MZONE,nil)
local sg=Duel.GetMatchingGroup(c20366274.exfilter,tp,0,LOCATION_MZONE,nil,g)
exg:Merge(sg)
end
if gc then return (c20366274.ffilter1(gc) and (g:IsExists(c20366274.ffilter2,1,gc) or exg:IsExists(c20366274.ffilter2,1,gc)))
......@@ -77,32 +77,32 @@ function c20366274.fuscon(e,g,gc,chkf)
while tc do
if c20366274.ffilter1(tc) then
g1:AddCard(tc)
if Auxiliary.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end
if aux.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end
end
if c20366274.ffilter2(tc) then
g2:AddCard(tc)
if Auxiliary.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end
if aux.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end
end
tc=g:GetNext()
end
local exg1=exg:Filter(c20366274.ffilter1,nil)
local exg2=exg:Filter(c20366274.ffilter2,nil)
if chkf~=PLAYER_NONE then
return (g3:IsExists(Auxiliary.FConditionFilterF2,1,nil,g2)
or g3:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg2)
or g4:IsExists(Auxiliary.FConditionFilterF2,1,nil,g1)
or g4:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg1))
return (g3:IsExists(aux.FConditionFilterF2,1,nil,g2)
or g3:IsExists(aux.FConditionFilterF2,1,nil,exg2)
or g4:IsExists(aux.FConditionFilterF2,1,nil,g1)
or g4:IsExists(aux.FConditionFilterF2,1,nil,exg1))
else
return (g1:IsExists(Auxiliary.FConditionFilterF2,1,nil,g2)
or g1:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg2)
or g2:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg1))
return (g1:IsExists(aux.FConditionFilterF2,1,nil,g2)
or g1:IsExists(aux.FConditionFilterF2,1,nil,exg2)
or g2:IsExists(aux.FConditionFilterF2,1,nil,exg1))
end
end
function c20366274.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
local exg=Group.CreateGroup()
if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
local sg=Duel.GetMatchingGroup(c20366274.exfilter,tp,0,LOCATION_MZONE,nil)
local sg=Duel.GetMatchingGroup(c20366274.exfilter,tp,0,LOCATION_MZONE,nil,eg)
exg:Merge(sg)
end
if gc then
......@@ -128,11 +128,11 @@ function c20366274.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
Duel.SetFusionMaterial(g1)
return
end
local sg=eg:Filter(Auxiliary.FConditionFilterF2c,nil,c20366274.ffilter1,c20366274.ffilter2)
local sg=eg:Filter(aux.FConditionFilterF2c,nil,c20366274.ffilter1,c20366274.ffilter2)
local g1=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
if chkf~=PLAYER_NONE then
g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf)
g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf)
else g1=sg:Select(tp,1,1,nil) end
local tc1=g1:GetFirst()
local sg1=Group.CreateGroup()
......
......@@ -35,7 +35,7 @@ function c4239451.adcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()==6 or e:GetHandler():GetSequence()==7
end
function c4239451.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetDefence()
return c:IsFaceup()
end
function c4239451.adtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4239451.filter(chkc) end
......
......@@ -19,7 +19,7 @@ function c79967395.condition(e,tp,eg,ep,ev,re,r,rp)
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c79967395.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetDefence()
return c:IsFaceup()
end
function c79967395.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c79967395.filter(chkc) end
......
......@@ -16,7 +16,7 @@ function c80566312.repfilter(c,tp)
and c:IsReason(REASON_EFFECT+REASON_BATTLE)
end
function c80566312.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c80566312.repfilter,1,nil,tp) end
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c80566312.repfilter,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(80566312,0))
end
function c80566312.repval(e,c)
......
......@@ -59,8 +59,8 @@ end
function c94977269.ffilter2(c)
return c:IsAttribute(ATTRIBUTE_DARK) or c:GetFlagEffect(4904633)~=0
end
function c94977269.exfilter(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
function c94977269.exfilter(c,g)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not g:IsContains(c)
end
function c94977269.fuscon(e,g,gc,chkf)
if g==nil then return true end
......@@ -68,7 +68,7 @@ function c94977269.fuscon(e,g,gc,chkf)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
local exg=Group.CreateGroup()
if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
local sg=Duel.GetMatchingGroup(c94977269.exfilter,tp,0,LOCATION_MZONE,nil)
local sg=Duel.GetMatchingGroup(c94977269.exfilter,tp,0,LOCATION_MZONE,nil,g)
exg:Merge(sg)
end
if gc then return (c94977269.ffilter1(gc) and (g:IsExists(c94977269.ffilter2,1,gc) or exg:IsExists(c94977269.ffilter2,1,gc)))
......@@ -81,32 +81,32 @@ function c94977269.fuscon(e,g,gc,chkf)
while tc do
if c94977269.ffilter1(tc) then
g1:AddCard(tc)
if Auxiliary.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end
if aux.FConditionCheckF(tc,chkf) then g3:AddCard(tc) end
end
if c94977269.ffilter2(tc) then
g2:AddCard(tc)
if Auxiliary.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end
if aux.FConditionCheckF(tc,chkf) then g4:AddCard(tc) end
end
tc=g:GetNext()
end
local exg1=exg:Filter(c94977269.ffilter1,nil)
local exg2=exg:Filter(c94977269.ffilter2,nil)
if chkf~=PLAYER_NONE then
return (g3:IsExists(Auxiliary.FConditionFilterF2,1,nil,g2)
or g3:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg2)
or g4:IsExists(Auxiliary.FConditionFilterF2,1,nil,g1)
or g4:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg1))
return (g3:IsExists(aux.FConditionFilterF2,1,nil,g2)
or g3:IsExists(aux.FConditionFilterF2,1,nil,exg2)
or g4:IsExists(aux.FConditionFilterF2,1,nil,g1)
or g4:IsExists(aux.FConditionFilterF2,1,nil,exg1))
else
return (g1:IsExists(Auxiliary.FConditionFilterF2,1,nil,g2)
or g1:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg2)
or g2:IsExists(Auxiliary.FConditionFilterF2,1,nil,exg1))
return (g1:IsExists(aux.FConditionFilterF2,1,nil,g2)
or g1:IsExists(aux.FConditionFilterF2,1,nil,exg2)
or g2:IsExists(aux.FConditionFilterF2,1,nil,exg1))
end
end
function c94977269.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
local exg=Group.CreateGroup()
if fc and fc:IsHasEffect(81788994) and fc:IsCanRemoveCounter(tp,0x16,3,REASON_EFFECT) then
local sg=Duel.GetMatchingGroup(c94977269.exfilter,tp,0,LOCATION_MZONE,nil)
local sg=Duel.GetMatchingGroup(c94977269.exfilter,tp,0,LOCATION_MZONE,nil,eg)
exg:Merge(sg)
end
if gc then
......@@ -132,11 +132,11 @@ function c94977269.fusop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
Duel.SetFusionMaterial(g1)
return
end
local sg=eg:Filter(Auxiliary.FConditionFilterF2c,nil,c94977269.ffilter1,c94977269.ffilter2)
local sg=eg:Filter(aux.FConditionFilterF2c,nil,c94977269.ffilter1,c94977269.ffilter2)
local g1=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
if chkf~=PLAYER_NONE then
g1=sg:FilterSelect(tp,Auxiliary.FConditionCheckF,1,1,nil,chkf)
g1=sg:FilterSelect(tp,aux.FConditionCheckF,1,1,nil,chkf)
else g1=sg:Select(tp,1,1,nil) end
local tc1=g1:GetFirst()
local sg1=Group.CreateGroup()
......
......@@ -234,15 +234,15 @@ function Auxiliary.XyzOperation2(f,minc,maxc,alterf,desc,op)
local b1=Duel.CheckXyzMaterial(c,f,minc,maxc,og)
local b2=ct<1 and Duel.IsExistingMatchingCard(alterf,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
if (b1 and b2 and Duel.SelectYesNo(tp,desc)) or ((not b1) and b2) then
if b2 and (not b1 or Duel.SelectYesNo(tp,desc)) then
if op then op(e,tp) end
local mg=Duel.SelectMatchingCard(tp,alterf,tp,LOCATION_MZONE,0,1,1,nil)
local mg2=mg:GetFirst():GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
Duel.Overlay(c,mg)
c:SetMaterial(mg)
if op~=nil then op(e,tp) end
Duel.Overlay(c,mg)
else
local mg=Duel.SelectXyzMaterial(tp,c,f,minc,maxc)
c:SetMaterial(mg)
......
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