Commit 9e4d7537 authored by Tachibana's avatar Tachibana

ybb

parent 46d52a63
......@@ -56,7 +56,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.spfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(tcode)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(tcode)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -45,11 +45,89 @@ function cm.initial_effect(c)
return cm[1](tc,sc)
end
end
--[[
--for utility.lua load first before 2022.2.20
--now not available here
cm[2]=aux.AddSynchroProcedure
aux.AddSynchroProcedure=function(sc,f1,f2,min,max)
local maxc=max or 99
aux.AddSynchroMixProcedure(sc,aux.Tuner(f1),nil,nil,f2,min,maxc)
aux.AddSynchroMixProcedure(sc,f1,nil,nil,f2,min,maxc)
end
--]]
---[[
--fix for utility.lua load first 2022.2.20
--plan1
cm[3]=Duel.CheckTunerMaterial
Duel.CheckTunerMaterial=function(sc,smat,f1,f2,minc,maxc,mg1)
local tp=c:GetControler()
local mg
local mgchk=false
if mg1 then
mg=mg1
mgchk=true
else
mg=Auxiliary.GetSynMaterials(tp,sc)
end
if smat~=nil then mg:AddCard(smat) end
return mg:IsExists(Auxiliary.SynMixFilter1,1,nil,f1,nil,nil,f2,minc,maxc,sc,mg,smat,nil,mgchk)
end
cm[4]=Duel.CheckSynchroMaterial
Duel.CheckSynchroMaterial=function(sc,f1,f2,minc,maxc,smat,mg1)
return Duel.CheckTunerMaterial(sc,smat,f1,f2,minc,maxc,mg1)
end
cm[5]=Duel.SelectTunerMaterial
Duel.SelectTunerMaterial=function(tp,sc,smat,f1,f4,minc,maxc,mg1)
local g=Group.CreateGroup()
local gc=nil
local mg
if mg1 then
mg=mg1
else
mg=Auxiliary.GetSynMaterials(tp,sc)
end
if smat~=nil then mg:AddCard(smat) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local c1=mg:FilterSelect(tp,Auxiliary.SynMixFilter1,1,1,nil,f1,nil,nil,f4,minc,maxc,sc,mg,smat,gc):GetFirst()
g:AddCard(c1)
if f2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local c2=mg:FilterSelect(tp,Auxiliary.SynMixFilter2,1,1,c1,nil,nil,f4,minc,maxc,c,mg,smat,c1,gc):GetFirst()
g:AddCard(c2)
end
local g4=Group.CreateGroup()
for i=0,maxc-1 do
local mg2=mg:Clone()
if f4 then
mg2=mg2:Filter(f4,g,sc)
else
mg2:Sub(g)
end
local cg=mg2:Filter(Auxiliary.SynMixCheckRecursive,g4,tp,g4,mg2,i,minc,maxc,sc,g,smat,gc)
if cg:GetCount()==0 then break end
local minct=1
if Auxiliary.SynMixCheckGoal(tp,g4,minc,i,sc,g,smat,gc) then
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=cg:Select(tp,minct,1,nil)
if tg:GetCount()==0 then break end
g4:Merge(tg)
end
g:Merge(g4)
return g
end
cm[6]=Duel.SelectSynchroMaterial
Duel.SelectSynchroMaterial=function(tp,sc,f1,f2,minc,maxc,smat,mg1)
return Duel.SelectTunerMaterial(tp,sc,smat,f1,f2,minc,maxc,mg1)
end
--]]
--[[
--plan2
local tsg=Duel.GetMatchingGroup(Card.IsType,0,LOCATION_EXTRA,LOCATION_EXTRA,nil,TYPE_SYNCHRO)
for tsc in aux.Next(tsg) do
local esg={esc:IsHasEffect(EFFECT_SPSUMMON_PROC)}
end
--]]
end
end
......@@ -57,6 +135,3 @@ 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