Commit 281fa4cb authored by salix5's avatar salix5

Merge pull request #180 from DailyShana/patch-3

change GetCode to IsCode
parents 0c1e91f5 0524209b
...@@ -49,7 +49,7 @@ function c11502550.splimit(e,se,sp,st) ...@@ -49,7 +49,7 @@ function c11502550.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c11502550.spfilter(c,code) function c11502550.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c11502550.spcon(e,c) function c11502550.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -25,7 +25,7 @@ function c12171659.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c12171659.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c12171659.filter(c) function c12171659.filter(c)
return c:GetCode()==56433456 and c:IsAbleToHand() return c:IsCode(56433456) and c:IsAbleToHand()
end end
function c12171659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c12171659.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c12171659.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c12171659.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -14,7 +14,7 @@ function c12538374.initial_effect(c) ...@@ -14,7 +14,7 @@ function c12538374.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c12538374.filter(c) function c12538374.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:GetCode()==12538374 and c:IsFaceup()) return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:IsCode(12538374) and c:IsFaceup())
end end
function c12538374.condition(e,tp,eg,ep,ev,re,r,rp) function c12538374.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c12538374.filter,tp,LOCATION_ONFIELD,0,1,nil) return tp==Duel.GetTurnPlayer() and not Duel.IsExistingMatchingCard(c12538374.filter,tp,LOCATION_ONFIELD,0,1,nil)
......
...@@ -53,7 +53,7 @@ function c131182.initial_effect(c) ...@@ -53,7 +53,7 @@ function c131182.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c131182.exfilter(c) function c131182.exfilter(c)
return c:IsFaceup() and c:GetCode()==131182 return c:IsFaceup() and c:IsCode(131182)
end end
function c131182.excon(e) function c131182.excon(e)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -52,7 +52,7 @@ function c17032740.splimit(e,se,sp,st) ...@@ -52,7 +52,7 @@ function c17032740.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c17032740.spfilter(c,code) function c17032740.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c17032740.spcon(e,c) function c17032740.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -17,7 +17,7 @@ function c17393207.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c17393207.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c17393207.filter(c) function c17393207.filter(c)
return c:GetCode()==47355498 and c:IsAbleToHand() return c:IsCode(47355498) and c:IsAbleToHand()
end end
function c17393207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17393207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c17393207.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c17393207.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -17,7 +17,7 @@ function c18698739.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c18698739.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c18698739.filter(c) function c18698739.filter(c)
return c:GetCode()==44682448 and c:IsAbleToHand() return c:IsCode(44682448) and c:IsAbleToHand()
end end
function c18698739.target(e,tp,eg,ep,ev,re,r,rp,chk) function c18698739.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18698739.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c18698739.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -17,7 +17,7 @@ function c19594506.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c19594506.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c19594506.filter(c) function c19594506.filter(c)
return c:GetCode()==42015635 and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) return c:IsCode(42015635) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end end
function c19594506.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c19594506.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c19594506.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c19594506.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......
...@@ -52,7 +52,7 @@ function c28677304.splimit(e,se,sp,st) ...@@ -52,7 +52,7 @@ function c28677304.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c28677304.spfilter(c,code) function c28677304.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c28677304.spcon(e,c) function c28677304.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -20,7 +20,7 @@ function c28754338.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c28754338.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
end end
function c28754338.filter(c,e,tp) function c28754338.filter(c,e,tp)
return c:GetCode()==47826112 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(47826112) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c28754338.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c28754338.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
......
...@@ -18,7 +18,7 @@ function c30241314.initial_effect(c) ...@@ -18,7 +18,7 @@ function c30241314.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c30241314.filter(c,e,sp) function c30241314.filter(c,e,sp)
return c:GetCode()==54493213 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsCode(54493213) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function c30241314.activate(e,tp,eg,ep,ev,re,r,rp) function c30241314.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -17,7 +17,7 @@ function c31786629.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c31786629.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c31786629.filter(c) function c31786629.filter(c)
return c:GetCode()==31786629 and c:IsAbleToHand() return c:IsCode(31786629) and c:IsAbleToHand()
end end
function c31786629.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31786629.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c31786629.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c31786629.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -23,7 +23,7 @@ function c32485518.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function c32485518.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c32485518.filter(c) function c32485518.filter(c)
return c:GetCode()==4064256 and c:IsAbleToHand() return c:IsCode(4064256) and c:IsAbleToHand()
end end
function c32485518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c32485518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c32485518.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c32485518.filter(chkc) end
......
...@@ -17,7 +17,7 @@ function c3431737.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c3431737.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c3431737.filter(c) function c3431737.filter(c)
return c:GetCode()==80280737 and c:IsAbleToHand() return c:IsCode(80280737) and c:IsAbleToHand()
end end
function c3431737.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c3431737.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c3431737.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c3431737.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -16,7 +16,7 @@ function c34627841.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c34627841.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c34627841.filter(c,e,tp) function c34627841.filter(c,e,tp)
return c:GetCode()==89631139 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(89631139) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c34627841.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c34627841.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
...@@ -95,7 +95,7 @@ function c35952884.sumcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +95,7 @@ function c35952884.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c35952884.filter(c,e,tp) function c35952884.filter(c,e,tp)
return c:GetCode()==24696097 and c:IsCanBeSpecialSummoned(e,0,tp,false,true) return c:IsCode(24696097) and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end end
function c35952884.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c35952884.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -16,7 +16,7 @@ function c36262024.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c36262024.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c36262024.filter(c,e,tp) function c36262024.filter(c,e,tp)
return c:GetCode()==74677422 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(74677422) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c36262024.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c36262024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
...@@ -15,7 +15,7 @@ function c39719977.filter(c,tp) ...@@ -15,7 +15,7 @@ function c39719977.filter(c,tp)
end end
function c39719977.filter2(c,code) function c39719977.filter2(c,code)
local tpe=c:GetType() local tpe=c:GetType()
return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:GetCode()==code return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:IsCode(code)
end end
function c39719977.target(e,tp,eg,ep,ev,re,r,rp,chk) function c39719977.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c39719977.filter,tp,LOCATION_MZONE,0,3,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c39719977.filter,tp,LOCATION_MZONE,0,3,nil,tp) end
......
...@@ -23,5 +23,5 @@ function c42015635.initial_effect(c) ...@@ -23,5 +23,5 @@ function c42015635.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c42015635.atktg(e,c) function c42015635.atktg(e,c)
return c:GetCode()==89943723 or (c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and not c:IsCode(31111109)) return c:IsCode(89943723) or (c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and not c:IsCode(31111109))
end end
...@@ -16,7 +16,7 @@ function c47594192.cfilter(c,tp) ...@@ -16,7 +16,7 @@ function c47594192.cfilter(c,tp)
return c:IsFaceup() and not c:IsType(TYPE_TOKEN) and Duel.IsExistingMatchingCard(c47594192.cfilter2,tp,LOCATION_MZONE,0,2,c,c:GetCode()) return c:IsFaceup() and not c:IsType(TYPE_TOKEN) and Duel.IsExistingMatchingCard(c47594192.cfilter2,tp,LOCATION_MZONE,0,2,c,c:GetCode())
end end
function c47594192.cfilter2(c,code) function c47594192.cfilter2(c,code)
return c:IsFaceup() and c:GetCode()==code return c:IsFaceup() and c:IsCode(code)
end end
function c47594192.condition(e,tp,eg,ep,ev,re,r,rp) function c47594192.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c47594192.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) return Duel.IsExistingMatchingCard(c47594192.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
......
...@@ -25,7 +25,7 @@ function c48675364.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c48675364.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c48675364.filter(c) function c48675364.filter(c)
return c:GetCode()==94585852 and c:IsAbleToHand() return c:IsCode(94585852) and c:IsAbleToHand()
end end
function c48675364.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c48675364.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c48675364.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c48675364.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -52,7 +52,7 @@ function c48996569.splimit(e,se,sp,st) ...@@ -52,7 +52,7 @@ function c48996569.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c48996569.spfilter(c,code) function c48996569.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c48996569.spcon(e,c) function c48996569.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -60,7 +60,7 @@ function c49352945.splimit(e,se,sp,st) ...@@ -60,7 +60,7 @@ function c49352945.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c49352945.spfilter(c,code) function c49352945.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c49352945.spcon(e,c) function c49352945.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -34,7 +34,7 @@ function c5128859.splimit(e,se,sp,st) ...@@ -34,7 +34,7 @@ function c5128859.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c5128859.spfilter(c,code) function c5128859.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c5128859.spfilter2(c,code) function c5128859.spfilter2(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetOriginalCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:GetOriginalCode()==code
......
...@@ -50,7 +50,7 @@ end ...@@ -50,7 +50,7 @@ end
function c51405049.regop(e,tp,eg,ep,ev,re,r,rp) function c51405049.regop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then return end if e:GetLabel()==0 then return end
local tc=eg:GetFirst() local tc=eg:GetFirst()
if tc:GetCode()==e:GetLabel() then if tc:IsCode(e:GetLabel()) then
e:SetLabel(0) e:SetLabel(0)
end end
end end
......
...@@ -16,7 +16,7 @@ function c52624755.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c52624755.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c52624755.filter(c,e,sp) function c52624755.filter(c,e,sp)
return c:GetCode()==52624755 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsCode(52624755) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function c52624755.target(e,tp,eg,ep,ev,re,r,rp,chk) function c52624755.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -52,7 +52,7 @@ function c55171412.splimit(e,se,sp,st) ...@@ -52,7 +52,7 @@ function c55171412.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c55171412.spfilter(c,code) function c55171412.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c55171412.spcon(e,c) function c55171412.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -13,7 +13,7 @@ function c56105047.initial_effect(c) ...@@ -13,7 +13,7 @@ function c56105047.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c56105047.filter(c,e,tp) function c56105047.filter(c,e,tp)
return c:GetCode()==62476815 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(62476815) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c56105047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56105047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56105047.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c56105047.filter(chkc,e,tp) end
......
...@@ -19,7 +19,7 @@ function c58120309.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c58120309.condition(e,tp,eg,ep,ev,re,r,rp)
return ex and tg~=nil and tc+tg:FilterCount(c58120309.filter,nil,tp)-tg:GetCount()>1 return ex and tg~=nil and tc+tg:FilterCount(c58120309.filter,nil,tp)-tg:GetCount()>1
end end
function c58120309.sfilter(c,e,tp) function c58120309.sfilter(c,e,tp)
return c:GetCode()==44508094 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c58120309.target(e,tp,eg,ep,ev,re,r,rp,chk) function c58120309.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -17,7 +17,7 @@ function c60668166.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,7 +17,7 @@ function c60668166.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and c:GetPreviousControler()==tp and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0 return rp~=tp and c:GetPreviousControler()==tp and bit.band(c:GetPreviousLocation(),LOCATION_ONFIELD)~=0
end end
function c60668166.filter(c,e,tp) function c60668166.filter(c,e,tp)
return c:GetCode()==60668166 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) return c:IsCode(60668166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
end end
function c60668166.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60668166.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -15,7 +15,7 @@ function c62107612.initial_effect(c) ...@@ -15,7 +15,7 @@ function c62107612.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c62107612.condition(e,tp,eg,ep,ev,re,r,rp) function c62107612.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 and re and re:GetHandler():GetCode()==93717133 return bit.band(r,REASON_EFFECT)~=0 and re and re:GetHandler():IsCode(93717133)
end end
function c62107612.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c62107612.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -14,7 +14,7 @@ function c67757079.initial_effect(c) ...@@ -14,7 +14,7 @@ function c67757079.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c67757079.cfilter(c) function c67757079.cfilter(c)
return c:IsFaceup() and c:GetCode()==94878265 return c:IsFaceup() and c:IsCode(94878265)
end end
function c67757079.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c67757079.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c67757079.cfilter,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(tp,c67757079.cfilter,1,nil) end
......
...@@ -27,7 +27,7 @@ function c71587526.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -27,7 +27,7 @@ function c71587526.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c71587526.rfilter(c,code) function c71587526.rfilter(c,code)
return c:GetCode()==code and c:IsAbleToRemove() return c:IsCode(code) and c:IsAbleToRemove()
end end
function c71587526.activate(e,tp,eg,ep,ev,re,r,rp) function c71587526.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -22,7 +22,7 @@ function c7304544.initial_effect(c) ...@@ -22,7 +22,7 @@ function c7304544.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c7304544.filter(c) function c7304544.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:GetCode()==7304544 and c:IsFaceup()) return c:IsType(TYPE_SPELL+TYPE_TRAP) or (c:IsCode(7304544) and c:IsFaceup())
end end
function c7304544.filter2(c) function c7304544.filter2(c)
return c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_PLANT+RACE_BEAST) return c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_PLANT+RACE_BEAST)
......
...@@ -17,7 +17,7 @@ function c74968065.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c74968065.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c74968065.filter(c) function c74968065.filter(c)
return c:GetCode()==1353770 and c:IsAbleToHand() return c:IsCode(1353770) and c:IsAbleToHand()
end end
function c74968065.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c74968065.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c74968065.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c74968065.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -22,7 +22,7 @@ function c75014062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,7 +22,7 @@ function c75014062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x3001)
end end
function c75014062.tfilter(c) function c75014062.tfilter(c)
return c:GetCode()==75014062 and c:IsAbleToHand() return c:IsCode(75014062) and c:IsAbleToHand()
end end
function c75014062.activate(e,tp,eg,ep,ev,re,r,rp) function c75014062.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -25,7 +25,7 @@ function c75064463.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c75064463.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c75064463.filter(c) function c75064463.filter(c)
return c:GetCode()==75782277 and c:IsAbleToHand() return c:IsCode(75782277) and c:IsAbleToHand()
end end
function c75064463.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c75064463.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c75064463.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c75064463.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -58,7 +58,7 @@ function c78512663.splimit(e,se,sp,st) ...@@ -58,7 +58,7 @@ function c78512663.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c78512663.spfilter(c,code) function c78512663.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c78512663.spcon(e,c) function c78512663.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -26,7 +26,7 @@ function c79109599.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,7 +26,7 @@ function c79109599.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c79109599.filter(c) function c79109599.filter(c)
return c:GetCode()==24094653 and c:IsAbleToHand() return c:IsCode(24094653) and c:IsAbleToHand()
end end
function c79109599.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79109599.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79109599.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c79109599.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -11,7 +11,7 @@ function c79814787.initial_effect(c) ...@@ -11,7 +11,7 @@ function c79814787.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c79814787.filter(c) function c79814787.filter(c)
return c:GetCode()==89631139 and c:IsAbleToHand() return c:IsCode(89631139) and c:IsAbleToHand()
end end
function c79814787.target(e,tp,eg,ep,ev,re,r,rp,chk) function c79814787.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -17,7 +17,7 @@ function c80186010.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,7 +17,7 @@ function c80186010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c80186010.filter(c) function c80186010.filter(c)
return c:GetCode()==10080320 and c:IsAbleToHand() return c:IsCode(10080320) and c:IsAbleToHand()
end end
function c80186010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80186010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c80186010.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c80186010.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -25,7 +25,7 @@ function c80908502.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,7 +25,7 @@ function c80908502.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function c80908502.filter(c) function c80908502.filter(c)
return c:GetCode()==63035430 and c:IsAbleToHand() return c:IsCode(63035430) and c:IsAbleToHand()
end end
function c80908502.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80908502.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c80908502.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c80908502.filter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -49,7 +49,7 @@ function c81566151.splimit(e,se,sp,st) ...@@ -49,7 +49,7 @@ function c81566151.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c81566151.spfilter(c,code) function c81566151.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c81566151.spcon(e,c) function c81566151.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -53,7 +53,7 @@ function c85507811.splimit(e,se,sp,st) ...@@ -53,7 +53,7 @@ function c85507811.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c85507811.spfilter(c,code) function c85507811.spfilter(c,code)
return c:IsAbleToDeckOrExtraAsCost() and c:GetCode()==code return c:IsAbleToDeckOrExtraAsCost() and c:IsCode(code)
end end
function c85507811.spcon(e,c) function c85507811.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -57,13 +57,13 @@ function c86742443.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,13 +57,13 @@ function c86742443.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Damage(1-tp,1000,REASON_EFFECT)
end end
function c86742443.damop2(e,tp,eg,ep,ev,re,r,rp) function c86742443.damop2(e,tp,eg,ep,ev,re,r,rp)
if eg:GetFirst():GetCode()==e:GetLabel() then if eg:GetFirst():IsCode(e:GetLabel()) then
Duel.Damage(tp,1000,REASON_EFFECT) Duel.Damage(tp,1000,REASON_EFFECT)
e:GetLabelObject():SetLabel(1) e:GetLabelObject():SetLabel(1)
end end
end end
function c86742443.damop3(e,tp,eg,ep,ev,re,r,rp) function c86742443.damop3(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():GetCode()==e:GetLabel() then if re:GetHandler():IsCode(e:GetLabel()) then
Duel.Damage(tp,1000,REASON_EFFECT) Duel.Damage(tp,1000,REASON_EFFECT)
e:GetLabelObject():SetLabel(1) e:GetLabelObject():SetLabel(1)
end end
......
...@@ -13,7 +13,7 @@ function c88733579.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -13,7 +13,7 @@ function c88733579.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp return ep==1-tp
end end
function c88733579.filter(c) function c88733579.filter(c)
return c:GetCode()==27911549 and c:GetPosition()~=POS_FACEUP_DEFENCE return c:IsCode(27911549) and c:GetPosition()~=POS_FACEUP_DEFENCE
end end
function c88733579.operation(e,tp,eg,ep,ev,re,r,rp) function c88733579.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c88733579.filter,tp,LOCATION_DECK,0,nil) local tc=Duel.GetFirstMatchingCard(c88733579.filter,tp,LOCATION_DECK,0,nil)
......
...@@ -14,7 +14,7 @@ function c91188343.filter1(c) ...@@ -14,7 +14,7 @@ function c91188343.filter1(c)
return c:IsSetCard(0x44) and c:GetCode()~=91188343 and c:IsAbleToHand() return c:IsSetCard(0x44) and c:GetCode()~=91188343 and c:IsAbleToHand()
end end
function c91188343.filter2(c) function c91188343.filter2(c)
return ((c:IsSetCard(0x44) and c:GetCode()~=91188343) or c:GetCode()==55794644) and c:IsAbleToHand() return ((c:IsSetCard(0x44) and c:GetCode()~=91188343) or c:IsCode(55794644)) and c:IsAbleToHand()
end end
function c91188343.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c91188343.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -16,7 +16,7 @@ function c9411399.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c9411399.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c9411399.filter(c,e,sp) function c9411399.filter(c,e,sp)
return c:GetCode()==9411399 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsCode(9411399) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function c9411399.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9411399.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9411399.filter,tp,LOCATION_DECK,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c9411399.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
......
...@@ -16,7 +16,7 @@ function c97093037.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -16,7 +16,7 @@ function c97093037.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c97093037.filter(c,e,tp) function c97093037.filter(c,e,tp)
return c:GetCode()==61505339 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(61505339) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c97093037.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c97093037.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
...@@ -20,7 +20,7 @@ function c98446407.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c98446407.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
end end
function c98446407.filter(c,e,tp) function c98446407.filter(c,e,tp)
return c:GetCode()==61441708 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(61441708) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c98446407.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c98446407.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
......
...@@ -16,7 +16,7 @@ function c98884569.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c98884569.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end end
function c98884569.filter(c,e,tp) function c98884569.filter(c,e,tp)
return (c:IsRace(RACE_PLANT) or c:GetCode()==73580471) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsRace(RACE_PLANT) or c:IsCode(73580471)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c98884569.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98884569.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98884569.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98884569.filter(chkc,e,tp) end
......
...@@ -16,7 +16,7 @@ function c99000151.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,7 +16,7 @@ function c99000151.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetReason(),0x41)==0x41 return bit.band(e:GetHandler():GetReason(),0x41)==0x41
end end
function c99000151.filter(c,e,tp) function c99000151.filter(c,e,tp)
return c:GetCode()==36405256 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(36405256) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c99000151.target(e,tp,eg,ep,ev,re,r,rp,chk) function c99000151.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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