Commit c72a6b76 authored by mallu11's avatar mallu11 Committed by GitHub

fix インスペクト・ボーダー (#1464)

parent 328e0c90
...@@ -27,15 +27,9 @@ function c15397015.initial_effect(c) ...@@ -27,15 +27,9 @@ function c15397015.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE) e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0) e4:SetTargetRange(1,1)
e4:SetCondition(c15397015.econ)
e4:SetValue(c15397015.elimit) e4:SetValue(c15397015.elimit)
e4:SetLabel(0)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e6=e4:Clone()
e6:SetTargetRange(0,1)
e6:SetLabel(1)
c:RegisterEffect(e6)
end end
function c15397015.sumcon(e) function c15397015.sumcon(e)
return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_MZONE,0)>0 return Duel.GetFieldGroupCount(e:GetHandler():GetControler(),LOCATION_MZONE,0)>0
...@@ -45,24 +39,18 @@ function c15397015.sumlimit(e,se,sp,st,pos,tp) ...@@ -45,24 +39,18 @@ function c15397015.sumlimit(e,se,sp,st,pos,tp)
end end
function c15397015.counterop(e,tp,eg,ep,ev,re,r,rp) function c15397015.counterop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsActiveType(TYPE_MONSTER) then return end if not re:IsActiveType(TYPE_MONSTER) then return end
if ep==tp then e:GetHandler():RegisterFlagEffect(15397015+ep,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(15397015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
else
e:GetHandler():RegisterFlagEffect(15397016,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end end
function c15397015.cfilter(c,type) function c15397015.cfilter(c,type)
return c:IsFaceup() and c:IsType(type) return c:IsFaceup() and c:IsType(type)
end end
function c15397015.econ(e) function c15397015.elimit(e,re,tp)
if not re:IsActiveType(TYPE_MONSTER) then return false end
local ct=0 local ct=0
for i,type in ipairs({TYPE_FUSION,TYPE_RITUAL,TYPE_SYNCHRO,TYPE_XYZ,TYPE_PENDULUM,TYPE_LINK}) do for i,type in ipairs({TYPE_FUSION,TYPE_RITUAL,TYPE_SYNCHRO,TYPE_XYZ,TYPE_PENDULUM,TYPE_LINK}) do
if Duel.IsExistingMatchingCard(c15397015.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,type) then if Duel.IsExistingMatchingCard(c15397015.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil,type) then
ct=ct+1 ct=ct+1
end end
end end
return e:GetHandler():GetFlagEffect(15397015+e:GetLabel())>=ct return e:GetHandler():GetFlagEffect(15397015+tp)>=ct
end
function c15397015.elimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end 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