Commit c0a25674 authored by Momobako's avatar Momobako

Push by Appveyor

parent 6756a0ff
...@@ -65,7 +65,7 @@ function cm.replace_register_effect(f,p) ...@@ -65,7 +65,7 @@ function cm.replace_register_effect(f,p)
local cost=e:GetCost() local cost=e:GetCost()
e:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk) e:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local let={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE)} local let={Duel.FilterPlayerEffect(tp,EFFECT_CANNOT_ACTIVATE)}
for _,le in pairs(let) do for _,le in pairs(let) do
local cres=Senya.GetEffectValue(le,c:GetActivateEffect(),le:GetHandlerPlayer()) local cres=Senya.GetEffectValue(le,c:GetActivateEffect(),le:GetHandlerPlayer())
if cres and cres~=0 then return false end if cres and cres~=0 then return false end
......
...@@ -37,8 +37,8 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,8 +37,8 @@ function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
local ct=1 local ct=1
if Card.IsHasEffect then if Card.FilterEffect then
local exte={c:IsHasEffect(37564427)} local exte={c:FilterEffect(37564427)}
for _,te in ipairs(exte) do for _,te in ipairs(exte) do
if Duel.SelectEffectYesNo(tp,te:GetHandler()) then if Duel.SelectEffectYesNo(tp,te:GetHandler()) then
Duel.Hint(HINT_CARD,0,te:GetHandler():GetOriginalCode()) Duel.Hint(HINT_CARD,0,te:GetHandler():GetOriginalCode())
......
...@@ -301,7 +301,7 @@ function cm.XyzProcedureCustomTuneMagicianFilter(c,te) ...@@ -301,7 +301,7 @@ function cm.XyzProcedureCustomTuneMagicianFilter(c,te)
return f(te,c) return f(te,c)
end end
function cm.XyzProcedureCustomTuneMagicianCheck(c,g) function cm.XyzProcedureCustomTuneMagicianCheck(c,g)
local eset={c:IsHasEffect(EFFECT_TUNE_MAGICIAN_X)} local eset={c:FilterEffect(EFFECT_TUNE_MAGICIAN_X)}
for _,te in ipairs(eset) do for _,te in ipairs(eset) do
if g:IsExists(cm.XyzProcedureCustomTuneMagicianFilter,1,c,te) then return true end if g:IsExists(cm.XyzProcedureCustomTuneMagicianFilter,1,c,te) then return true end
end end
...@@ -309,7 +309,7 @@ function cm.XyzProcedureCustomTuneMagicianCheck(c,g) ...@@ -309,7 +309,7 @@ function cm.XyzProcedureCustomTuneMagicianCheck(c,g)
end end
function cm.XyzProcedureCustomCheck(g,xyzc,tp,gf) function cm.XyzProcedureCustomCheck(g,xyzc,tp,gf)
if EFFECT_MUST_BE_XMATERIAL then if EFFECT_MUST_BE_XMATERIAL then
local eset={Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL)} local eset={Duel.FilterPlayerEffect(tp,EFFECT_MUST_BE_XMATERIAL)}
for _,te in ipairs(eset) do for _,te in ipairs(eset) do
if not g:IsContains(te:GetHandler()) then return false end if not g:IsContains(te:GetHandler()) then return false end
end end
...@@ -816,8 +816,8 @@ function cm.PrismDamageCheckOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -816,8 +816,8 @@ function cm.PrismDamageCheckOperation(e,tp,eg,ep,ev,re,r,rp)
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
if ct==0 then return end if ct==0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
if Card.IsHasEffect then if Card.FilterEffect then
local exte={c:IsHasEffect(37564427)} local exte={c:FilterEffect(37564427)}
for _,te in ipairs(exte) do for _,te in ipairs(exte) do
if Duel.SelectEffectYesNo(tp,te:GetHandler()) then if Duel.SelectEffectYesNo(tp,te:GetHandler()) then
Duel.Hint(HINT_CARD,0,te:GetHandler():GetOriginalCode()) Duel.Hint(HINT_CARD,0,te:GetHandler():GetOriginalCode())
...@@ -1094,9 +1094,9 @@ function cm.PendConditionNanahira() ...@@ -1094,9 +1094,9 @@ function cm.PendConditionNanahira()
else else
g=Duel.GetMatchingGroup(aux.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,lscale,rscale) g=Duel.GetMatchingGroup(aux.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,lscale,rscale)
end end
if Card.IsHasEffect then if Card.FilterEffect then
local ext1={c:IsHasEffect(37564541)} local ext1={c:FilterEffect(37564541)}
local ext2={rpz:IsHasEffect(37564541)} local ext2={rpz:FilterEffect(37564541)}
for i,te in pairs(ext1) do for i,te in pairs(ext1) do
local t=cm.order_table[te:GetValue()] local t=cm.order_table[te:GetValue()]
if (t.location==LOCATION_EXTRA and eft>0) or (t.location~=LOCATION_EXTRA and mft>0) then if (t.location==LOCATION_EXTRA and eft>0) or (t.location~=LOCATION_EXTRA and mft>0) then
...@@ -1154,9 +1154,9 @@ function cm.PendOperationNanahira() ...@@ -1154,9 +1154,9 @@ function cm.PendOperationNanahira()
else else
tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,lscale,rscale) tg=Duel.GetMatchingGroup(aux.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,lscale,rscale)
end end
if Card.IsHasEffect then if Card.FilterEffect then
local ext1={c:IsHasEffect(37564541)} local ext1={c:FilterEffect(37564541)}
local ext2={rpz:IsHasEffect(37564541)} local ext2={rpz:FilterEffect(37564541)}
for i,te in pairs(ext1) do for i,te in pairs(ext1) do
local t=cm.order_table[te:GetValue()] local t=cm.order_table[te:GetValue()]
if (t.location==LOCATION_EXTRA and eft>0) or (t.location~=LOCATION_EXTRA and mft>0) then if (t.location==LOCATION_EXTRA and eft>0) or (t.location~=LOCATION_EXTRA and mft>0) then
...@@ -1884,8 +1884,8 @@ function cm.enable_kaguya_check_3L() ...@@ -1884,8 +1884,8 @@ function cm.enable_kaguya_check_3L()
Duel.RegisterEffect(ge3,0) Duel.RegisterEffect(ge3,0)
end end
function cm.CheckKoishiCount(c) function cm.CheckKoishiCount(c)
if Card.IsHasEffect then if Card.FilterEffect then
local t={c:IsHasEffect(37564826)} local t={c:FilterEffect(37564826)}
local res=1 local res=1
for i,te in pairs(t) do for i,te in pairs(t) do
res=math.max(res,te:GetValue()) res=math.max(res,te:GetValue())
...@@ -1999,8 +1999,8 @@ function cm.RemoveEffect_3L(tp,tc,ct,maxct,chk,...) ...@@ -1999,8 +1999,8 @@ function cm.RemoveEffect_3L(tp,tc,ct,maxct,chk,...)
local effect_list=cm.GetGainedList_3L(tc) local effect_list=cm.GetGainedList_3L(tc)
local avaliable_list={} local avaliable_list={}
local omit_list={...} local omit_list={...}
if Card.IsHasEffect then if Card.FilterEffect then
local oet={tc:IsHasEffect(37564827)} local oet={tc:FilterEffect(37564827)}
for i,oe in pairs(oet) do for i,oe in pairs(oet) do
local of=cm.order_table[oe:GetValue()] local of=cm.order_table[oe:GetValue()]
local og=of(tc) local og=of(tc)
...@@ -2465,7 +2465,7 @@ function cm.GetEffectValue(e,...) ...@@ -2465,7 +2465,7 @@ function cm.GetEffectValue(e,...)
end end
--custom ocgcore needed --custom ocgcore needed
function cm.CheckEffect(c,code,...) function cm.CheckEffect(c,code,...)
local eset={c:IsHasEffect(code)} local eset={c:FilterEffect(code)}
for _,te in ipairs(eset) do for _,te in ipairs(eset) do
local res=cm.GetEffectValue(te,...) local res=cm.GetEffectValue(te,...)
if res and res~=0 then return res end if res and res~=0 then return res end
...@@ -2473,7 +2473,7 @@ function cm.CheckEffect(c,code,...) ...@@ -2473,7 +2473,7 @@ function cm.CheckEffect(c,code,...)
return false return false
end end
function cm.CheckPlayerEffect(p,code,...) function cm.CheckPlayerEffect(p,code,...)
local eset={Duel.IsPlayerAffectedByEffect(p,code)} local eset={Duel.FilterPlayerEffect(p,code)}
for _,te in ipairs(eset) do for _,te in ipairs(eset) do
local res=cm.GetEffectValue(te,...) local res=cm.GetEffectValue(te,...)
if res and res~=0 then return res end if res and res~=0 then return res 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