Commit 8eba1dff authored by 未闻皂名's avatar 未闻皂名

2024/2/18 调整更新

parent ea34a4ed
Pipeline #25469 passed with stages
in 8 minutes and 17 seconds
-- Rush Duel 操作
RushDuel = RushDuel or {}
-- 特殊调整,里侧守备表示特殊召唤时不用给对方确认
RushDuel.DisableSpecialSummonConfirm = false
-- 特殊调整,里侧守备表示特殊召唤时需要给对方确认
RushDuel.FaceDownSpecialSummonConfirm = false
-- 内部方法: 选择匹配卡片, 执行操作
function RushDuel._private_action_select_match(hint, filter, tp, s_range, o_range, min, max, expect, hint_selection, confirm, action, ...)
......@@ -70,20 +70,33 @@ end
function RushDuel._private_is_include_public(s_range, o_range)
return (s_range | o_range) & (LOCATION_ONFIELD | LOCATION_GRAVE | LOCATION_REMOVED) ~= 0
end
-- 内部方法: 是否需要给对方确认
function RushDuel._private_is_confirm_card(c)
return c:GetSummonLocation() != LOCATION_HAND
end
-- 内部方法: 特殊召唤
function RushDuel._special_summon(target, effect, player, position, break_effect, target_player)
if break_effect then
Duel.BreakEffect()
end
local ct = Duel.SpecialSummon(target, 0, player, target_player or player, false, false, position)
if (position & POS_FACEDOWN) ~= 0 and not RushDuel.DisableSpecialSummonConfirm then
Duel.ConfirmCards(1 - player, target)
if (position & POS_FACEDOWN) ~= 0 then
local og = Duel.GetOperatedGroup():Filter(Card.IsFacedown, nil)
if RushDuel.FaceDownSpecialSummonConfirm then
if og:GetCount() > 0 then
Duel.ConfirmCards(1 - player, og)
end
else
local confirm = og:Filter(RushDuel._private_is_confirm_card, nil)
if confirm:GetCount() > 0 then
Duel.ConfirmCards(1 - player, confirm)
end
end
if og:GetCount() > 1 then
Duel.ShuffleSetCard(og)
end
end
RushDuel.DisableSpecialSummonConfirm = false
RushDuel.FaceDownSpecialSummonConfirm = false
return ct
end
-- 内部方法: 盖放魔法陷阱
......
......@@ -43,6 +43,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-p,g)
local spfilter=RD.Filter(cm.spfilter,e,tp,g)
RD.FaceDownSpecialSummonConfirm=true
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),spfilter,tp,LOCATION_HAND,0,1,99,nil,e,POS_FACEDOWN_DEFENSE,true)
Duel.ShuffleHand(p)
end
......
......@@ -26,7 +26,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 then
RD.DisableSpecialSummonConfirm=true
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),cm.spfilter,tp,LOCATION_HAND,0,1,3,nil,e,POS_FACEDOWN_DEFENSE,true)
end
end
\ No newline at end of file
......@@ -22,7 +22,8 @@ function cm.posfilter(c)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 and Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end
local g=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
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