Commit 821dd91a authored by VanillaSalt's avatar VanillaSalt

fix

parent 88840498
......@@ -38,7 +38,7 @@ function c14513016.limcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),14513016)~=0
end
function c14513016.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,14513016)~=0 then return end
if Duel.GetFlagEffect(tp,14513017)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
......@@ -46,5 +46,5 @@ function c14513016.sumop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb5))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,14513016,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,14513017,RESET_PHASE+PHASE_END,0,1)
end
......@@ -10,8 +10,12 @@ function c46052429.initial_effect(c)
c:RegisterEffect(e1)
end
function c46052429.filter(c,e,tp,m)
return bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
and m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
if bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end
if c.mat_filter then
m=m:Filter(c.mat_filter,nil)
end
return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end
function c46052429.matfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave()
......@@ -31,6 +35,9 @@ function c46052429.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,c46052429.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
......
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