Commit e838a347 authored by DailyShana's avatar DailyShana

fix

for Nekroz of Sophia
parent b8ce2305
...@@ -25,14 +25,14 @@ function c14735698.filter(c,e,tp,m1,m2,ft) ...@@ -25,14 +25,14 @@ function c14735698.filter(c,e,tp,m1,m2,ft)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2) mg:Merge(m2)
if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end if c:IsCode(21105106) then return c:ritual_custom_condition(mg,ft) end
if c.mat_filter then if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil) mg=mg:Filter(c.mat_filter,nil)
end end
if ft>0 then if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else else
return mg:IsExists(c14735698.mfilterf,1,nil,tp,mg,c) return ft>-1 and mg:IsExists(c14735698.mfilterf,1,nil,tp,mg,c)
end end
end end
function c14735698.mfilterf(c,tp,mg,rc) function c14735698.mfilterf(c,tp,mg,rc)
...@@ -49,7 +49,7 @@ function c14735698.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,7 @@ function c14735698.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c14735698.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(c14735698.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c14735698.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft) return Duel.IsExistingMatchingCard(c14735698.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -93,10 +93,10 @@ end ...@@ -93,10 +93,10 @@ end
function c21105106.filter(c,tp) function c21105106.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end end
function c21105106.ritual_custom_condition(c,mg) function c21105106.ritual_custom_condition(c,mg,ft)
local tp=c:GetControler() local tp=c:GetControler()
local g=mg:Filter(c21105106.filter,c,tp) local g=mg:Filter(c21105106.filter,c,tp)
return g:IsExists(c21105106.ritfilter1,1,nil,c:GetLevel(),g) return ft>-3 and g:IsExists(c21105106.ritfilter1,1,nil,c:GetLevel(),g)
end end
function c21105106.ritfilter1(c,lv,mg) function c21105106.ritfilter1(c,lv,mg)
lv=lv-c:GetLevel() lv=lv-c:GetLevel()
......
...@@ -32,14 +32,14 @@ function c84388461.filter(c,e,tp,m,ft) ...@@ -32,14 +32,14 @@ function c84388461.filter(c,e,tp,m,ft)
if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81 if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end if c:IsCode(21105106) then return c:ritual_custom_condition(mg,ft) end
if c.mat_filter then if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil) mg=mg:Filter(c.mat_filter,nil)
end end
if ft>0 then if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else else
return mg:IsExists(c84388461.mfilterf,1,nil,tp,mg,c) return ft>-1 and mg:IsExists(c84388461.mfilterf,1,nil,tp,mg,c)
end end
end end
function c84388461.mfilterf(c,tp,mg,rc) function c84388461.mfilterf(c,tp,mg,rc)
...@@ -58,7 +58,7 @@ function c84388461.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,7 +58,7 @@ function c84388461.target(e,tp,eg,ep,ev,re,r,rp,chk)
mg:RemoveCard(e:GetHandler()) mg:RemoveCard(e:GetHandler())
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if e:GetHandler():IsLocation(LOCATION_MZONE) then ft=ft+1 end if e:GetHandler():IsLocation(LOCATION_MZONE) then ft=ft+1 end
return ft>-1 and Duel.IsExistingMatchingCard(c84388461.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft) return Duel.IsExistingMatchingCard(c84388461.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -24,14 +24,14 @@ function c97211663.filter(c,e,tp,m,ft) ...@@ -24,14 +24,14 @@ function c97211663.filter(c,e,tp,m,ft)
if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81 if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c) local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end if c:IsCode(21105106) then return c:ritual_custom_condition(mg,ft) end
if c.mat_filter then if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil) mg=mg:Filter(c.mat_filter,nil)
end end
if ft>0 then if ft>0 then
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else else
return mg:IsExists(c97211663.mfilterf,1,nil,tp,mg,c) return ft>-1 and mg:IsExists(c97211663.mfilterf,1,nil,tp,mg,c)
end end
end end
function c97211663.mfilterf(c,tp,mg,rc) function c97211663.mfilterf(c,tp,mg,rc)
...@@ -44,7 +44,7 @@ function c97211663.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,7 +44,7 @@ function c97211663.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c97211663.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg,ft) return Duel.IsExistingMatchingCard(c97211663.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
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