gambler ux improved

This commit is contained in:
baisebaoma 2024-04-12 03:14:32 +08:00
parent ca984eb9da
commit 485c694811
2 changed files with 23 additions and 20 deletions

View File

@ -2498,24 +2498,27 @@ local guiyi = fk.CreateTriggerSkill {
return player:hasSkill(self) and return player:hasSkill(self) and
target.phase == Player.Finish and not player:isNude() target.phase == Player.Finish and not player:isNude()
end, end,
on_cost = function(self, event, target, player, data)
local success, dat = player.room:askForUseActiveSkill(player, "#jy_guiyi_viewas", "#jy_guiyi-use", true)
if success then
self.cost_data = dat
return true
end
end,
on_use = function(self, event, target, player, data) on_use = function(self, event, target, player, data)
local room = player.room local room = player.room
local success, dat = room:askForUseActiveSkill(player, "#jy_guiyi_viewas", "#jy_guiyi-use", true, local card = Fk:cloneCard("duel")
{ bypass_distances = true }) card:addSubcards(self.cost_data.cards)
if success then card.skillName = self.name
local card = Fk:cloneCard("duel") local use = {
card:addSubcards(dat.cards) from = player.id,
card.skillName = self.name tos = table.map(self.cost_data.targets, function(p) return { p } end),
local use = { card = card,
from = player.id, extraData = { bypass_distances = true },
tos = table.map(dat.targets, function(p) return { p } end), }
card = card, room:useCard(use)
extraData = { bypass_distances = true }, if use.damageDealt and use.damageDealt[player.id] then
} room:killPlayer({ who = player.id })
room:useCard(use)
if use.damageDealt and use.damageDealt[player.id] then
room:killPlayer({ who = player.id })
end
end end
end, end,
} }
@ -2552,7 +2555,8 @@ Fk:loadTranslationTable {
["#jy_guiyi-use"] = [[命弈:将一张牌当【决斗】使用,若其对你造成伤害则你死亡]], ["#jy_guiyi-use"] = [[命弈:将一张牌当【决斗】使用,若其对你造成伤害则你死亡]],
} }
local gambler = General(extension, "jy__gambler", "qun", 6) local gambler = General(extension, "jy__gambler", "qun", 8)
gambler:addSkill(guiyi) gambler:addSkill(guiyi)
gambler:addSkill("benghuai")
return extension return extension

View File

@ -1360,8 +1360,7 @@ local yingyuan = fk.CreateTriggerSkill {
end), Util.IdMapper) end), Util.IdMapper)
if #targets == 0 then return false end if #targets == 0 then return false end
local result = room:askForChoosePlayers(player, targets, 1, 1, "#jy_yingyuan-prompt", local result = room:askForChoosePlayers(player, targets, 1, 1, "#jy_yingyuan-prompt",
self.name, self.name, false, false)
false, false)
if #result ~= 0 then if #result ~= 0 then
local to = room:getPlayerById(result[1]) local to = room:getPlayerById(result[1])
if not to.dead then if not to.dead then
@ -1476,7 +1475,7 @@ Fk:loadTranslationTable {
["illustrator:jy__yjds"] = [[未知]], ["illustrator:jy__yjds"] = [[未知]],
["jy_yingyuan"] = [[应援]], ["jy_yingyuan"] = [[应援]],
[":jy_yingyuan"] = [[锁定技,当你的牌不因使用或〖施援〗进入弃牌堆<font color="red">或处理区</font>后,你令一名其他角色摸一张牌;每回合限一次,当你失去最后的手牌后,你<font color="red">失去一点体力</font>并摸等同于体力上限张牌。]], [":jy_yingyuan"] = [[锁定技,当你的牌不因使用或〖施援〗进入弃牌堆或处理区后,你令一名其他角色摸一张牌;每回合限一次,当你失去最后的手牌后,你<font color="red">失去一点体力</font>并摸等同于体力上限张牌。]],
["#jy_yingyuan-prompt"] = [[应援:令一名其他角色摸一张牌]], ["#jy_yingyuan-prompt"] = [[应援:令一名其他角色摸一张牌]],
["jy_shiyuan"] = [[施援]], ["jy_shiyuan"] = [[施援]],