Commit 68bc29f7 authored by VanillaSalt's avatar VanillaSalt

update

parent 85f61366
...@@ -22,9 +22,9 @@ function c15155568.initial_effect(c) ...@@ -22,9 +22,9 @@ function c15155568.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c15155568.cfilter(c) function c15155568.cfilter(c)
if c:IsFacedown() or not c.material_count then return false end if c:IsFacedown() or not c.material then return false end
for i=1,c.material_count do for i,mcode in ipairs(c.material) do
if c.material[i]==78193831 then return true end if mcode==78193831 then return true end
end end
return false return false
end end
......
...@@ -11,14 +11,11 @@ function c17194258.initial_effect(c) ...@@ -11,14 +11,11 @@ function c17194258.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c17194258.filter1(c,tp) function c17194258.filter1(c,tp)
return c.material_count and Duel.IsExistingMatchingCard(c17194258.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c) return c.material and Duel.IsExistingMatchingCard(c17194258.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c)
end end
function c17194258.filter2(c,fc) function c17194258.filter2(c,fc)
if c:IsForbidden() or not c:IsAbleToHand() or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end if c:IsForbidden() or not c:IsAbleToHand() or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
for i=1,fc.material_count do return c:IsCode(table.unpack(fc.material))
if c:IsCode(fc.material[i]) then return true end
end
return false
end end
function c17194258.target(e,tp,eg,ep,ev,re,r,rp,chk) function c17194258.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c17194258.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c17194258.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
......
...@@ -28,9 +28,9 @@ function c1784686.tgfilter(c,e,tp) ...@@ -28,9 +28,9 @@ function c1784686.tgfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c1784686.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c1784686.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
end end
function c1784686.spfilter(c,e,tp,code) function c1784686.spfilter(c,e,tp,code)
if not c.material_count or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) then return false end if not c.material or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) then return false end
for i=1,c.material_count do for i,mcode in ipairs(c.material) do
if code==c.material[i] then return true end if code==mcode then return true end
end end
return false return false
end end
......
...@@ -18,9 +18,9 @@ function c1801154.initial_effect(c) ...@@ -18,9 +18,9 @@ function c1801154.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c1801154.filter2(c,code) function c1801154.filter2(c,code)
if not c.material_count or not c:IsReason(REASON_DESTROY) or not c:IsReason(REASON_EFFECT) then return false end if not c.material or not c:IsReason(REASON_DESTROY) or not c:IsReason(REASON_EFFECT) then return false end
for i=1,c.material_count do for i,mcode in ipairs(c.material) do
if code==c.material[i] then return true end if code==mcode then return true end
end end
return false return false
end end
......
...@@ -33,9 +33,9 @@ function c41940225.filter2(c,e,tp,m,f,chkf) ...@@ -33,9 +33,9 @@ function c41940225.filter2(c,e,tp,m,f,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c41940225.spfilter(c) function c41940225.spfilter(c)
if not c.material_count then return false end if not c.material then return false end
for i=1,c.material_count do for i,mcode in ipairs(c.material) do
if c.material[i]==78193831 then return true end if mcode==78193831 then return true end
end end
return false return false
end end
......
...@@ -17,16 +17,11 @@ function c49469105.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,16 +17,11 @@ function c49469105.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49469105.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c49469105.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c49469105.cfilter,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,c49469105.cfilter,1,1,REASON_COST+REASON_DISCARD)
end end
function c49469105.filter2(c,fc)
local fd=c:GetCode()
for i=1,fc.material_count do
if fd==fc.material[i] then return true end
end
return false
end
function c49469105.filter1(c,g) function c49469105.filter1(c,g)
local ct=c.material_count return c.material and g:IsExists(c49469105.filter2,1,nil,c)
return ct~=nil and g:IsExists(c49469105.filter2,1,nil,c) end
function c49469105.filter2(c,fc)
return c:IsCode(table.unpack(fc.material))
end end
function c49469105.spfilter(c,e,tp) function c49469105.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -11,14 +11,11 @@ function c66127916.initial_effect(c) ...@@ -11,14 +11,11 @@ function c66127916.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c66127916.filter1(c,tp) function c66127916.filter1(c,tp)
return c.material_count and Duel.IsExistingMatchingCard(c66127916.filter2,tp,LOCATION_DECK,0,1,nil,c) return c.material and Duel.IsExistingMatchingCard(c66127916.filter2,tp,LOCATION_DECK,0,1,nil,c)
end end
function c66127916.filter2(c,fc) function c66127916.filter2(c,fc)
if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToHand() then return false end if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToHand() then return false end
for i=1,fc.material_count do return c:IsCode(table.unpack(fc.material))
if c:IsCode(fc.material[i]) then return true end
end
return false
end end
function c66127916.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66127916.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66127916.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c66127916.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
......
...@@ -21,10 +21,7 @@ function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -21,10 +21,7 @@ function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c69270537.spfilter(c,e,tp,fc) function c69270537.spfilter(c,e,tp,fc)
for i=1,fc.material_count do return c:IsCode(table.unpack(fc.material)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if c:GetCode()==fc.material[i] then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
end
return false
end end
function c69270537.activate(e,tp,eg,ep,ev,re,r,rp) function c69270537.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -11,16 +11,11 @@ function c89312388.initial_effect(c) ...@@ -11,16 +11,11 @@ function c89312388.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c89312388.filter2(c,fc) function c89312388.filter2(c,fc)
local fd=c:GetCode()
if not c:IsAbleToGraveAsCost() then return false end if not c:IsAbleToGraveAsCost() then return false end
for i=1,fc.material_count do return c:IsCode(table.unpack(fc.material))
if fd==fc.material[i] then return true end
end
return false
end end
function c89312388.filter1(c,tp) function c89312388.filter1(c,tp)
local ct=c.material_count return c.material and Duel.IsExistingMatchingCard(c89312388.filter2,tp,LOCATION_DECK,0,1,nil,c)
return ct~=nil and Duel.IsExistingMatchingCard(c89312388.filter2,tp,LOCATION_DECK,0,1,nil,c)
end end
function c89312388.coscost(e,tp,eg,ep,ev,re,r,rp,chk) function c89312388.coscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89312388.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c89312388.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
......
...@@ -1382,9 +1382,9 @@ function Auxiliary.PendOperation() ...@@ -1382,9 +1382,9 @@ function Auxiliary.PendOperation()
end end
end end
function Auxiliary.IsMaterialListCode(c,code) function Auxiliary.IsMaterialListCode(c,code)
if not c.material_count then return false end if not c.material then return false end
for i=1,c.material_count do for i,mcode in ipairs(c.material) do
if code==c.material[i] then return true end if code==mcode then return true end
end end
return false return false
end 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