Commit 3a83d7a6 authored by Huangnan's avatar Huangnan

Update c101202042.lua

parent 1c6fac9d
Pipeline #23074 failed with stages
in 27 minutes and 25 seconds
...@@ -5,7 +5,7 @@ local s,id,o=GetID() ...@@ -5,7 +5,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddXyzProcedure(c,nil,12,2,s.mfilter(c:GetControler()),aux.Stringid(id,0),2,s.altop) aux.AddXyzProcedure(c,nil,12,2,s.mfilter,aux.Stringid(id,0),2,s.altop)
if not s.global_check then if not s.global_check then
s.global_check=true s.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
...@@ -44,6 +44,10 @@ function s.initial_effect(c) ...@@ -44,6 +44,10 @@ function s.initial_effect(c)
e3:SetOperation(s.thop) e3:SetOperation(s.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function Auxiliary.XyzAlterFilter(c,alterf,xyzc,e,tp,alterop)
return alterf(c,e,tp,xyzc) and c:IsCanBeXyzMaterial(xyzc) and Duel.GetLocationCountFromEx(tp,tp,c,xyzc)>0
and Auxiliary.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and (not alterop or alterop(e,tp,0,c))
end
function s.chk(e,tp,eg) function s.chk(e,tp,eg)
for p=0,1 do for p=0,1 do
if eg:IsExists(Card.IsSummonPlayer,1,nil,1-p) then if eg:IsExists(Card.IsSummonPlayer,1,nil,1-p) then
...@@ -51,11 +55,9 @@ function s.chk(e,tp,eg) ...@@ -51,11 +55,9 @@ function s.chk(e,tp,eg)
end end
end end
end end
function s.mfilter(tp) function s.mfilter(c,e,tp)
return function(c) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack) return g and #g>0 and g:IsContains(c)
return g and #g>0 and g:IsContains(c)
end
end end
function s.altop(e,tp,chk) function s.altop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)>1 end if chk==0 then return Duel.GetFlagEffect(tp,id)>1 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