Commit cb8266e6 authored by nekrozar's avatar nekrozar

use aux.IsMaterialListCode

parent 627fee1b
...@@ -11,11 +11,10 @@ function c17194258.initial_effect(c) ...@@ -11,11 +11,10 @@ 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 and Duel.IsExistingMatchingCard(c17194258.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c) return 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() then return false end return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsAbleToHand()
return c:IsCode(table.unpack(fc.material))
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
......
...@@ -22,7 +22,7 @@ function c2390019.initial_effect(c) ...@@ -22,7 +22,7 @@ function c2390019.initial_effect(c)
end end
function c2390019.ffilter(c,e,tp) function c2390019.ffilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c.material and Duel.IsExistingMatchingCard(c2390019.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,c,e,tp) and Duel.IsExistingMatchingCard(c2390019.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,c,e,tp)
end end
function c2390019.cfilter(c,fc,e,tp) function c2390019.cfilter(c,fc,e,tp)
if c:IsSetCard(0xf) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() then if c:IsSetCard(0xf) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() then
...@@ -32,7 +32,7 @@ function c2390019.cfilter(c,fc,e,tp) ...@@ -32,7 +32,7 @@ function c2390019.cfilter(c,fc,e,tp)
else return false end else return false end
end end
function c2390019.filter(c,fc,e,tp) function c2390019.filter(c,fc,e,tp)
return c:IsCode(table.unpack(fc.material)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c2390019.cfilter2(c,g,mg,ft,rm) function c2390019.cfilter2(c,g,mg,ft,rm)
if not rm and ft==0 and not c:IsLocation(LOCATION_MZONE) then return false end if not rm and ft==0 and not c:IsLocation(LOCATION_MZONE) then return false end
......
...@@ -67,10 +67,10 @@ function c48048590.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,10 +67,10 @@ function c48048590.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c48048590.filter1(c,e,tp) function c48048590.filter1(c,e,tp)
return c.material and Duel.IsExistingMatchingCard(c48048590.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) return Duel.IsExistingMatchingCard(c48048590.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,c)
end end
function c48048590.filter2(c,e,tp,fc) function c48048590.filter2(c,e,tp,fc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsCode(table.unpack(fc.material)) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and aux.IsMaterialListCode(fc,c:GetCode())
end end
function c48048590.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c48048590.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c48048590.cost(e,tp,eg,ep,ev,re,r,rp,0) if chk==0 then return c48048590.cost(e,tp,eg,ep,ev,re,r,rp,0)
......
...@@ -18,10 +18,10 @@ function c49469105.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,10 +18,10 @@ function c49469105.cost(e,tp,eg,ep,ev,re,r,rp,chk)
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.filter1(c,g) function c49469105.filter1(c,g)
return c.material and g:IsExists(c49469105.filter2,1,nil,c) return g:IsExists(c49469105.filter2,1,nil,c)
end end
function c49469105.filter2(c,fc) function c49469105.filter2(c,fc)
return c:IsCode(table.unpack(fc.material)) return aux.IsMaterialListCode(fc,c:GetCode())
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,11 +11,10 @@ function c66127916.initial_effect(c) ...@@ -11,11 +11,10 @@ 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 and Duel.IsExistingMatchingCard(c66127916.filter2,tp,LOCATION_DECK,0,1,nil,c) return 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:IsForbidden() or not c:IsAbleToHand() then return false end return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsAbleToHand()
return c:IsCode(table.unpack(fc.material))
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,7 +21,7 @@ function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -21,7 +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)
return fc.material and c:IsCode(table.unpack(fc.material)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c69270537.fcheck(sp) function c69270537.fcheck(sp)
return function(tp,g,c) return function(tp,g,c)
......
...@@ -11,11 +11,10 @@ function c89312388.initial_effect(c) ...@@ -11,11 +11,10 @@ function c89312388.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c89312388.filter2(c,fc) function c89312388.filter2(c,fc)
if not c:IsAbleToGraveAsCost() then return false end return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsAbleToGraveAsCost()
return c:IsCode(table.unpack(fc.material))
end end
function c89312388.filter1(c,tp) function c89312388.filter1(c,tp)
return c.material and Duel.IsExistingMatchingCard(c89312388.filter2,tp,LOCATION_DECK,0,1,nil,c) return 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
......
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