Commit 783edd79 authored by 未闻皂名's avatar 未闻皂名

2025/10/22 bug修复

parent 510631bb
Pipeline #41197 passed with stages
in 6 minutes and 12 seconds
......@@ -455,59 +455,4 @@ function RushDuel.CostChoose(hit1, cost1, hit2, cost2)
end
RushDuel.CostCancelable = false
end
end
-- 代价: 从2个代价中选择1个(同时选)
function RushDuel.CostChooseAction(hit1, hit2, hit3, filter1, check1, zone1, count1, action1, filter2, check2, zone2, count2, action2)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
local g1 = Duel.GetMatchingGroup(filter1, tp, zone1, 0, nil)
local g2 = Duel.GetMatchingGroup(filter2, tp, zone2, 0, nil)
local b1, b2
if check1 then
b1 = g1:CheckSubGroup(check1, count1, count1)
else
b1 = g1:GetCount() >= count1
end
if check2 then
b2 = g2:CheckSubGroup(check2, count2, count2)
else
b2 = g2:GetCount() >= count2
end
if chk == 0 then
return b1 or b2
end
local sg
if b1 and not b2 then
Duel.Hint(HINT_SELECTMSG, tp, hit1)
if check1 then
sg = g1:SelectSubGroup(tp, check1, false, count1, count1)
else
sg = g1:Select(tp, count1, count1, nil)
end
action1(sg, e, tp, eg, ep, ev, re, r, rp)
elseif b2 and not b1 then
Duel.Hint(HINT_SELECTMSG, tp, hit2)
if check2 then
sg = g2:SelectSubGroup(tp, check2, false, count2, count2)
else
sg = g2:Select(tp, count2, count2, nil)
end
action2(sg, e, tp, eg, ep, ev, re, r, rp)
else
g1:Merge(g2)
Duel.Hint(HINT_SELECTMSG, tp, hit3)
local min, max = count1, count2
if min > max then
min, max = max, min
end
sg = g1:SelectSubGroup(tp, function(g)
return (RushDuel.GroupAllCount(g, Card.IsLocation, count1, zone1) and (not check1 or check1(g))) or
(RushDuel.GroupAllCount(g, Card.IsLocation, count2, zone2) and (not check2 or check2(g)))
end, false, min, max)
if sg:FilterCount(filter1, nil) == count1 and (not check1 or check1(sg)) then
action1(sg, e, tp, eg, ep, ev, re, r, rp)
elseif sg:FilterCount(filter2, nil) == count2 and (not check2 or check2(sg)) then
action2(sg, e, tp, eg, ep, ev, re, r, rp)
end
end
end
end
\ No newline at end of file
......@@ -35,7 +35,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
cm.cost=CostSendGroupToDeckSort(cm.costfilter,cm.costcheck,LOCATION_ONFIELD+LOCATION_GRAVE,1,4,false,SEQ_DECKSHUFFLE,false,true)
cm.cost=RD.CostSendGroupToDeckSort(cm.costfilter,cm.costcheck,LOCATION_ONFIELD+LOCATION_GRAVE,1,4,false,SEQ_DECKSHUFFLE,false,true)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
......
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