Commit e41b8ebe authored by 未闻皂名's avatar 未闻皂名

2025/10/16 融合术召唤添加表示形式的参数,仪式术召唤添加额外的素材要求

parent 6a9eca7a
...@@ -284,6 +284,33 @@ end ...@@ -284,6 +284,33 @@ end
function RushDuel.CostSendHandOrFieldSubToGrave(filter, check, min, max, except_self, set_label_before, set_object_before, set_label_after, set_object_after) function RushDuel.CostSendHandOrFieldSubToGrave(filter, check, min, max, except_self, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendGroupToGrave(filter, check, LOCATION_HAND + LOCATION_ONFIELD, min, max, except_self, false, false, set_label_before, set_object_before, set_label_after, set_object_after) return RushDuel.CostSendGroupToGrave(filter, check, LOCATION_HAND + LOCATION_ONFIELD, min, max, except_self, false, false, set_label_before, set_object_before, set_label_after, set_object_after)
end end
-- 代价: 让自己场上表侧表示的这张卡回到卡组
function RushDuel.CostSendSelfToDeck()
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return e:GetHandler():IsAbleToDeckAsCost()
end
RushDuel.SendToDeckSort(e:GetHandler(), SEQ_DECKSHUFFLE, REASON_COST, tp)
end
end
-- 代价: 让自己场上表侧表示的这张卡回到卡组上面
function RushDuel.CostSendSelfToDeckTop()
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return e:GetHandler():IsAbleToDeckAsCost()
end
RushDuel.SendToDeckSort(e:GetHandler(), SEQ_DECKTOP, REASON_COST, tp)
end
end
-- 代价: 让自己场上表侧表示的这张卡回到卡组下面
function RushDuel.CostSendSelfToDeckBottom()
return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return e:GetHandler():IsAbleToDeckAsCost()
end
RushDuel.SendToDeckSort(e:GetHandler(), SEQ_DECKBOTTOM, REASON_COST, tp)
end
end
-- 代价: 让怪兽返回卡组 -- 代价: 让怪兽返回卡组
function RushDuel.CostSendMZoneToDeck(filter, min, max, except_self, set_label_before, set_object_before, set_label_after, set_object_after) function RushDuel.CostSendMZoneToDeck(filter, min, max, except_self, set_label_before, set_object_before, set_label_after, set_object_after)
return RushDuel.CostSendMatchToDeckSort(filter, LOCATION_MZONE, min, max, except_self, SEQ_DECKSHUFFLE, true, false, set_label_before, set_object_before, set_label_after, set_object_after) return RushDuel.CostSendMatchToDeckSort(filter, LOCATION_MZONE, min, max, except_self, SEQ_DECKSHUFFLE, true, false, set_label_before, set_object_before, set_label_after, set_object_after)
......
This diff is collapsed.
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
RushDuel = RushDuel or {} RushDuel = RushDuel or {}
-- 当前的仪式效果 -- 当前的仪式效果
RushDuel.CurrentRitualEffect = nil RushDuel.CurrentRitualEffect = nil
-- 额外的仪式素材过滤
RushDuel.RitualExtraMaterialFilter = nil
-- 额外的仪式检测 -- 额外的仪式检测
RushDuel.RitualExtraChecker = nil RushDuel.RitualExtraChecker = nil
...@@ -44,8 +46,8 @@ function RushDuel.CreateRitualEffect(card, type, matfilter, spfilter, exfilter, ...@@ -44,8 +46,8 @@ function RushDuel.CreateRitualEffect(card, type, matfilter, spfilter, exfilter,
local include = including_self or false local include = including_self or false
local leave = self_leave or false local leave = self_leave or false
local e = Effect.CreateEffect(card) local e = Effect.CreateEffect(card)
e:SetTarget(RushDuel.RitualTarget(type, matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, include, leave, target_action)) e:SetTarget(RushDuel.RitualTarget(card, type, matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, include, leave, target_action))
e:SetOperation(RushDuel.RitualOperation(type, matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, move, include, leave, operation_action, limit_action)) e:SetOperation(RushDuel.RitualOperation(card, type, matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, move, include, leave, operation_action, limit_action))
return e return e
end end
-- 仪式召唤 - 类型素材过滤 -- 仪式召唤 - 类型素材过滤
...@@ -205,6 +207,9 @@ function RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter ...@@ -205,6 +207,9 @@ function RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter
if including_self then if including_self then
gc = e:GetHandler() gc = e:GetHandler()
end end
if RushDuel.RitualExtraMaterialFilter then
mg = mg:Filter(RushDuel.RitualExtraMaterialFilter, nil, e, tp, mg)
end
local sg = Duel.GetMatchingGroup(RushDuel.RitualSpecialSummonFilter, tp, LOCATION_EXTRA, 0, nil, e, tp, type, mg, nil, gc, chkf, spfilter) local sg = Duel.GetMatchingGroup(RushDuel.RitualSpecialSummonFilter, tp, LOCATION_EXTRA, 0, nil, e, tp, type, mg, nil, gc, chkf, spfilter)
local list = {} local list = {}
local ritualable = false local ritualable = false
...@@ -296,10 +301,13 @@ function RushDuel.IsCanRitualSummon(e, tp, type, matfilter, spfilter, exfilter, ...@@ -296,10 +301,13 @@ function RushDuel.IsCanRitualSummon(e, tp, type, matfilter, spfilter, exfilter,
return ritualable return ritualable
end end
-- 仪式召唤 - 目标 -- 仪式召唤 - 目标
function RushDuel.RitualTarget(type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, target_action) function RushDuel.RitualTarget(card, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, action)
return function(e, tp, eg, ep, ev, re, r, rp, chk) return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
return RushDuel.IsCanRitualSummon(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, nil) RushDuel.RitualExtraMaterialFilter = card.ritual_mat_filter
local res = RushDuel.IsCanRitualSummon(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, nil)
RushDuel.RitualExtraMaterialFilter = nil
return res
end end
if action ~= nil then if action ~= nil then
action(e, tp, eg, ep, ev, re, r, rp) action(e, tp, eg, ep, ev, re, r, rp)
...@@ -308,8 +316,9 @@ function RushDuel.RitualTarget(type, matfilter, spfilter, exfilter, s_range, o_r ...@@ -308,8 +316,9 @@ function RushDuel.RitualTarget(type, matfilter, spfilter, exfilter, s_range, o_r
end end
end end
-- 仪式召唤 - 处理 -- 仪式召唤 - 处理
function RushDuel.RitualOperation(type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, including_self, self_leave, action, limit) function RushDuel.RitualOperation(card, type, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, including_self, self_leave, action, limit)
return function(e, tp, eg, ep, ev, re, r, rp) return function(e, tp, eg, ep, ev, re, r, rp)
RushDuel.RitualExtraMaterialFilter = card.ritual_mat_filter
RushDuel.RitualExtraChecker = RushDuel.RitualCheckLocation(e, self_leave, mat_check) RushDuel.RitualExtraChecker = RushDuel.RitualCheckLocation(e, self_leave, mat_check)
local ritualable, list, chkf, gc = RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, nil, e) local ritualable, list, chkf, gc = RushDuel.GetRitualSummonData(e, tp, type, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, nil, e)
if ritualable then if ritualable then
...@@ -318,6 +327,7 @@ function RushDuel.RitualOperation(type, matfilter, spfilter, exfilter, s_range, ...@@ -318,6 +327,7 @@ function RushDuel.RitualOperation(type, matfilter, spfilter, exfilter, s_range,
action(e, tp, eg, ep, ev, re, r, rp, mat, fc) action(e, tp, eg, ep, ev, re, r, rp, mat, fc)
end end
end end
RushDuel.RitualExtraMaterialFilter = nil
RushDuel.RitualExtraChecker = nil RushDuel.RitualExtraChecker = nil
if limit ~= nil then if limit ~= nil then
limit(e, tp, eg, ep, ev, re, r, rp) limit(e, tp, eg, ep, ev, re, r, rp)
......
local cm,m=GetID()
local list={120109057}
cm.name="救援兔"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(4)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.check(g)
return g:GetClassCount(Card.GetRace)==g:GetCount()
end
cm.cost=RD.CostSendSelfToDeckBottom()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>1
and mg:CheckSubGroup(cm.check,2,2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectGroupAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),cm.check,tp,LOCATION_GRAVE,0,2,2,nil,e,POS_FACEUP)~=0 then
local g=Duel.GetOperatedGroup()
g:ForEach(function(tc)
RD.AttachEndPhase(e,tc,tp,m,cm.desop,aux.Stringid(m,1))
end)
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,2),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return RD.IsLegendCode(tc,list[1])
end
\ No newline at end of file
...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.SetFusionSummonMaterialCount(e,2,2) RD.SetFusionSummonMaterialCount(e,2,2)
RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,true,true) RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,POS_FACEUP,true,true)
RD.ResetFusionSummonMaterialCount(e) RD.ResetFusionSummonMaterialCount(e)
end end
end end
\ No newline at end of file
...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.SetFusionSummonMaterialCount(e,2,2) RD.SetFusionSummonMaterialCount(e,2,2)
RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,true,true) RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,POS_FACEUP,true,true)
RD.ResetFusionSummonMaterialCount(e) RD.ResetFusionSummonMaterialCount(e)
end end
end end
\ No newline at end of file
...@@ -2,7 +2,7 @@ local cm,m=GetID() ...@@ -2,7 +2,7 @@ local cm,m=GetID()
cm.name="暗冥矮星" cm.name="暗冥矮星"
function cm.initial_effect(c) function cm.initial_effect(c)
--Fusion Summon --Fusion Summon
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,nil,nil,nil,nil,nil,true) local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,nil,nil,nil,nil,nil,nil,true)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
...@@ -19,6 +19,6 @@ function cm.spfilter(c) ...@@ -19,6 +19,6 @@ function cm.spfilter(c)
end end
function cm.costfilter(c,e,tp) function cm.costfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_GALAXY) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsRace(RACE_GALAXY) and c:IsAbleToGraveAsCost()
and RD.IsCanFusionSummon(e,tp,cm.matfilter,cm.spfilter,nil,0,0,nil,true,false,c) and RD.IsCanFusionSummon(e,tp,POS_FACEUP,cm.matfilter,cm.spfilter,nil,0,0,nil,true,false,c)
end end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,true) cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1,true)
\ No newline at end of file
...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoGrave(g,REASON_EFFECT)==0 then return end if Duel.SendtoGrave(g,REASON_EFFECT)==0 then return end
RD.CanSelectGroupAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(cm.filter),cm.check,tp,LOCATION_GRAVE,0,3,3,nil,function(sg) RD.CanSelectGroupAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(cm.filter),cm.check,tp,LOCATION_GRAVE,0,3,3,nil,function(sg)
if RD.SendToDeckAndExists(sg,e,tp,REASON_EFFECT) then if RD.SendToDeckAndExists(sg,e,tp,REASON_EFFECT) then
RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,cm.spfilter,cm.exfilter,0,LOCATION_MZONE,nil,RD.FusionToGrave,e,tp) RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,cm.spfilter,cm.exfilter,0,LOCATION_MZONE,nil,RD.FusionToGrave,e,tp,POS_FACEUP)
end end
end) end)
end) end)
......
...@@ -39,7 +39,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end end
pos=Duel.SelectPosition(tp,tc,pos) pos=Duel.SelectPosition(tp,tc,pos)
if RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)~=0 then if RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)~=0 then
RD.CanFusionSummon(aux.Stringid(m,1),nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end) end)
end end
\ No newline at end of file
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,2,nil,function(g) RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,2,nil,function(g)
if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end) end)
end end
\ No newline at end of file
...@@ -25,6 +25,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,6 +25,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -25,6 +25,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,6 +25,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -25,6 +25,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,6 +25,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -33,7 +33,7 @@ end ...@@ -33,7 +33,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.filter,1-tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEDOWN_DEFENSE)~=0 then if RD.SelectAndSpecialSummon(cm.filter,1-tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEDOWN_DEFENSE)~=0 then
RD.SetFusionSummonMaterialCount(e,2,2) RD.SetFusionSummonMaterialCount(e,2,2)
RD.CanFusionSummon(aux.Stringid(m,1),aux.FALSE,nil,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),aux.FALSE,nil,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,POS_FACEUP,true)
RD.ResetFusionSummonMaterialCount(e) RD.ResetFusionSummonMaterialCount(e)
end end
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
......
...@@ -40,6 +40,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,6 +40,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw() then if RD.Draw() then
RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -28,7 +28,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end) end)
elseif d>=2 and d<=6 then elseif d>=2 and d<=6 then
local fc=RD.FusionSummon(cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp) local fc=RD.FusionSummon(cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP)
if fc and fc:IsFaceup() and d==5 or d==6 then if fc and fc:IsFaceup() and d==5 or d==6 then
RD.AttachEffectIndes(e,fc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,fc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
......
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,cm.filter,tp,LOCATION_HAND,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_TOGRAVE,cm.filter,tp,LOCATION_HAND,0,1,1,nil,function(g)
if RD.SendToGraveAndExists(g) and Duel.GetFusionMaterial(tp):IsExists(cm.matfilter,1,nil) then if RD.SendToGraveAndExists(g) and Duel.GetFusionMaterial(tp):IsExists(cm.matfilter,1,nil) then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,POS_FACEUP,true)
end end
end) end)
end end
...@@ -4,7 +4,7 @@ cm.name="变形史莱姆-恶魔龙形态" ...@@ -4,7 +4,7 @@ cm.name="变形史莱姆-恶魔龙形态"
function cm.initial_effect(c) function cm.initial_effect(c)
RD.AddCodeList(c,list) RD.AddCodeList(c,list)
--Fusion Summon --Fusion Summon
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter,nil,0,0,nil,nil,nil,nil,nil,false,true) local e1=RD.CreateFusionEffect(c,nil,cm.spfilter,nil,0,0,nil,nil,nil,nil,nil,nil,false,true)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -36,7 +36,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachEffectIndes(e,g:GetFirst(),cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,g:GetFirst(),cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.SetFusionSummonMaterialCount(e,2,2) RD.SetFusionSummonMaterialCount(e,2,2)
RD.CanFusionSummon(aux.Stringid(m,3),aux.FALSE,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp) RD.CanFusionSummon(aux.Stringid(m,3),aux.FALSE,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,POS_FACEUP)
RD.ResetFusionSummonMaterialCount(e) RD.ResetFusionSummonMaterialCount(e)
end) end)
end end
\ No newline at end of file
...@@ -15,7 +15,7 @@ end ...@@ -15,7 +15,7 @@ end
function cm.costfilter(c,e,tp) function cm.costfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and c:IsType(TYPE_NORMAL) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and c:IsType(TYPE_NORMAL)
and c:IsAbleToDeckOrExtraAsCost() and c:IsAbleToDeckOrExtraAsCost()
and RD.IsCanFusionSummon(e,tp,aux.FALSE,cm.spfilter,cm.matfilter,LOCATION_GRAVE,0,cm.matcheck,false,false,c) and RD.IsCanFusionSummon(e,tp,POS_FACEUP,aux.FALSE,cm.spfilter,cm.matfilter,LOCATION_GRAVE,0,cm.matcheck,false,false,c)
end end
function cm.matfilter(c) function cm.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY)
......
...@@ -34,6 +34,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,6 +34,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 then if RD.Damage()~=0 then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end end
\ No newline at end of file
local cm,m=GetID() local cm,m=GetID()
local list={120235003} local list={120235003}
cm.name="THE☆VS融合" cm.name="THE☆对决融合"
function cm.initial_effect(c) function cm.initial_effect(c)
RD.AddCodeList(c,list) RD.AddCodeList(c,list)
--Activate --Activate
......
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
end) end)
end end
\ No newline at end of file
...@@ -10,10 +10,12 @@ function cm.initial_effect(c) ...@@ -10,10 +10,12 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.ritual_mat_filter(c)
return not c:IsLocation(LOCATION_HAND) or c:IsType(TYPE_EFFECT)
end
--Activate --Activate
function cm.matfilter(c) function cm.matfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_AQUA) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_AQUA)
and (c:IsOnField() or not c:IsType(TYPE_EFFECT))
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:IsCode(list[1],list[2]) return c:IsCode(list[1],list[2])
......
...@@ -28,7 +28,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeRace(e,c,RACE_GALAXY,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeRace(e,c,RACE_GALAXY,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanFusionSummon(aux.Stringid(m,1),nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_GALAXY,tp,1,0,RESET_PHASE+PHASE_END) RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_GALAXY,tp,1,0,RESET_PHASE+PHASE_END)
......
...@@ -39,7 +39,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
if not Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then if not Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.SetFusionSummonMaterialCount(e,2,2) RD.SetFusionSummonMaterialCount(e,2,2)
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP)
RD.ResetFusionSummonMaterialCount(e) RD.ResetFusionSummonMaterialCount(e)
end end
end) end)
......
...@@ -27,7 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Recover()~=0 then if RD.Recover()~=0 then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,POS_FACEUP,true)
end end
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END) RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END)
......
...@@ -10,10 +10,12 @@ function cm.initial_effect(c) ...@@ -10,10 +10,12 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.ritual_mat_filter(c)
return not c:IsLocation(LOCATION_HAND) or c:IsType(TYPE_EFFECT)
end
--Activate --Activate
function cm.matfilter(c) function cm.matfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_AQUA) return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_AQUA)
and (c:IsOnField() or not c:IsType(TYPE_EFFECT))
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:IsCode(list[1],list[2]) return c:IsCode(list[1],list[2])
......
...@@ -38,9 +38,7 @@ end ...@@ -38,9 +38,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,2,3,nil,function(g) RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,2,3,nil,function(g)
if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then if RD.SendToHandAndExists(g,e,tp,REASON_EFFECT) then
RD.FusionSummonPosition=POS_FACEUP_ATTACK RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToDeck,e,tp,POS_FACEUP_ATTACK,true)
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToDeck,e,tp,true)
RD.FusionSummonPosition=POS_FACEUP
end end
end) end)
end end
\ No newline at end of file
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(HINTMSG_TOGRAVE,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if RD.SendToGraveAndExists(g) then if RD.SendToGraveAndExists(g) then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,POS_FACEUP,true)
end end
end) end)
end end
\ No newline at end of file
...@@ -34,7 +34,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,LOCATION_MZONE,0,1,3,nil,function(g) RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,LOCATION_MZONE,0,1,3,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.SetFusionSummonMaterialCount(e,2,9) RD.SetFusionSummonMaterialCount(e,2,9)
RD.CanFusionSummon(aux.Stringid(m,1),aux.FALSE,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,true) RD.CanFusionSummon(aux.Stringid(m,1),aux.FALSE,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,POS_FACEUP,true)
RD.ResetFusionSummonMaterialCount(e) RD.ResetFusionSummonMaterialCount(e)
end end
end) end)
......
...@@ -6,17 +6,17 @@ function cm.initial_effect(c) ...@@ -6,17 +6,17 @@ function cm.initial_effect(c)
--Fake Legend --Fake Legend
RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE) RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE)
--Activate --Activate
local e1=RD.CreateRitualEffect(c,RITUAL_ORIGINAL_LEVEL_GREATER,cm.matfilter,cm.spfilter) local e1=RD.CreateRitualEffect(c,RITUAL_ORIGINAL_LEVEL_GREATER,nil,cm.spfilter)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,list[1]+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,list[1]+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate function cm.ritual_mat_filter(c)
function cm.matfilter(c) return not c:IsLocation(LOCATION_HAND) or RD.IsLegendCard(c)
return c:IsOnField() or RD.IsLegendCard(c)
end end
--Activate
function cm.spfilter(c) function cm.spfilter(c)
return c:IsCode(list[1]) return c:IsCode(list[1])
end end
\ No newline at end of file
...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_GRAVE,0,1,nil) if Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_GRAVE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_GRAVE,0,1,nil) then and not Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_GRAVE,0,1,nil) then
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToDeck,e,tp) RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,cm.spfilter,nil,0,0,nil,RD.FusionToDeck,e,tp,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
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