Commit 06df4796 authored by 未闻皂名's avatar 未闻皂名

2024/12/21 bug修复

parent d7be6651
Pipeline #31904 passed with stages
in 9 minutes and 33 seconds
No preview for this file type
......@@ -24,7 +24,6 @@ EFFECT_ONLY_FUSION_SUMMON = 120263031 -- 只能融合召唤 (奇迹融合)
EFFECT_MAXIMUM_MODE = 120272058 -- 通过效果变成极大模式 (时间机器)
EFFECT_CANNOT_TO_HAND_EFFECT = 120274001 -- 不会被效果回到手卡
EFFECT_CANNOT_TO_DECK_EFFECT = 120274002 -- 不会被效果回到卡组·额外卡组
EFFECT_SP_FUSION_CODE = 120277007 -- 使用特定效果融合时, 改变卡名
FLAG_SUMMON_TURN = 120000011 -- 召唤·特殊召唤的回合被盖放, 不再符合召唤·特殊召唤的回合的条件
FLAG_ATTACK_ANNOUNCED = 120000012 -- 已经进行了攻击宣言, 不能向怪兽攻击的效果失效
......
......@@ -191,8 +191,8 @@ function RushDuel.FusionProcedureChecker(condition, checker)
if not Auxiliary.MustMaterialCheck(sg, tp, EFFECT_MUST_BE_FMATERIAL) then
return false
end
return condition(sg, fc, sub, ...) and (chkf == PLAYER_NONE or Duel.GetLocationCountFromEx(tp, tp, sg, fc) > 0) and (not checker or checker(sg, tp, fc, chkf)) and
(not Auxiliary.FCheckAdditional or Auxiliary.FCheckAdditional(tp, sg, fc)) and (not Auxiliary.FGoalCheckAdditional or Auxiliary.FGoalCheckAdditional(tp, sg, fc))
return condition(sg, fc, sub, ...) and (not checker or checker(sg, tp, fc, chkf)) and (not Auxiliary.FCheckAdditional or Auxiliary.FCheckAdditional(tp, sg, fc, chkf)) and
(not Auxiliary.FGoalCheckAdditional or Auxiliary.FGoalCheckAdditional(tp, sg, fc))
end
end
-- 融合手续 - 条件
......@@ -240,14 +240,15 @@ function RushDuel.FusionProcedureOperation(insf, sub, checker, min, max, ...)
end
-- 创建效果: 融合术/结合 召唤
function RushDuel.CreateFusionEffect(card, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, target_action, operation_action, including_self, limit_action)
function RushDuel.CreateFusionEffect(card, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, target_action, operation_action, limit_action, including_self, self_leave)
local self_range = s_range or 0
local opponent_range = o_range or 0
local move = mat_move or RushDuel.FusionToGrave
local include = including_self or false
local leave = self_leave or false
local e = Effect.CreateEffect(card)
e:SetTarget(RushDuel.FusionTarget(matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, include, target_action))
e:SetOperation(RushDuel.FusionOperation(matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, move, include, operation_action, limit_action))
e:SetTarget(RushDuel.FusionTarget(matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, include, leave, target_action))
e:SetOperation(RushDuel.FusionOperation(matfilter, spfilter, exfilter, self_range, opponent_range, mat_check, move, include, leave, operation_action, limit_action))
return e
end
-- 融合效果 - 素材过滤
......@@ -264,8 +265,13 @@ function RushDuel.ConfirmCardFilter(c)
return c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown())
end
-- 融合效果 - 获取融合素材与融合怪兽
function RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, except, effect)
function RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, except, effect)
local chkf = tp
if except and self_leave then
except:AddCard(e:GetHandler())
elseif self_leave then
except = e:GetHandler()
end
local mg = Duel.GetFusionMaterial(tp):Filter(RushDuel.FusionMaterialFilter, except, matfilter, effect)
if s_range ~= 0 or o_range ~= 0 then
local ext = Duel.GetMatchingGroup(aux.NecroValleyFilter(exfilter), tp, s_range, o_range, except, effect)
......@@ -342,18 +348,34 @@ function RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
fc:CompleteProcedure()
return fc, mat
end
function RushDuel.FusionCheckAdditional(e, self_leave)
return function(tp, sg, fc, chkf)
if chkf == PLAYER_NONE then
return true
end
if self_leave then
local mg = Group.FromCards(e:GetHandler())
mg:Merge(sg)
return Duel.GetLocationCountFromEx(tp, tp, mg, fc) > 0
else
return Duel.GetLocationCountFromEx(tp, tp, sg, fc) > 0
end
end
end
-- 判断条件: 是否可以进行融合召唤
function RushDuel.IsCanFusionSummon(e, tp, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, except)
function RushDuel.IsCanFusionSummon(e, tp, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, except)
Auxiliary.FCheckAdditional = RushDuel.FusionCheckAdditional(e, self_leave)
Auxiliary.FGoalCheckAdditional = mat_check
local fusionable = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, except)
local fusionable = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, except)
Auxiliary.FCheckAdditional = nil
Auxiliary.FGoalCheckAdditional = nil
return fusionable
end
-- 融合效果 - 目标
function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, action)
function RushDuel.FusionTarget(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)
if chk == 0 then
return RushDuel.IsCanFusionSummon(e, tp, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, nil)
return RushDuel.IsCanFusionSummon(e, tp, matfilter, spfilter, exfilter, s_range, o_range, mat_check, including_self, self_leave, nil)
end
if action ~= nil then
action(e, tp, eg, ep, ev, re, r, rp)
......@@ -362,16 +384,18 @@ function RushDuel.FusionTarget(matfilter, spfilter, exfilter, s_range, o_range,
end
end
-- 融合效果 - 操作
function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, including_self, action, limit)
function RushDuel.FusionOperation(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)
Auxiliary.FCheckAdditional = RushDuel.FusionCheckAdditional(e, self_leave)
Auxiliary.FGoalCheckAdditional = mat_check
local fusionable, list, chkf, gc = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, nil, e)
local fusionable, list, chkf, gc = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, self_leave, nil, e)
if fusionable then
local fc, mat = RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
if action ~= nil then
action(e, tp, eg, ep, ev, re, r, rp, mat, fc)
end
end
Auxiliary.FCheckAdditional = nil
Auxiliary.FGoalCheckAdditional = nil
if limit ~= nil then
limit(e, tp, eg, ep, ev, re, r, rp)
......@@ -380,9 +404,12 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
end
-- 强制进行融合术召唤
function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self)
function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self, self_leave)
local include = including_self or false
local leave = self_leave or false
Auxiliary.FCheckAdditional = RushDuel.FusionCheckAdditional(e, leave)
Auxiliary.FGoalCheckAdditional = mat_check
local fusionable, list, chkf, gc = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, nil, e)
local fusionable, list, chkf, gc = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, include, leave, nil, e)
local fc = nil
if fusionable then
if break_effect then
......@@ -390,14 +417,18 @@ function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range,
end
fc = RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
end
aux.FGoalCheckAdditional = nil
Auxiliary.FCheckAdditional = nil
Auxiliary.FGoalCheckAdditional = nil
return fc
end
-- 可以进行融合术召唤
function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self)
function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self, self_leave)
local include = including_self or false
local leave = self_leave or false
Auxiliary.FCheckAdditional = RushDuel.FusionCheckAdditional(e, leave)
Auxiliary.FGoalCheckAdditional = mat_check
local fusionable, list, chkf, gc = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, nil, e)
local fusionable, list, chkf, gc = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, include, leave, nil, e)
local fc = nil
if fusionable and Duel.SelectYesNo(tp, desc) then
if break_effect then
......@@ -405,7 +436,8 @@ function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range,
end
fc = RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
end
aux.FGoalCheckAdditional = nil
Auxiliary.FCheckAdditional = nil
Auxiliary.FGoalCheckAdditional = nil
return fc
end
......
......@@ -3,7 +3,7 @@ local cm=_G["c"..m]
cm.name="龙族融合"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,nil,nil,false,cm.limit)
local e1=RD.CreateFusionEffect(c,cm.matfilter,nil,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,nil,nil,cm.limit)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -3,7 +3,7 @@ local cm=_G["c"..m]
cm.name="暗冥矮星"
function cm.initial_effect(c)
--Fusion Summon
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,nil,nil,nil,nil,true)
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,nil,0,0,nil,nil,nil,nil,nil,true)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
......
......@@ -29,9 +29,9 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return end
local sg,g=RD.RevealDeckTopAndCanSelect(tp,4,aux.Stringid(m,1),HINTMSG_ATOHAND,cm.filter,1,1)
local rec=false
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
RD.SendToHandAndExists(sg,1-tp)
Duel.ShuffleHand(tp)
end
local ct=g:GetCount()
......
......@@ -5,11 +5,10 @@ cm.name="变形史莱姆-恶魔龙形态"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Summon
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter)
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter,nil,0,0,nil,nil,nil,nil,nil,false,true)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
end
......@@ -17,7 +16,4 @@ end
function cm.spfilter(c)
return aux.IsCodeListed(c,list[1]) or aux.IsCodeListed(c,list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsCanFusionSummon(e,tp,nil,cm.spfilter,nil,0,0,nil,false,e:GetHandler())
end
cm.cost=RD.CostSendSelfToGrave()
\ No newline at end of file
......@@ -3,7 +3,7 @@ local cm=_G["c"..m]
cm.name="梦中拥抱"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,cm.exfilter,0,LOCATION_MZONE,cm.matcheck,RD.FusionToGrave,nil,nil,false,cm.limit)
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,cm.exfilter,0,LOCATION_MZONE,cm.matcheck,RD.FusionToGrave,nil,nil,cm.limit)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
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