Commit 6c25559e authored by 未闻皂名's avatar 未闻皂名

2025/10/11 融合术召唤修改

parent 3064f601
...@@ -13,6 +13,52 @@ RushDuel.MaxFusionMaterialCount = nil ...@@ -13,6 +13,52 @@ RushDuel.MaxFusionMaterialCount = nil
-- 融合召唤的表示形式 -- 融合召唤的表示形式
RushDuel.FusionSummonPosition = POS_FACEUP RushDuel.FusionSummonPosition = POS_FACEUP
-- 添加融合手续: 指定卡名/条件, 固定数量
function RushDuel.AddFusionProcedure(card, sub, insf, ...)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
local vals = {...}
-- 简易融合
if type(insf) ~= "boolean" then
table.insert(vals, 1, insf)
insf = true
end
-- 融合素材替代
if type(sub) ~= "boolean" then
table.insert(vals, 1, sub)
sub = true
end
-- 融合素材
local codes, funcs = RushDuel.MakeFusionMaterial(card, table.unpack(vals))
RushDuel.SetFusionMaterialData(card, codes, #funcs, #funcs)
local rep = table.remove(funcs)
return RushDuel.CreateFusionProcedure(card, sub, insf, funcs, rep, 1, 1, nil)
end
-- 添加融合手续: 指定条件, 不固定数量
function RushDuel.AddFusionProcedureRep(card, sub, insf, func, min, max, ...)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
local vals = {...}
-- 融合素材
local codes, funcs = RushDuel.MakeFusionMaterial(card, table.unpack(vals))
RushDuel.SetFusionMaterialData(card, codes, #funcs + min, #funcs + max)
return RushDuel.CreateFusionProcedure(card, sub, insf, funcs, func, min, max, nil)
end
-- 添加融合手续: 指定条件, 不固定数量
function RushDuel.AddFusionProcedureSP(card, sub, insf, matfilter, matcheck, min, max)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
local insf = (insf ~= false)
local sub = (sub ~= false)
local funcs = {}
return RushDuel.CreateFusionProcedure(card, sub, insf, funcs, matfilter, min, max, matcheck)
end
-- 生成融合素材 -- 生成融合素材
function RushDuel.MakeFusionMaterial(card, ...) function RushDuel.MakeFusionMaterial(card, ...)
local codes = {} local codes = {}
...@@ -81,74 +127,85 @@ function RushDuel.SetFusionMaterialData(card, codes, min, max) ...@@ -81,74 +127,85 @@ function RushDuel.SetFusionMaterialData(card, codes, min, max)
end end
end end
-- 手动添加融合素材列表
function RushDuel.SetFusionMaterial(card, codes, min, max)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
RushDuel.SetFusionMaterialData(card, codes, min, max)
end
-- 创建融合手续 -- 创建融合手续
function RushDuel.CreateFusionProcedure(card, insf, sub, mats, extra, max, checker) function RushDuel.CreateFusionProcedure(card, sub, insf, funcs, rep, min, max, checker)
local e = Effect.CreateEffect(card) local e = Effect.CreateEffect(card)
e:SetType(EFFECT_TYPE_SINGLE) e:SetType(EFFECT_TYPE_SINGLE)
e:SetCode(EFFECT_FUSION_MATERIAL) e:SetCode(EFFECT_FUSION_MATERIAL)
e:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE) e:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e:SetCondition(RushDuel.FusionProcedureCondition(insf, sub, mats, extra, max, checker)) e:SetCondition(RushDuel.FusionProcedureCondition(sub, insf, funcs, rep, min, max, checker))
e:SetOperation(RushDuel.FusionProcedureOperation(insf, sub, mats, extra, max, checker)) e:SetOperation(RushDuel.FusionProcedureOperation(sub, insf, funcs, rep, min, max, checker))
card:RegisterEffect(e) card:RegisterEffect(e)
return e return e
end end
-- 融合手续 - 素材过滤
function RushDuel.FusionProcedureMaterialFilter(c, fc, sub, funcs, rep)
if not c:IsCanBeFusionMaterial(fc, SUMMON_TYPE_FUSION) then
return false
end
for _, func in ipairs(funcs) do
if func(c, fc, sub) then
return true
end
end
if rep and rep(c, fc, sub) then
return true
end
return false
end
-- 融合手续 - 条件 -- 融合手续 - 条件
function RushDuel.FusionProcedureCondition(insf, sub, mats, extra, max, checker) function RushDuel.FusionProcedureCondition(sub, insf, funcs, rep, min, max, checker)
return function(e, g, gc, chkfnf) return function(e, g, gc, chkfnf)
local c = e:GetHandler() local c = e:GetHandler()
local tp = c:GetControler() local tp = c:GetControler()
if g == nil then if g == nil then
return insf and Auxiliary.MustMaterialCheck(nil, tp, EFFECT_MUST_BE_FMATERIAL) return insf and Auxiliary.MustMaterialCheck(nil, tp, EFFECT_MUST_BE_FMATERIAL)
end end
local mg = g:Filter(RushDuel.FusionProcedureMaterialFilter, c, c, sub, mats) local mg = g:Filter(RushDuel.FusionProcedureMaterialFilter, c, c, sub, funcs, rep)
if gc then if gc then
if not mg:IsContains(gc) then if not mg:IsContains(gc) then
return false return false
end end
Duel.SetSelectedCard(gc) Duel.SetSelectedCard(gc)
end end
local minc, maxc = #mats, #mats + max local minc, maxc = #funcs + min, #funcs + max
return mg:CheckSubGroup(RushDuel.FusionProcedureMaterialChecker, minc, maxc, tp, c, chkfnf, sub, mats, extra, max, checker) return mg:CheckSubGroup(RushDuel.FusionProcedureMaterialChecker, minc, maxc, tp, c, chkfnf, sub, funcs, rep, checker)
end end
end end
-- 融合手续 - 操作 -- 融合手续 - 操作
function RushDuel.FusionProcedureOperation(insf, sub, mats, extra, max, checker) function RushDuel.FusionProcedureOperation(sub, insf, funcs, rep, min, max, checker)
return function(e, tp, eg, ep, ev, re, r, rp, gc, chkfnf) return function(e, tp, eg, ep, ev, re, r, rp, gc, chkfnf)
local c = e:GetHandler() local c = e:GetHandler()
local tp = c:GetControler() local tp = c:GetControler()
local mg = eg:Filter(RushDuel.FusionProcedureMaterialFilter, c, c, sub, mats) local mg = eg:Filter(RushDuel.FusionProcedureMaterialFilter, c, c, sub, funcs, rep)
if gc then if gc then
Duel.SetSelectedCard(gc) Duel.SetSelectedCard(gc)
end end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FUSION_MATERIAL) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FUSION_MATERIAL)
local minc, maxc = #mats, #mats + max local minc, maxc = #funcs + min, #funcs + max
if RushDuel.MinFusionMaterialCount ~= nil then if RushDuel.MinFusionMaterialCount ~= nil then
minc = math.max(minc, RushDuel.MinFusionMaterialCount) minc = math.max(minc, RushDuel.MinFusionMaterialCount)
end end
if RushDuel.MaxFusionMaterialCount ~= nil then if RushDuel.MaxFusionMaterialCount ~= nil then
maxc = math.min(maxc, RushDuel.MaxFusionMaterialCount) maxc = math.min(maxc, RushDuel.MaxFusionMaterialCount)
end end
local sg = mg:SelectSubGroup(tp, RushDuel.FusionProcedureMaterialChecker, true, minc, maxc, tp, c, chkfnf, sub, mats, extra, max, checker) local sg = mg:SelectSubGroup(tp, RushDuel.FusionProcedureMaterialChecker, true, minc, maxc, tp, c, chkfnf, sub, funcs, rep, checker)
if sg == nil then if sg == nil then
sg = Group.CreateGroup() sg = Group.CreateGroup()
end end
Duel.SetFusionMaterial(sg) Duel.SetFusionMaterial(sg)
end end
end end
-- 融合手续 - 素材过滤
function RushDuel.FusionProcedureMaterialFilter(c, fc, sub, funcs)
if not c:IsCanBeFusionMaterial(fc, SUMMON_TYPE_FUSION) then
return false
end
for _, func in ipairs(funcs) do
if func(c, fc, sub) then
return true
end
end
return false
end
-- 融合手续 - 素材选择 -- 融合手续 - 素材选择
function RushDuel.FusionProcedureMaterialChecker(mg, tp, fc, chkfnf, sub, mats, extra, max, checker) function RushDuel.FusionProcedureMaterialChecker(mg, tp, fc, chkfnf, sub, funcs, rep, checker)
local chkf = chkfnf & 0xff local chkf = chkfnf & 0xff
if mg:IsExists(Auxiliary.TuneMagicianCheckX, 1, nil, mg, EFFECT_TUNE_MAGICIAN_F) then if mg:IsExists(Auxiliary.TuneMagicianCheckX, 1, nil, mg, EFFECT_TUNE_MAGICIAN_F) then
return false return false
...@@ -164,98 +221,29 @@ function RushDuel.FusionProcedureMaterialChecker(mg, tp, fc, chkfnf, sub, mats, ...@@ -164,98 +221,29 @@ function RushDuel.FusionProcedureMaterialChecker(mg, tp, fc, chkfnf, sub, mats,
return false return false
else else
local sg = Group.CreateGroup() local sg = Group.CreateGroup()
return mg:IsExists(RushDuel.FusionProcedureCheckStep, 1, nil, mg, sg, fc, sub, extra, max, table.unpack(mats)) return mg:IsExists(RushDuel.FusionProcedureCheckStep, 1, nil, mg, sg, fc, sub, rep, table.unpack(funcs))
end end
end end
-- 融合手续 - 素材组合 -- 融合手续 - 素材组合
function RushDuel.FusionProcedureCheckStep(c, mg, sg, fc, sub, extra, max, fun1, fun2, ...) function RushDuel.FusionProcedureCheckStep(c, mg, sg, fc, sub, rep, func, ...)
local res = false local res = false
if fun2 then if func then
sg:AddCard(c) sg:AddCard(c)
if fun1(c, fc, false, mg, sg) then if func(c, fc, false, mg, sg) then
res = mg:IsExists(RushDuel.FusionProcedureCheckStep, 1, sg, mg, sg, fc, sub, extra, max, fun2, ...) res = mg:IsExists(RushDuel.FusionProcedureCheckStep, 1, sg, mg, sg, fc, sub, rep, ...)
elseif sub and fun1(c, fc, true, mg, sg) then elseif sub and func(c, fc, true, mg, sg) then
res = mg:IsExists(RushDuel.FusionProcedureCheckStep, 1, sg, mg, sg, fc, false, extra, max, fun2, ...) res = mg:IsExists(RushDuel.FusionProcedureCheckStep, 1, sg, mg, sg, fc, false, rep, ...)
end end
sg:RemoveCard(c) sg:RemoveCard(c)
elseif fun1(c, fc, sub, mg, sg) then return res
if extra == nil or max == 0 then elseif rep then
return true local eg = mg:Clone()
end
-- 额外的素材选择
local eg = Group.CreateGroup()
eg:Merge(mg)
eg:Sub(sg) eg:Sub(sg)
eg:RemoveCard(c) return eg:FilterCount(rep, nil, fc, false, mg, sg) == #eg
return eg:FilterCount(extra, nil, fc, false, mg, sg) == #eg
end end
return res return res
end end
-- 添加融合手续: 指定卡名/条件, 固定数量
function RushDuel.AddFusionProcedure(card, sub, insf, ...)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
local vals = {...}
-- 简易融合
if type(insf) ~= "boolean" then
table.insert(vals, 1, insf)
insf = true
end
-- 融合素材替代
if type(sub) ~= "boolean" then
table.insert(vals, 1, sub)
sub = true
end
-- 融合素材
local codes, funcs = RushDuel.MakeFusionMaterial(card, table.unpack(vals))
RushDuel.SetFusionMaterialData(card, codes, #funcs, #funcs)
return RushDuel.CreateFusionProcedure(card, insf, sub, funcs, nil, 0, nil)
end
-- 添加融合手续: 指定条件, 不固定数量
function RushDuel.AddFusionProcedureSP(card, matfilter, matcheck, min, max, sub, insf)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
local insf = (insf ~= false)
local sub = (sub ~= false)
local funcs = {}
for i = 1, min do
table.insert(funcs, matfilter)
end
return RushDuel.CreateFusionProcedure(card, insf, sub, funcs, matfilter, max - #funcs, matcheck)
end
-- 添加融合手续: 指定条件, 不固定数量
function RushDuel.AddFusionProcedureRep(card, insf, sub, func, min, max, ...)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
local vals = {...}
for i = 1, min do
table.insert(vals, func)
end
-- 融合素材
local codes, funcs = RushDuel.MakeFusionMaterial(card, table.unpack(vals))
RushDuel.SetFusionMaterialData(card, codes, #funcs + min, #funcs + max)
return RushDuel.CreateFusionProcedure(card, insf, sub, funcs, func, max - min, nil)
end
-- 手动添加融合素材列表
function RushDuel.SetFusionMaterial(card, codes, min, max)
if card:IsStatus(STATUS_COPYING_EFFECT) then
return
end
RushDuel.SetFusionMaterialData(card, codes, min, max)
end
-- 获取融合素材的卡名
function RushDuel.GetFusionMaterialCodes(card)
return card.material_codes or {}
end
-- 可以进行接触融合术 -- 可以进行接触融合术
function RushDuel.EnableContactFusion(card, desc) function RushDuel.EnableContactFusion(card, desc)
local e = Effect.CreateEffect(card) local e = Effect.CreateEffect(card)
...@@ -555,6 +543,18 @@ function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range, ...@@ -555,6 +543,18 @@ function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range,
return fc return fc
end end
-- 设置进行融合召唤的素材数量限制 (需要使用 Property 和 Label)
function RushDuel.SetFusionSummonMaterialCount(e, min, max)
e:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e:SetLabel(min, max)
end
-- 重置进行融合召唤的素材数量限制 (需要使用 Property 和 Label)
function RushDuel.ResetFusionSummonMaterialCount(e)
e:SetProperty(0)
e:SetLabel(0)
end
-- 素材去向: 墓地 -- 素材去向: 墓地
function RushDuel.FusionToGrave(tp, mat) function RushDuel.FusionToGrave(tp, mat)
Duel.SendtoGrave(mat, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION) Duel.SendtoGrave(mat, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION)
...@@ -576,6 +576,11 @@ function RushDuel.FusionToDeckBottom(tp, mat) ...@@ -576,6 +576,11 @@ function RushDuel.FusionToDeckBottom(tp, mat)
Auxiliary.PlaceCardsOnDeckBottom(tp, mat, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION) Auxiliary.PlaceCardsOnDeckBottom(tp, mat, REASON_EFFECT + REASON_MATERIAL + REASON_FUSION)
end end
-- 获取融合素材的卡名
function RushDuel.GetFusionMaterialCodes(card)
return card.material_codes or {}
end
-- 宣言融合素材的卡名 -- 宣言融合素材的卡名
function RushDuel.AnnounceFusionMaterialCode(player, card) function RushDuel.AnnounceFusionMaterialCode(player, card)
local codes = card.material_codes or {} local codes = card.material_codes or {}
......
...@@ -5,7 +5,9 @@ function cm.initial_effect(c) ...@@ -5,7 +5,9 @@ function cm.initial_effect(c)
local e1=RD.CreateFusionEffect(c,cm.matfilter,nil,nil,0,0,cm.matcheck) local e1=RD.CreateFusionEffect(c,cm.matfilter,nil,nil,0,0,cm.matcheck)
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:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetLabel(2,2)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -37,9 +37,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,9 +37,8 @@ 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)
local matcheck=function(tp,sg,fc) RD.SetFusionSummonMaterialCount(e,2,2)
return sg:IsContains(e:GetHandler()) and sg:GetCount()==2 RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,true,true)
end RD.ResetFusionSummonMaterialCount(e)
RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,matcheck,RD.FusionToDeck,e,tp,true)
end end
end end
\ No newline at end of file
...@@ -34,9 +34,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,9 +34,8 @@ 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)
local matcheck=function(tp,sg,fc) RD.SetFusionSummonMaterialCount(e,2,2)
return sg:IsContains(e:GetHandler()) and sg:GetCount()==2 RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck,e,tp,true,true)
end RD.ResetFusionSummonMaterialCount(e)
RD.CanFusionSummon(aux.Stringid(m,2),cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,matcheck,RD.FusionToDeck,e,tp,true)
end end
end end
\ No newline at end of file
...@@ -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 Material --Fusion Material
RD.AddFusionProcedureSP(c,cm.matfilter,cm.check,2,3) RD.AddFusionProcedureSP(c,true,true,cm.matfilter,cm.check,2,3)
RD.SetFusionMaterial(c,{list[1]},3,3) RD.SetFusionMaterial(c,{list[1]},3,3)
end end
--Fusion Material --Fusion Material
......
...@@ -6,6 +6,8 @@ function cm.initial_effect(c) ...@@ -6,6 +6,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,3)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
......
...@@ -8,6 +8,8 @@ function cm.initial_effect(c) ...@@ -8,6 +8,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
...@@ -15,7 +17,7 @@ function cm.matfilter(c) ...@@ -15,7 +17,7 @@ function cm.matfilter(c)
return c:IsFusionCode(list[1],list[2],list[3]) return c:IsFusionCode(list[1],list[2],list[3])
end end
function cm.matcheck(tp,sg,fc) function cm.matcheck(tp,sg,fc)
return sg:IsExists(cm.matfilter,1,nil) and sg:GetCount()==2 return sg:IsExists(cm.matfilter,1,nil)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc) function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
if not fc:IsType(TYPE_EFFECT) then if not fc:IsType(TYPE_EFFECT) then
......
...@@ -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 Material --Fusion Material
RD.AddFusionProcedureSP(c,cm.matfilter,cm.check,2,3) RD.AddFusionProcedureSP(c,true,true,cm.matfilter,cm.check,2,3)
RD.SetFusionMaterial(c,{list[1]},3,3) RD.SetFusionMaterial(c,{list[1]},3,3)
--Indes --Indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -32,7 +32,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end 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.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,true)
RD.ResetFusionSummonMaterialCount(e)
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)
......
...@@ -35,6 +35,8 @@ end ...@@ -35,6 +35,8 @@ 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(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.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)
RD.ResetFusionSummonMaterialCount(e)
end) end)
end end
\ No newline at end of file
...@@ -6,6 +6,8 @@ function cm.initial_effect(c) ...@@ -6,6 +6,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
......
...@@ -6,7 +6,8 @@ function cm.initial_effect(c) ...@@ -6,7 +6,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DRAW) e1:SetCode(EVENT_DRAW)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
......
...@@ -5,7 +5,9 @@ function cm.initial_effect(c) ...@@ -5,7 +5,9 @@ function cm.initial_effect(c)
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,cm.matcheck) local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,cm.matcheck)
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:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetLabel(2,2)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -6,6 +6,8 @@ function cm.initial_effect(c) ...@@ -6,6 +6,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,2)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
......
...@@ -6,6 +6,8 @@ function cm.initial_effect(c) ...@@ -6,6 +6,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,2)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
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 Material --Fusion Material
RD.AddFusionProcedureSP(c,cm.matfilter,cm.check,2,3) RD.AddFusionProcedureSP(c,true,true,cm.matfilter,cm.check,2,3)
RD.SetFusionMaterial(c,{list[1]},3,3) RD.SetFusionMaterial(c,{list[1]},3,3)
--Indes --Indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -25,9 +25,6 @@ end ...@@ -25,9 +25,6 @@ end
function cm.matfilter(c) function cm.matfilter(c)
return not RD.IsMaximumMode(c) and c:GetBaseDefense()==1200 and c:IsFusionAttribute(ATTRIBUTE_WIND) return not RD.IsMaximumMode(c) and c:GetBaseDefense()==1200 and c:IsFusionAttribute(ATTRIBUTE_WIND)
end end
function cm.matcheck(tp,sg,fc)
return sg:GetCount()==2
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)) return (RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c))
...@@ -41,7 +38,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +38,9 @@ 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)
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.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,cm.matcheck,RD.FusionToGrave,e,tp) RD.SetFusionSummonMaterialCount(e,2,2)
RD.CanFusionSummon(aux.Stringid(m,1),cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp)
RD.ResetFusionSummonMaterialCount(e)
end end
end) end)
end end
\ No newline at end of file
...@@ -8,6 +8,8 @@ function cm.initial_effect(c) ...@@ -8,6 +8,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetLabel(2,2)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -21,9 +21,6 @@ end ...@@ -21,9 +21,6 @@ end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsRace(RACE_GALAXY) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsRace(RACE_GALAXY) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function cm.matcheck(tp,sg,fc)
return sg:GetCount()<=9
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c) return RD.IsSummonTurn(c) or RD.IsSpecialSummonTurn(c)
...@@ -36,7 +33,9 @@ end ...@@ -36,7 +33,9 @@ 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_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.CanFusionSummon(aux.Stringid(m,1),aux.FALSE,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,true) 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.ResetFusionSummonMaterialCount(e)
end end
end) end)
if Duel.GetFlagEffect(tp,m)~=0 then return end if Duel.GetFlagEffect(tp,m)~=0 then return 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