Commit f0b93734 authored by Chen Bill's avatar Chen Bill

update Auxiliary table

in Auxiliary: Auxiliary
in other table: aux
parent 61d505a5
......@@ -21,7 +21,7 @@ function Auxiliary.EnableDualAttribute(c)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCondition(aux.DualNormalCondition)
e2:SetCondition(Auxiliary.DualNormalCondition)
e2:SetValue(TYPE_NORMAL)
c:RegisterEffect(e2)
local e3=e2:Clone()
......@@ -325,7 +325,7 @@ function Auxiliary.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc,mgchk)
local hct=hg:GetCount()
if hct>0 and not mgchk then
local found=false
for c in aux.Next(g) do
for c in Auxiliary.Next(g) do
local he,hf,hmin,hmax=c:GetHandSynchro()
if he then
found=true
......@@ -335,7 +335,7 @@ function Auxiliary.SynMixCheckGoal(tp,sg,minc,ct,syncard,sg1,smat,gc,mgchk)
end
if not found then return false end
end
for c in aux.Next(g) do
for c in Auxiliary.Next(g) do
local le,lf,lloc,lmin,lmax=c:GetTunerLimit()
if le then
local lct=g:GetCount()-1
......@@ -1270,7 +1270,7 @@ function Auxiliary.FShaddollOperation(attr)
mg:Sub(g)
end
if exg and exg:IsExists(Auxiliary.FShaddollSpFilter2,1,nil,c,tp,g:GetFirst(),attr,chkf)
and (mg:GetCount()==0 or (exg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(81788994,0)))) then
and (mg:GetCount()==0 or (exg:GetCount()>0 and Duel.SelectYesNo(tp,Auxiliary.Stringid(81788994,0)))) then
fc:RemoveCounter(tp,0x16,3,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=exg:FilterSelect(tp,Auxiliary.FShaddollSpFilter2,1,1,nil,c,tp,g:GetFirst(),attr,chkf)
......@@ -1643,7 +1643,7 @@ function Auxiliary.PendOperation()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Auxiliary.GCheckAdditional=Auxiliary.PendOperationCheck(ft1,ft2,ft)
local g=tg:SelectSubGroup(tp,aux.TRUE,true,1,math.min(#tg,ft))
local g=tg:SelectSubGroup(tp,Auxiliary.TRUE,true,1,math.min(#tg,ft))
Auxiliary.GCheckAdditional=nil
if not g then return end
if ce then
......@@ -1737,7 +1737,7 @@ function Auxiliary.LCheckOtherMaterial(c,mg,lc,tp)
return res1 or res2
end
function Auxiliary.LUncompatibilityFilter(c,sg,lc,tp)
local mg=sg:Filter(aux.TRUE,c)
local mg=sg:Filter(Auxiliary.TRUE,c)
return not Auxiliary.LCheckOtherMaterial(c,mg,lc,tp)
end
function Auxiliary.LCheckGoal(sg,tp,lc,gf,lmat)
......@@ -1747,10 +1747,10 @@ function Auxiliary.LCheckGoal(sg,tp,lc,gf,lmat)
and (not lmat or sg:IsContains(lmat))
end
function Auxiliary.LExtraMaterialCount(mg,lc,tp)
for tc in aux.Next(mg) do
for tc in Auxiliary.Next(mg) do
local le={tc:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do
local sg=mg:Filter(aux.TRUE,tc)
local sg=mg:Filter(Auxiliary.TRUE,tc)
local f=te:GetValue()
local related,valid=f(te,lc,sg,tc,tp)
if related and valid then
......
......@@ -292,7 +292,7 @@ function Auxiliary.EnableUnionAttribute(c,f)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(aux.UnionReplaceFilter)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
......@@ -532,7 +532,7 @@ function Auxiliary.NegateAnyFilter(c)
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) then
return c:IsFaceup() and not c:IsDisabled()
else
return aux.NegateMonsterFilter(c)
return Auxiliary.NegateMonsterFilter(c)
end
end
--alias for compatibility
......@@ -849,7 +849,7 @@ function Auxiliary.LabrynthDestroyOp(e,tp,res)
local te=Duel.IsPlayerAffectedByEffect(tp,33407125)
if chk and te
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc)
and Duel.SelectYesNo(tp,aux.Stringid(33407125,0)) then
and Duel.SelectYesNo(tp,Auxiliary.Stringid(33407125,0)) then
if res>0 then Duel.BreakEffect() end
Duel.Hint(HINT_CARD,0,33407125)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......@@ -927,7 +927,7 @@ function Auxiliary.GetMultiLinkedZone(tp)
local lg=Duel.GetMatchingGroup(f,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local multi_linked_zone=0
local single_linked_zone=0
for tc in aux.Next(lg) do
for tc in Auxiliary.Next(lg) do
local zone=tc:GetLinkedZone(tp)&0x7f
multi_linked_zone=single_linked_zone&zone|multi_linked_zone
single_linked_zone=single_linked_zone~zone
......@@ -973,7 +973,7 @@ function Group.CheckSubGroup(g,f,min,max,...)
if #sg==max and (not f(sg,...) or Auxiliary.GCheckAdditional and not Auxiliary.GCheckAdditional(sg,nil,g,f,min,max,ext_params)) then return false end
if #sg>=min and #sg<=max and f(sg,...) and (not Auxiliary.GCheckAdditional or Auxiliary.GCheckAdditional(sg,nil,g,f,min,max,ext_params)) then return true end
local eg=g:Clone()
for c in aux.Next(g-sg) do
for c in Auxiliary.Next(g-sg) do
if Auxiliary.CheckGroupRecursive(c,sg,eg,f,min,max,ext_params) then return true end
eg:RemoveCard(c)
end
......@@ -987,7 +987,7 @@ function Group.SelectSubGroup(g,tp,f,cancelable,min,max,...)
local sg=Group.CreateGroup()
local fg=Duel.GrabSelectedCard()
if #fg>max or min>max or #(g+fg)<min then return nil end
for tc in aux.Next(fg) do
for tc in Auxiliary.Next(fg) do
fg:SelectUnselect(sg,tp,false,false,min,max)
end
sg:Merge(fg)
......@@ -995,7 +995,7 @@ function Group.SelectSubGroup(g,tp,f,cancelable,min,max,...)
while #sg<max do
local cg=Group.CreateGroup()
local eg=g:Clone()
for c in aux.Next(g-sg) do
for c in Auxiliary.Next(g-sg) do
if not cg:IsContains(c) then
if Auxiliary.CheckGroupRecursiveCapture(c,sg,eg,f,min,max,ext_params) then
cg:Merge(Auxiliary.SubGroupCaptured)
......@@ -1091,7 +1091,7 @@ function Auxiliary.nbcon(tp,re)
and (not rc:IsRelateToEffect(re) or rc:IsAbleToRemove())
end
function Auxiliary.nbtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
if chk==0 then return Auxiliary.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
......
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