Commit 1719863c authored by Grajade's avatar Grajade

Update c74563024.lua

parent 03f87f58
...@@ -77,64 +77,44 @@ function c74563024.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,64 +77,44 @@ function c74563024.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c74563024.exfilter1(c,fc) --
return c74563024.allfilter1(c,fc) and c:IsCode(74563024) and c:IsAbleToRemove() function c74563024.ExFusFilter(c,fc)
return c74563024.AllFusFilter(c,fc) and c:IsCode(74563024) and c:IsAbleToRemove()
end end
function c74563024.allfilter1(c,fc) function c74563024.AllFusFilter(c,fc)
return c:IsCanBeFusionMaterial(fc) and c:IsFusionType(TYPE_MONSTER) return c:IsCanBeFusionMaterial(fc) and c:IsFusionType(TYPE_MONSTER) and (c74563024.CheckFusFilter1(c) or c74563024.CheckFusFilter2(c))
and (c:IsFusionSetCard(0x258) or c:IsFusionAttribute(ATTRIBUTE_DIVINE))
end end
-- function c74563024.CheckFusFilter1(c)
function c74563024.CheckFusionFilter1(c,sg,tc) return c:IsFusionSetCard(0x258)
local check1=0
local check2=0
return (check1==0 and (tc:IsFusionSetCard(0x258) or tc:IsFusionAttribute(ATTRIBUTE_DIVINE)))
or (check2==0 and (tc:IsFusionSetCard(0x258) or tc:IsFusionAttribute(ATTRIBUTE_DIVINE)))
end end
function c74563024.CheckRecursive1(c,mg,sg,exg,tp,fc,chkf) function c74563024.CheckFusFilter2(c)
--if exg and exg:IsContains(c) then return false end return c:IsFusionAttribute(ATTRIBUTE_DIVINE)
if sg:GetCount()>0 and not sg:IsExists(c74563024.CheckFusionFilter1,1,nil,sg,c) then return false end end
sg:AddCard(c) function c74563024.CheckGroupFilter(sg,lc)
if Duel.GetLocationCountFromEx(tp,tp,sg,c)<0 then return false end return (not lc) or (lc and sg:IsContains(lc))
local res=false
if sg:GetCount()==2 then
res=(chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(chkf,tp,sg,fc)>0)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) then res=false end
else
res=mg:IsExists(c74563024.CheckRecursive1,1,sg,mg,sg,exg,tp,fc,PLAYER_NONE)
end
sg:RemoveCard(c)
return res
end end
--
function c74563024.con1(e,g,gc,chkfnf) function c74563024.con1(e,g,gc,chkfnf)
if g==nil then return true end if g==nil then return true end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
local chkf=(chkfnf & 0xff) local chkf=(chkfnf & 0xff)
local c=e:GetHandler() local c=e:GetHandler()
local tp=c:GetControler() local tp=c:GetControler()
local mg=g:Filter(c74563024.allfilter1,nil,c) local mg=g:Filter(c74563024.AllFusFilter,nil,c)
local exg=Duel.GetMatchingGroup(c74563024.exfilter1,tp,LOCATION_GRAVE,0,mg,c) local exg=Duel.GetMatchingGroup(c74563024.ExFusFilter,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg) mg:Merge(exg)
if gc then return c74563024.allfilter1(gc,c) return mg:CheckSubGroup(c74563024.CheckGroupFilter,2,#mg,gc)
and c74563024.CheckRecursive1(gc,mg,sg,exg,tp,c,chkf) end
return mg:IsExists(c74563024.CheckRecursive1,1,sg,mg,sg,exg,tp,c,chkf)
end end
--
function c74563024.op1(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf) function c74563024.op1(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler() local c=e:GetHandler()
local chkf=(chkfnf & 0xff) local chkf=(chkfnf & 0xff)
local mg=eg:Filter(c74563024.allfilter1,nil,c) local mg=eg:Filter(c74563024.AllFusFilter,nil,c)
local exg=Duel.GetMatchingGroup(c74563024.exfilter1,tp,LOCATION_GRAVE,0,mg,c) local exg=Duel.GetMatchingGroup(c74563024.ExFusFilter,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg) mg:Merge(exg)
if gc then sg:AddCard(gc) end
local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c74563024.CheckRecursive1,2,#mg,sg,mg,sg,exg,tp,c,chkf) local sg=mg:SelectSubGroup(tp,c74563024.CheckGroupFilter,false,2,#mg,gc)
sg:Merge(g)
Duel.SetFusionMaterial(sg) Duel.SetFusionMaterial(sg)
end end
--
c74563024.OriginalSetMaterial=Card.SetMaterial c74563024.OriginalSetMaterial=Card.SetMaterial
function c74563024.SetMaterial(c,g) function c74563024.SetMaterial(c,g)
c74563024.OriginalSetMaterial(c,g) c74563024.OriginalSetMaterial(c,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