Commit 32a9632a authored by POLYMER's avatar POLYMER

fix

parent bc64d33e
......@@ -11,6 +11,8 @@ function cm.initial_effect(c)
end
if not apricot_nightfall then
apricot_nightfall=true
dofile("expansions/script/special.lua")
Auxiliary.PreloadUds()
--Debug.Message("Protocol Request Complete. 杏花宵®漏洞解决方案已上线。")
end
--[[function aux.GetMustMaterialGroup(tp,code)
......@@ -22,36 +24,6 @@ end
end
return g
end--]]
if not aux.GetMustMaterialGroup then
aux.GetMustMaterialGroup=Duel.GetMustMaterial
end
local release_set={"CheckReleaseGroup","SelectReleaseGroup"}
for i,fname in pairs(release_set) do
local temp_f=Duel[fname]
Duel[fname]=function(...)
local params={...}
local old_minc=params[3]
local typ=type(old_minc)
if #params>2 and typ~="number" then return temp_f(table.unpack(params,2,#params)) end
return temp_f(...)
end
end
local release_set2={"CheckReleaseGroupEx","SelectReleaseGroupEx"}
for i,fname in pairs(release_set) do
local temp_f=Duel[fname]
Duel[fname]=function(...)
local params={...}
local old_minc=params[3]
local typ=type(old_minc)
if #params>2 and typ~="number" then
local tab={table.unpack(params,2,#params)}
table.insert(tab,i+3,REASON_COST)
table.insert(tab,i+4,true)
return temp_f(table.unpack(tab))
end
return temp_f(...)
end
end
local _IsTuner=Card.IsTuner
function Card.IsTuner(c,...)
local ext_params={...}
......
......@@ -42,12 +42,12 @@ function cm.con(e,c)
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.IsExistingMatchingCard(cm.resfilter,tp,LOCATION_SZONE,0,1,nil)
end
function cm.resfilter(c)
return c:GetOriginalType()&TYPE_MONSTER ~=0 and c:IsReleasable() and c:IsType(TYPE_TRAP)
return c:GetOriginalType()&TYPE_MONSTER~=0 and c:IsReleasable(REASON_SPSUMMON) and c:IsType(TYPE_TRAP)
end
function cm.op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.resfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.Release(g,REASON_SPSUMMON)
end
function cm.cfilter(c,e,tp)
return c:IsReleasable() and Duel.GetMZoneCount(tp,c,tp)>0
......@@ -75,7 +75,7 @@ function cm.spop(e,tp)
Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)>0 then
Duel.ConfirmCards(1-tp,sg)
end
......
......@@ -77,7 +77,7 @@ function c49811176.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT)
end
function c49811176.costfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and (c:IsSetCard(0xaa) or c:IsSetCard(0xc4))
return c:IsType(TYPE_PENDULUM) and c:IsControler(tp) and c:IsReleasable() and (c:IsSetCard(0xaa) or c:IsSetCard(0xc4))
end
function c49811176.ngcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811176.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
......
......@@ -35,8 +35,8 @@ function c53700005.spfilter(c,tp)
return c:IsCode(53700001)
end
function c53700005.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c53700005.spfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c53700005.spfilter,1,10,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,c53700005.spfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c53700005.spfilter,1,10,nil)
local lv=g:GetSum(Card.GetLevel)
Duel.Release(g,REASON_COST)
e:SetLabel(lv)
......
......@@ -57,8 +57,8 @@ function c53700006.cfilter(c,ft,tp)
end
function c53700006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,c53700006.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c53700006.cfilter,1,1,nil,ft,tp)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c53700006.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(tp,c53700006.cfilter,1,1,nil,ft,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST)
end
......
......@@ -43,7 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local ct1=Duel.GetMatchingGroupCount(cm.filter1,tp,LOCATION_MZONE,0,tc)
local rg=Duel.SelectReleaseGroup(REASON_EFFECT,tp,Card.IsReleasableByEffect,1,ct1,tc)
local rg=Duel.SelectReleaseGroup(tp,Card.IsReleasableByEffect,1,ct1,tc)
local lv=rg:GetSum(Card.GetLevel)
local ct2=Duel.Release(rg,REASON_EFFECT)
if ct2==0 or lv==0 then return end
......
......@@ -55,8 +55,8 @@ function c53701001.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
function c53701001.immcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,e:GetHandler(),0x3530) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,1,e:GetHandler(),0x3530)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,e:GetHandler(),0x3530) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,e:GetHandler(),0x3530)
Duel.Release(g,REASON_COST)
end
function c53701001.immop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -52,11 +52,11 @@ function c53701007.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(REASON_SPSUMMON,tp,c53701007.hspfilter,1,nil,ft,tp)
return ft>-1 and Duel.CheckReleaseGroup(tp,c53701007.hspfilter,1,nil,ft,tp)
end
function c53701007.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,c53701007.hspfilter,1,1,nil,ft,tp):GetFirst()
local tc=Duel.SelectReleaseGroup(tp,c53701007.hspfilter,1,1,nil,ft,tp):GetFirst()
Duel.Release(tc,REASON_SPSUMMON)
e:GetLabelObject():SetLabelObject(tc)
end
......
......@@ -40,9 +40,9 @@ function cm.con(e,tp,eg,ep,ev,re,r,rp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,c,0x3530) end
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,c,0x3530) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,1,c,0x3530)
local rg=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,c,0x3530)
rg:AddCard(c)
Duel.Release(rg,REASON_COST)
end
......
......@@ -29,8 +29,8 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(Card.IsCode,tp,0,LOCATION_GRAVE,1,nil,re:GetHandler():GetCode())
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,nil,RACE_MACHINE) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,nil,RACE_MACHINE)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_MACHINE) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_MACHINE)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -2661,22 +2661,24 @@ function cm.CyberNCode2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(53702500,15))
end
function cm.AllEffectReset(c)
if Duel.GetFlagEffect(0,53702700)>0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(0xff)
e1:SetOperation(cm.AllEffectRstop)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL+53702700)
--e1:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL+53702700)
c:RegisterEffect(e1)
Duel.RegisterFlagEffect(0,53702700,0,0,0)
end
function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,53702700)>0 then return end
--if Duel.GetFlagEffect(0,53702700)>0 then return end
--Duel.RegisterFlagEffect(0,53702700,0,0,0)
local g=Duel.GetMatchingGroup(function(c)return c:GetFlagEffect(53702700)==0 end,0,0xff,0xff,nil)
if #g==0 then return end
--Debug.Message(99)
Duel.RegisterFlagEffect(0,53702700,0,0,0)
local g=Duel.GetMatchingGroup(nil,0,0xff,0xff,nil)
local reg=Card.RegisterEffect
local rstg=Duel.GetMatchingGroup(function(c)return c.Snnm_Ef_Rst end,0,0xff,0xff,nil)
local rstg=Duel.GetMatchingGroup(function(c)return c.Snnm_Ef_Rst and c:GetFlagEffect(53702700)==0 end,0,0xff,0xff,nil)
local rstt={}
for rstc in aux.Next(rstg) do if not cm.IsInTable(rstc:GetOriginalCode(),rstt) then table.insert(rstt,rstc:GetOriginalCode()) end end
if cm.IsInTable(53759012,rstt) then
......@@ -2694,7 +2696,7 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
return c53759012[1](se,le)
end
end
local helltaker=Duel.GetMatchingGroup(function(c)return c.AD_Ht end,0,0xff,0xff,nil)
local helltaker=Duel.GetMatchingGroup(function(c)return c.AD_Ht and c:GetFlagEffect(53702700)==0 end,0,0xff,0xff,nil)
if #helltaker>0 then
AD_Helltaker=Effect.SetLabelObject
Effect.SetLabelObject=function(se,le)
......@@ -2842,6 +2844,7 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
if cm.IsInTable(53759012,rstt) then Effect.SetLabelObject=c53759012[1] end
if #helltaker>0 then Effect.SetLabelObject=AD_Helltaker end
Duel.ResetFlagEffect(0,53764007)
g:ForEach(Card.RegisterFlagEffect,53702700,0,0,0)
e:Reset()
end
function cm.reni(c,sdes,scat,styp,spro,scod,sran,sct,sht,scon,scos,stg,sop)
......@@ -5292,7 +5295,7 @@ function cm.MultipleGroupCheck(c)
return b
end
ADIMI_SelectReleaseGroup=Duel.SelectReleaseGroup
Duel.SelectReleaseGroup=function(r,p,f,min,max,ex,...)
Duel.SelectReleaseGroup=function(p,f,min,max,ex,...)
local lab=Duel.GetFlagEffectLabel(0,53759000)
Duel.SetFlagEffectLabel(0,53759000,lab+1)
local ly=0
......@@ -5306,7 +5309,7 @@ function cm.MultipleGroupCheck(c)
cm["Card_Prophecy_L_Check_"..ly]=true
ADIMI_GetMatchingGroup(f,p,LOCATION_MZONE,LOCATION_MZONE,ex,...)
cm["Card_Prophecy_L_Check_"..ly]=false
local b=ADIMI_SelectReleaseGroup(r,p,f,min,max,ex,...)
local b=ADIMI_SelectReleaseGroup(p,f,min,max,ex,...)
cm["Card_Prophecy_Certain_SP_"..ly]=false
cm["Card_Prophecy_Certain_ACST_"..ly]=false
cm["Card_Prophecy_Layer_"..ly]=false
......@@ -5314,7 +5317,7 @@ function cm.MultipleGroupCheck(c)
return b
end
ADIMI_SelectReleaseGroupEx=Duel.SelectReleaseGroupEx
Duel.SelectReleaseGroupEx=function(r,p,f,min,max,ex,...)
Duel.SelectReleaseGroupEx=function(p,f,min,max,r,bool,ex,...)
local lab=Duel.GetFlagEffectLabel(0,53759000)
Duel.SetFlagEffectLabel(0,53759000,lab+1)
local ly=0
......@@ -5326,9 +5329,9 @@ function cm.MultipleGroupCheck(c)
end
cm["Card_Prophecy_Layer_"..ly]=true
cm["Card_Prophecy_L_Check_"..ly]=true
ADIMI_GetMatchingGroup(f,p,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE+LOCATION_HAND,ex,...)
if bool then ADIMI_GetMatchingGroup(f,p,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE+LOCATION_HAND,ex,...) else ADIMI_GetMatchingGroup(f,p,LOCATION_MZONE,LOCATION_MZONE,ex,...) end
cm["Card_Prophecy_L_Check_"..ly]=false
local b=ADIMI_SelectReleaseGroupEx(r,p,f,min,max,ex,...)
local b=ADIMI_SelectReleaseGroupEx(p,f,min,max,r,bool,ex,...)
cm["Card_Prophecy_Certain_SP_"..ly]=false
cm["Card_Prophecy_Certain_ACST_"..ly]=false
cm["Card_Prophecy_Layer_"..ly]=false
......
......@@ -31,10 +31,10 @@ function cm.hspcon(e,c)
if c==nil then return true end
if c:IsLocation(LOCATION_DECK) and c:IsFacedown() then return end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(REASON_SPSUMMON,tp,cm.hspfilter,1,nil,tp)
return Duel.CheckReleaseGroup(tp,cm.hspfilter,1,nil,tp)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,cm.hspfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,tp)
Duel.Release(g,REASON_SPSUMMON)
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -54,8 +54,8 @@ function cm.costfilter(c)
return c:IsType(TYPE_XYZ) and c:IsRace(RACE_SPELLCASTER)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -64,8 +64,8 @@ function cm.costfilter(c,tp)
and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.filter(c,e,tp)
......
......@@ -34,9 +34,9 @@ function cm.hkcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.hkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(REASON_COST,tp,nil,1,c) end
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(tp,nil,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,nil,1,1,c)
local rg=Duel.SelectReleaseGroup(tp,nil,1,1,c)
rg:AddCard(c)
Duel.Release(rg,REASON_COST)
end
......
......@@ -70,10 +70,10 @@ function cm.spcon(e,c)
local tp=c:GetControler()
local att1=c:GetFlagEffectLabel(m)
local att2=c:GetFlagEffectLabel(m+50)
return Duel.CheckReleaseGroup(REASON_SPSUMMON,tp,cm.rfilter,1,nil,tp,c) and ((c:IsControler(c:GetOwner()) and att1 and att1&0x1f==0x1f) or (c:IsControler(1-c:GetOwner()) and att2 and att2&0x1f==0x1f))
return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp,c) and ((c:IsControler(c:GetOwner()) and att1 and att1&0x1f==0x1f) or (c:IsControler(1-c:GetOwner()) and att2 and att2&0x1f==0x1f))
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,cm.rfilter,1,1,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp,c)
Duel.Release(g,REASON_SPSUMMON)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -45,8 +45,8 @@ function cm.cfilter(c,tp)
return c:IsLinkState() and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -98,10 +98,10 @@ end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(REASON_SPSUMMON,tp,cm.rfilter,1,nil,tp,c) and Duel.GetTurnCount()>9
return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp,c) and Duel.GetTurnCount()>9
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,cm.rfilter,1,1,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp,c)
Duel.Release(g,REASON_SPSUMMON)
end
function cm.imfilter(c)
......
......@@ -24,9 +24,9 @@ end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local res=c:IsLocation(LOCATION_MZONE)
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,c,res) end
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroup(tp,cm.cfilter,1,c,res) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,c,res)
local rg=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,c,res)
rg:AddCard(c)
Duel.Release(rg,REASON_COST)
end
......
......@@ -132,8 +132,8 @@ function cm.costfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and c:IsAttribute(ATTRIBUTE_DARK) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -37,8 +37,8 @@ function cm.initial_effect(c)
end
function cm.actcost(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsStatus(STATUS_SET_TURN) then return true end
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsSetCard,2,nil,0x5532) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsSetCard,2,2,nil,0x5532)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,2,nil,0x5532) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,2,2,nil,0x5532)
Duel.Release(g,REASON_COST)
end
function cm.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -21,8 +21,8 @@ function cm.initial_effect(c)
e3:SetOperation(cm.srop)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsSummonType,1,nil,SUMMON_TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsSummonType,1,1,nil,SUMMON_TYPE_NORMAL)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSummonType,1,nil,SUMMON_TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSummonType,1,1,nil,SUMMON_TYPE_NORMAL)
Duel.Release(g,REASON_COST)
end
function cm.spfilter(c,e,tp)
......
......@@ -45,9 +45,9 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return (Duel.IsPlayerCanDraw(tp,1) or Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)) and Duel.CheckReleaseGroup(REASON_COST,tp,cm.filter,1,nil,tp)
return (Duel.IsPlayerCanDraw(tp,1) or Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)) and Duel.CheckReleaseGroup(tp,cm.filter,1,nil,tp)
end
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.filter,1,1,nil,tp)
local rg=Duel.SelectReleaseGroup(tp,cm.filter,1,1,nil,tp)
e:SetLabel(SNNM.multi_summon_count(rg))
Duel.Release(rg,REASON_COST)
end
......
......@@ -45,7 +45,7 @@ function cm.immval(e,te)
if not c:IsLocation(LOCATION_FZONE) then return false end
local tp=c:GetControler()
local eset={c:IsHasEffect(m+50)}
local res=te:GetOwner()~=e:GetOwner() and Duel.CheckReleaseGroup(REASON_EFFECT,tp,nil,1,nil)
local res=te:GetOwner()~=e:GetOwner() and Duel.CheckReleaseGroup(tp,nil,1,nil)
local ctns=false
if not te:IsHasType(EFFECT_TYPE_ACTIONS) then
for _,se in pairs(eset) do
......@@ -70,7 +70,7 @@ function cm.immval(e,te)
end
function cm.imcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local g=Duel.SelectReleaseGroup(REASON_EFFECT,tp,nil,1,1,nil)
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_EFFECT)
e:Reset()
end
......
......@@ -46,8 +46,8 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return (b1 or b2) and Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp,b1) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp,b1)
if chk==0 then return (b1 or b2) and Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp,b1) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp,b1)
Duel.Release(g,REASON_COST)
local b3=b2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local off=1
......
......@@ -66,12 +66,12 @@ function cm.spfilter(c,e,tp)
return c:IsCode(m+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.SelectReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,1,nil,tp)
local rg=Duel.SelectReleaseGroup(tp,cm.relfilter,1,1,nil,tp)
if rg:GetCount()==0 then return end
if Duel.Release(rg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -63,12 +63,12 @@ function cm.spfilter(c,e,tp)
return c:IsCode(m+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.SelectReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,1,nil,tp)
local rg=Duel.SelectReleaseGroup(tp,cm.relfilter,1,1,nil,tp)
if rg:GetCount()==0 then return end
if Duel.Release(rg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -73,12 +73,12 @@ function cm.spfilter(c,e,tp)
return c:IsCode(m+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.SelectReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,1,nil,tp)
local rg=Duel.SelectReleaseGroup(tp,cm.relfilter,1,1,nil,tp)
if rg:GetCount()==0 then return end
if Duel.Release(rg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -94,12 +94,12 @@ function cm.spfilter(c,e,tp)
return c:IsCode(m+8) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.relfilter,1,nil,tp) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.SelectReleaseGroup(REASON_EFFECT,tp,cm.relfilter,1,1,nil,tp)
local rg=Duel.SelectReleaseGroup(tp,cm.relfilter,1,1,nil,tp)
if rg:GetCount()==0 then return end
if Duel.Release(rg,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -89,8 +89,8 @@ function cm.descon(e)
return not (c:GetColumnGroup():IsContains(tc) and tc:IsRelateToCard(c)) or tc:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_NORMAL)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_NORMAL)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -86,8 +86,8 @@ function cm.descon(e)
return not (c:GetColumnGroup():IsContains(tc) and tc:IsRelateToCard(c)) or tc:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_NORMAL)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_NORMAL)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -78,8 +78,8 @@ function cm.descon(e)
return not (c:GetColumnGroup():IsContains(tc) and tc:IsRelateToCard(c)) or tc:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_NORMAL)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_NORMAL)
Duel.Release(g,REASON_COST)
end
function cm.cfilter(c)
......
......@@ -89,8 +89,8 @@ function cm.descon(e)
return not (c:GetColumnGroup():IsContains(tc) and tc:IsRelateToCard(c)) or tc:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_NORMAL)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_NORMAL)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -67,8 +67,8 @@ function cm.descon(e)
return not (c:GetColumnGroup():IsContains(tc) and tc:IsRelateToCard(c)) or tc:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_NORMAL)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_NORMAL)
Duel.Release(g,REASON_COST)
end
function cm.thfilter(c)
......
......@@ -65,8 +65,8 @@ function cm.descon(e)
return not (c:GetColumnGroup():IsContains(tc) and tc:IsRelateToCard(c)) or tc:IsFacedown()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_NORMAL)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_NORMAL) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_NORMAL)
Duel.Release(g,REASON_COST)
end
function cm.cfilter(c)
......
......@@ -78,7 +78,7 @@ function s.initial_effect(c)
else return _SelectUnselect(cg,sg,sp,finish,cancel,...) end
end
local originalDuelFunctions={}
local DuelFunctionsName={"SelectMatchingCard","SelectTarget","SelectTribute","SelectFusionMaterial","SelectSynchroMaterial","SelectTunerMaterial","SelectXyzMaterial"}
local DuelFunctionsName={"SelectMatchingCard","SelectTarget","SelectTribute","SelectFusionMaterial","SelectSynchroMaterial","SelectTunerMaterial","SelectXyzMaterial","SelectReleaseGroup","SelectReleaseGroupEx"}
for _,funcName in ipairs(DuelFunctionsName) do
originalDuelFunctions[funcName]=Duel[funcName]
Duel[funcName]=function(sp,...)
......@@ -90,19 +90,6 @@ function s.initial_effect(c)
else return originalDuelFunctions[funcName](sp,...) end
end
end
local originalDuelFunctions2={}
local DuelFunctionsName2={"SelectReleaseGroup","SelectReleaseGroupEx"}
for _,funcName in ipairs(DuelFunctionsName2) do
originalDuelFunctions2[funcName]=Duel[funcName]
Duel[funcName]=function(r,sp,...)
if Duel.IsPlayerAffectedByEffect(sp,id) and s.chain_solving then
local g=originalDuelFunctions2[funcName](r,sp,...)
local tg=Group.__add(g,g)
if tg:IsExists(f,1,nil) then table.insert(s.trigger,sp) end
return g
else return originalDuelFunctions2[funcName](r,sp,...) end
end
end
local originalGroupFunctions={}
local GroupFunctionsName={"FilterSelect","Select","RandomSelect","SelectWithSumEqual","SelectWithSumGreater",""}
for _,funcName in ipairs(GroupFunctionsName) do
......
......@@ -32,8 +32,8 @@ function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsSummonType(SUMMON_TYPE_RITUAL) and c:GetFlagEffect(m)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.filter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.filter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.filter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.filter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -41,10 +41,10 @@ function cm.hspfilter(c,tp,sc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_SPSUMMON,c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,cm.hspfilter,1,1,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_SPSUMMON)
end
......
......@@ -42,11 +42,11 @@ end
function cm.spccon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(REASON_SPSUMMON,tp,cm.cfilter,1,nil,tp)
return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp)
end
function cm.spcop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_SPSUMMON,tp,cm.cfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_SPSUMMON)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -45,8 +45,8 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,c,RACE_ZOMBIE) end
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,c,RACE_ZOMBIE)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,c,RACE_ZOMBIE) end
local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,c,RACE_ZOMBIE)
Duel.Release(rg,REASON_COST)
end
function cm.tgfilter(c)
......
......@@ -46,8 +46,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,c,RACE_ZOMBIE) end
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,c,RACE_ZOMBIE)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,c,RACE_ZOMBIE) end
local rg=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,c,RACE_ZOMBIE)
Duel.Release(rg,REASON_COST)
end
function cm.srfilter(c)
......
......@@ -44,8 +44,8 @@ function cm.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,e:GetHandler())
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
end
function cm.rmfilter(c)
......
......@@ -75,9 +75,9 @@ function cm.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,e:GetHandler()) end
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.CheckReleaseGroup(tp,cm.cfilter,1,e:GetHandler()) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,e:GetHandler())
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -13,17 +13,24 @@ function Auxiliary.PreloadUds()
return require_list[str]
end
local release_set={"CheckReleaseGroup","SelectReleaseGroup"}
local release_set2={"CheckReleaseGroupEx","SelectReleaseGroupEx"}
for i,fname in pairs(release_set) do
local temp_f=Duel[fname]
Duel[fname]=function(...)
local params={...}
local old_minc=params[3]
local typ=type(old_minc)
if #params>2 and typ~="number" then return temp_f(table.unpack(params,2,#params)) end
if #params>2 and typ~="number" then
if params[1]==REASON_COST then
return temp_f(table.unpack(params,2,#params))
else
local fname2=release_set2[i]
return Duel[fname2](table.unpack(params,2,i+3),params[1],false,table.unpack(params,i+4,#params))
end
end
return temp_f(...)
end
end
local release_set2={"CheckReleaseGroupEx","SelectReleaseGroupEx"}
for i,fname in pairs(release_set) do
local temp_f=Duel[fname]
Duel[fname]=function(...)
......@@ -35,6 +42,11 @@ function Auxiliary.PreloadUds()
table.insert(tab,i+3,REASON_COST)
table.insert(tab,i+4,true)
return temp_f(table.unpack(tab))
elseif #params>=i+3 and type(params[i+3])~="bool" then
local tab=params
table.insert(tab,i+3,REASON_COST)
table.insert(tab,i+4,true)
return temp_f(table.unpack(tab))
end
return temp_f(...)
end
......
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