Commit 3ae5130c authored by nanahira's avatar nanahira

fixrt

parent 89e75929
...@@ -38,8 +38,8 @@ function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,8 +38,8 @@ function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return end
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return end
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c) local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,c)
if c.mat_filter then if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil) mg=mg:Filter(c.mat_filter,nil)
......
...@@ -43,8 +43,8 @@ function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,8 +43,8 @@ function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp) function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return end
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return end
local mg=Duel.GetRitualMaterial(tp):Filter(cm.matfilter,c,c) local mg=Duel.GetRitualMaterial(tp):Filter(cm.matfilter,c,c)
if c.mat_filter then if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil) mg=mg:Filter(c.mat_filter,nil)
......
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
cm.fit_monster={37564504,37564526,37564552} cm.fit_monster={37564504,37564526,37564552}
function cm.filter(c,e,tp,m1,m2,ft) function cm.filter(c,e,tp,m1,m2)
local ec=e:GetHandler() local ec=e:GetHandler()
if not ec.fit_monster then return false end if not ec.fit_monster then return false end
if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end if not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
...@@ -22,22 +22,12 @@ function cm.filter(c,e,tp,m1,m2,ft) ...@@ -22,22 +22,12 @@ function cm.filter(c,e,tp,m1,m2,ft)
local cd2=c:GetCode() local cd2=c:GetCode()
local check=false local check=false
for i,cd in pairs(ec.fit_monster) do for i,cd in pairs(ec.fit_monster) do
if cd==cd1 or cd==cd2 then chk=true end if cd==cd1 or cd==cd2 then check=true end
end end
if not check then return false end if not check 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 ft>0 then return Senya.CheckRitualMaterial(c,mg,tp,c:GetLevel(),nil,true)
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
else
return ft>-1 and mg:IsExists(cm.mfilterf,1,nil,tp,mg,c)
end
end
function cm.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumEqual(Card.GetRitualLevel,rc:GetLevel(),0,99,rc)
else return false end
end end
function cm.mfilter(c) function cm.mfilter(c)
return c:IsCode(37564765) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsCode(37564765) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
...@@ -46,33 +36,20 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,33 +36,20 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetMZoneCount(tp) return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2)
return ft>-1 and Duel.IsExistingMatchingCard(cm.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
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetMZoneCount(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2,ft) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc) local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2) mg:Merge(mg2)
local mat=nil local mat=Senya.SelectRitualMaterial(tc,mg,tp,tc:GetLevel(),nil,true)
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,7,tc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,cm.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,7,tc)
mat:Merge(mat2)
end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
......
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