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

2023/12/1 添加多选一代价的条件

parent cd9757f5
Pipeline #24217 passed with stages
in 16 minutes and 10 seconds
......@@ -187,3 +187,8 @@ end
function RushDuel.IsOperatedGroupExists(filter, count, expect)
return filter == nil or Duel.GetOperatedGroup():IsExists(filter, count, expect)
end
-- 条件: 卡片组全部满足条件与数量
function RushDuel.GroupAllCount(group, filter, count, ...)
return group:GetCount() == count and group:FilterCount(filter, nil, ...) == count
end
\ No newline at end of file
......@@ -23,7 +23,9 @@ RushDuel.LegendCodes = {
-- 初始化传说卡
function RushDuel.InitLegend()
local g = Duel.GetMatchingGroup(Card.IsCode, 0, 0xff, 0xff, nil, LEGEND_MONSTER, LEGEND_SPELL, LEGEND_TRAP)
g:ForEach(function(c)
g:ForEach(RushDuel.InitLegendCard)
end
function RushDuel.InitLegendCard(c)
local code = RushDuel.GetLegendCode(c:GetOriginalCode())
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -34,7 +36,6 @@ function RushDuel.InitLegend()
c:RegisterEffect(e1, true)
-- 修改卡牌数据 (删除同名卡:传说卡)
c:SetEntityCode(code, true)
end)
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