bug fixes

This commit is contained in:
baisebaoma 2024-04-18 15:06:56 +08:00
parent e2b50d703a
commit 54bfac13bf
1 changed files with 7 additions and 1 deletions

View File

@ -2486,19 +2486,25 @@ local zhuojing = fk.CreateViewAsSkill {
room:askForDiscard(target, #use.card.subcards, #use.card.subcards, true, self.name, false, nil, room:askForDiscard(target, #use.card.subcards, #use.card.subcards, true, self.name, false, nil,
"#jy_zhuojing-discard:" .. player.id .. "::" .. #use.card.subcards) "#jy_zhuojing-discard:" .. player.id .. "::" .. #use.card.subcards)
local feasible = {} local feasible = {}
local total = {}
if #table.filter(player.room.alive_players, function(p) return #p:getCardIds("h") == 0 end) > 0 then if #table.filter(player.room.alive_players, function(p) return #p:getCardIds("h") == 0 end) > 0 then
table.insert(feasible, "jy_suzhan-short") table.insert(feasible, "jy_suzhan-short")
table.insert(total, "jy_suzhan-short")
end end
if target:canUse(Fk:cloneCard("peach")) and #target:getCardIds("h") ~= 0 then if target:canUse(Fk:cloneCard("peach")) and #target:getCardIds("h") ~= 0 then
if is_general_skill(target, "jy_zhuojing") then if is_general_skill(target, "jy_zhuojing") then
table.insert(feasible, "jy_zhuojing-long") -- 只是相对short稍微长一点 table.insert(feasible, "jy_zhuojing-long") -- 只是相对short稍微长一点
table.insert(total, "jy_zhuojing-long")
else else
table.insert(feasible, "jy_zhuojing-short") table.insert(feasible, "jy_zhuojing-short")
table.insert(total, "jy_zhuojing-short")
end end
else
table.insert(total, "jy_zhuojing-short")
end end
if #feasible > 0 then if #feasible > 0 then
local skill_name = room:askForChoice(target, feasible, "#jy_zhuojing-skill", local skill_name = room:askForChoice(target, feasible, "#jy_zhuojing-skill",
"#jy_zhuojing-skill:" .. player.id, true, { "jy_suzhan-short", "jy_zhuojing-short" }) "#jy_zhuojing-skill:" .. player.id, true, total)
-- 因为上面可能是传的short在这里把short翻译回来 -- 因为上面可能是传的short在这里把short翻译回来
if skill_name == "jy_suzhan-short" then skill_name = "jy_suzhan" end if skill_name == "jy_suzhan-short" then skill_name = "jy_suzhan" end