This commit is contained in:
Ho-spair 2023-12-12 20:06:07 +08:00 committed by GitHub
parent 82a1c5f5d5
commit 1f1b677768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 37 deletions

View File

@ -974,6 +974,17 @@ Item {
}
}
GlowText {
anchors.centerIn: dashboard
visible: Logic.getPhoto(Self.id).rest > 0 && !config.observing
text: Backend.translate("Resting, don't leave!")
color: "#DBCC69"
font.family: fontLibian.name
font.pixelSize: 28
glow.color: "#2E200F"
glow.spread: 0.6
}
Rectangle {
anchors.fill: dashboard
visible: config.observing && !config.replaying

View File

@ -277,36 +277,38 @@ Item {
anchors.leftMargin: 20
visible: root.rest > 0
Text {
GlowText {
Layout.alignment: Qt.AlignCenter
text: "休整中"
text: Backend.translate("resting...")
font.family: fontLibian.name
font.pixelSize: 40
color: "white"
style: Text.Outline
textFormat: Text.RichText
font.bold: true
color: "#FEF7D6"
glow.color: "#845422"
glow.spread: 0.8
}
Text {
GlowText {
Layout.alignment: Qt.AlignCenter
visible: root.rest > 0 && root.rest < 999
text: root.rest
font.family: fontLibian.name
font.pixelSize: 30
color: "white"
style: Text.Outline
textFormat: Text.RichText
font.pixelSize: 34
font.bold: true
color: "#DBCC69"
glow.color: "#2E200F"
glow.spread: 0.6
}
Text {
GlowText {
Layout.alignment: Qt.AlignCenter
visible: root.rest > 0 && root.rest < 999
text: "轮次"
text: Backend.translate("rest round num")
font.family: fontLibian.name
font.pixelSize: 28
color: "white"
style: Text.Outline
textFormat: Text.RichText
color: "#F0E5D6"
glow.color: "#2E200F"
glow.spread: 0.6
}
}

View File

@ -283,6 +283,9 @@ FreeKill使用的是libgit2的C API与此同时使用Git完成拓展包的下
["Log"] = "战报",
["Trusting ..."] = "托管中 ...",
["Observing ..."] = "旁观中 ...",
["Resting, don't leave!"] = "稍后你可返回战局,不要离开",
["resting..."] = "休整中",
["rest round num"] = "轮次",
["$GameOver"] = "游戏结束",
["$Winner"] = "%1 获胜",

View File

@ -217,6 +217,7 @@ GameEvent.exit_funcs[GameEvent.Damage] = function(self)
from = damageStruct.from,
to = p,
damage = damageStruct.damage,
damageType = damageStruct.damageType,
card = damageStruct.card,
skillName = damageStruct.skillName,
chain = true,

View File

@ -22,7 +22,7 @@ GameEvent.functions[GameEvent.Pindian] = function(self)
reason = pindianData.reason,
}
local prompt = "#askForPindian:::" .. pindianData.reason
local data = { "choose_cards_skill", prompt, false, json.encode(extraData) }
local data = { "choose_cards_skill", prompt, false, extraData }
local targets = {}
local moveInfos = {}

View File

@ -155,6 +155,8 @@ local sendCardEmotionAndLog = function(room, cardUseEvent)
}
end
end
return _card
end
GameEvent.functions[GameEvent.UseCard] = function(self)
@ -166,30 +168,31 @@ GameEvent.functions[GameEvent.UseCard] = function(self)
cardUseEvent.card.skill:onUse(room, cardUseEvent)
end
sendCardEmotionAndLog(room, cardUseEvent)
local _card = sendCardEmotionAndLog(room, cardUseEvent)
room:moveCardTo(cardUseEvent.card, Card.Processing, nil, fk.ReasonUse)
local card = cardUseEvent.card
local useCardIds = card:isVirtual() and card.subcards or { card.id }
if #useCardIds == 0 then return end
if cardUseEvent.tos and #cardUseEvent.tos > 0 and #cardUseEvent.tos <= 2 then
local tos = table.map(cardUseEvent.tos, function(e) return e[1] end)
room:sendFootnote(useCardIds, {
type = "##UseCardTo",
from = cardUseEvent.from,
to = tos,
})
if card:isVirtual() then
room:sendCardVirtName(useCardIds, card.name)
end
else
room:sendFootnote(useCardIds, {
type = "##UseCard",
from = cardUseEvent.from,
})
if card:isVirtual() then
room:sendCardVirtName(useCardIds, card.name)
if #useCardIds > 0 then
if cardUseEvent.tos and #cardUseEvent.tos > 0 and #cardUseEvent.tos <= 2 then
local tos = table.map(cardUseEvent.tos, function(e) return e[1] end)
room:sendFootnote(useCardIds, {
type = "##UseCardTo",
from = cardUseEvent.from,
to = tos,
})
if card:isVirtual() or card ~= _card then
room:sendCardVirtName(useCardIds, card.name)
end
else
room:sendFootnote(useCardIds, {
type = "##UseCard",
from = cardUseEvent.from,
})
if card:isVirtual() or card ~= _card then
room:sendCardVirtName(useCardIds, card.name)
end
end
end

View File

@ -635,8 +635,8 @@ function Room:changeHero(player, new_general, full, isDeputy, sendLog, maxHpChan
execGameEvent(GameEvent.ChangeProperty,
{
from = player,
general = not isDeputy and new_general or "",
deputyGeneral = isDeputy and new_general or "",
general = not isDeputy and new_general or nil,
deputyGeneral = isDeputy and new_general or nil,
gender = isDeputy and player.gender or new.gender,
kingdom = kingdom,
sendLog = sendLog,