Commit 68bc29f7 authored by VanillaSalt's avatar VanillaSalt

update

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