Commit 8e8cb99e authored by salix5's avatar salix5

fix

parent f7158a9b
...@@ -16,14 +16,14 @@ function c21296383.spfilter(c,e,tp) ...@@ -16,14 +16,14 @@ function c21296383.spfilter(c,e,tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeEffectTarget(e)
end end
function c21296383.cfilter(c,lv) function c21296383.cfilter(c,lv)
return c:IsFaceup() and c:IsAbleToRemoveAsCost() and c:IsLevelAbove(lv) return c:IsFaceup() and c:IsAbleToRemoveAsCost() and c:GetOriginalLevel()>=lv
end end
function c21296383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21296383.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sg=Duel.GetMatchingGroup(c21296383.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c21296383.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if chkc then return sg:IsContains(chkc) and chkc:IsLevelBelow(e:GetLabel()) end if chkc then return sg:IsContains(chkc) and chkc:IsLevelBelow(e:GetLabel()) end
if sg:GetCount()==0 then return false end if sg:GetCount()==0 then return false end
local mg,mlv=sg:GetMinGroup(Card.GetLevel) local mg,mlv=sg:GetMinGroup(Card.GetLevel)
local elv=e:GetHandler():GetLevel() local elv=e:GetHandler():GetOriginalLevel()
local lv=(elv>=mlv) and 1 or (mlv-elv) local lv=(elv>=mlv) and 1 or (mlv-elv)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c21296383.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),lv) end and Duel.IsExistingMatchingCard(c21296383.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),lv) 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