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 { Rectangle {
anchors.fill: dashboard anchors.fill: dashboard
visible: config.observing && !config.replaying visible: config.observing && !config.replaying

View File

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

View File

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

View File

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

View File

@ -22,7 +22,7 @@ GameEvent.functions[GameEvent.Pindian] = function(self)
reason = pindianData.reason, reason = pindianData.reason,
} }
local prompt = "#askForPindian:::" .. 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 targets = {}
local moveInfos = {} local moveInfos = {}

View File

@ -155,6 +155,8 @@ local sendCardEmotionAndLog = function(room, cardUseEvent)
} }
end end
end end
return _card
end end
GameEvent.functions[GameEvent.UseCard] = function(self) GameEvent.functions[GameEvent.UseCard] = function(self)
@ -166,13 +168,13 @@ GameEvent.functions[GameEvent.UseCard] = function(self)
cardUseEvent.card.skill:onUse(room, cardUseEvent) cardUseEvent.card.skill:onUse(room, cardUseEvent)
end end
sendCardEmotionAndLog(room, cardUseEvent) local _card = sendCardEmotionAndLog(room, cardUseEvent)
room:moveCardTo(cardUseEvent.card, Card.Processing, nil, fk.ReasonUse) room:moveCardTo(cardUseEvent.card, Card.Processing, nil, fk.ReasonUse)
local card = cardUseEvent.card local card = cardUseEvent.card
local useCardIds = card:isVirtual() and card.subcards or { card.id } local useCardIds = card:isVirtual() and card.subcards or { card.id }
if #useCardIds == 0 then return end if #useCardIds > 0 then
if cardUseEvent.tos and #cardUseEvent.tos > 0 and #cardUseEvent.tos <= 2 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) local tos = table.map(cardUseEvent.tos, function(e) return e[1] end)
room:sendFootnote(useCardIds, { room:sendFootnote(useCardIds, {
@ -180,7 +182,7 @@ GameEvent.functions[GameEvent.UseCard] = function(self)
from = cardUseEvent.from, from = cardUseEvent.from,
to = tos, to = tos,
}) })
if card:isVirtual() then if card:isVirtual() or card ~= _card then
room:sendCardVirtName(useCardIds, card.name) room:sendCardVirtName(useCardIds, card.name)
end end
else else
@ -188,10 +190,11 @@ GameEvent.functions[GameEvent.UseCard] = function(self)
type = "##UseCard", type = "##UseCard",
from = cardUseEvent.from, from = cardUseEvent.from,
}) })
if card:isVirtual() then if card:isVirtual() or card ~= _card then
room:sendCardVirtName(useCardIds, card.name) room:sendCardVirtName(useCardIds, card.name)
end end
end end
end
if logic:trigger(fk.PreCardUse, room:getPlayerById(cardUseEvent.from), cardUseEvent) then if logic:trigger(fk.PreCardUse, room:getPlayerById(cardUseEvent.from), cardUseEvent) then
logic:breakEvent() logic:breakEvent()

View File

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