Commit 5f36267c authored by 未闻皂名's avatar 未闻皂名

2024/3/27 抗性检测修改

parent fd41701c
......@@ -112,11 +112,8 @@ function RushDuel.ValueEffectIndesType(self_type, opponent_type, ignore)
if e == nil then
return ignore or false, s_type, o_type
end
local tp = e:GetHandlerPlayer()
if e:GetLabel() ~= 0 then
tp = e:GetLabel() - 1
end
if rp == tp then
local op = e:GetOwnerPlayer()
if rp == op then
return s_type ~= 0 and re:IsActiveType(s_type)
else
return o_type ~= 0 and re:IsActiveType(o_type)
......@@ -125,9 +122,10 @@ function RushDuel.ValueEffectIndesType(self_type, opponent_type, ignore)
end
-- 判断: 是否可以赋予效果破坏抗性
function RushDuel.CheckValueEffectIndesType(swap, values, value)
function RushDuel.CheckValueEffectIndesType(player, effects, value)
local attachs_s, attachs_o = 0, 0
for _, val in ipairs(values) do
for _, effect in ipairs(effects) do
local val = effect:GetValue()
if val == 1 then
-- 全破坏抗性, 无法再赋予其他抗性
return false
......@@ -135,6 +133,9 @@ function RushDuel.CheckValueEffectIndesType(swap, values, value)
-- 已有抗性全部叠加
local ignore, s_type, o_type = val(nil)
if not ignore then
if effect:GetHandlerPlayer() ~= effect:GetOwnerPlayer() then
s_type, o_type = o_type, s_type
end
attachs_s = attachs_s | s_type
attachs_o = attachs_o | o_type
end
......@@ -142,9 +143,5 @@ function RushDuel.CheckValueEffectIndesType(swap, values, value)
end
-- 判断抗性是否有变化
local _, s_type, o_type = value(nil)
if swap then
-- 控制权交换中
s_type, o_type = o_type, s_type
end
return (attachs_s | s_type) ~= attachs_s or (attachs_o | o_type) ~= attachs_o
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