bug fix x2 ! (#291)

![devbugfix_ba-style@nulla
top](https://github.com/Qsgs-Fans/FreeKill/assets/38815081/9879a2bd-3edc-4f09-b4e5-06f600823659)
- 修复了铁索传导的伤害仍然觉得自己是伤害起点的bug
- 修复了转化牌前后同名仍然显示转化小白框的bug
- 修复了黑色花色不是黑色的bug
- 重写了改判流程,支持判定虚拟牌

---------

Co-authored-by: notify <notify-ctrl@qq.com>
This commit is contained in:
YoumuKon 2023-12-10 18:56:50 +08:00 committed by GitHub
parent cec18e0614
commit 520523bcc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 42 additions and 47 deletions

View File

@ -122,14 +122,14 @@ Item {
Image {
id: colorItem
visible: known && (suit === "" || suit === "nosuit")
visible: known && (suit === "" || suit === "nosuit") // && number <= 0 // <- FIX ME:
source: (visible && color !== "") ? SkinBank.CARD_SUIT_DIR + "/" + color : ""
x: 1
}
Rectangle {
id: virt_rect
visible: root.virt_name !== ""
visible: root.virt_name !== "" && root.virt_name !== root.name
width: parent.width
height: 20
y: 40

View File

@ -376,9 +376,9 @@ Fk:loadTranslationTable({
-- judge
["#StartJudgeReason"] = "%from started a judgement (%arg)",
["#InitialJudge"] = "Judge card of %from was %card",
["#ChangedJudge"] = "%from invoked %arg, retrialed judgement of %to with %card",
["#JudgeResult"] = "The judge result of %from was %card",
["#InitialJudge"] = "Judge card of %from was %arg",
["#ChangedJudge"] = "%from invoked %arg, retrialed judgement of %to with %arg2",
["#JudgeResult"] = "The judge result of %from was %arg",
-- turnOver
["#TurnOver"] = "%from turned over character card, now his status is %arg",

View File

@ -430,9 +430,9 @@ Fk:loadTranslationTable{
-- judge
["#StartJudgeReason"] = "%from 开始了 %arg 的判定",
["#InitialJudge"] = "%from 的判定牌为 %card",
["#ChangedJudge"] = "%from 发动“%arg”把 %to 的判定牌改为 %card",
["#JudgeResult"] = "%from 的判定结果为 %card",
["#InitialJudge"] = "%from 的判定牌为 %arg",
["#ChangedJudge"] = "%from 发动“%arg”把 %to 的判定牌改为 %arg2",
["#JudgeResult"] = "%from 的判定结果为 %arg",
-- turnOver
["#TurnOver"] = "%from 将武将牌翻面,现在是 %arg",

View File

@ -212,6 +212,7 @@ GameEvent.exit_funcs[GameEvent.Damage] = function(self)
type = "#ChainDamage",
from = p.id
}
local dmg = {
from = damageStruct.from,
to = p,

View File

@ -17,11 +17,12 @@ GameEvent.functions[GameEvent.Judge] = function(self)
arg = data.reason,
}
end
Fk:filterCard(data.card.id, who, data)
room:sendLog{
type = "#InitialJudge",
from = who.id,
card = {data.card.id},
arg = data.card:toLogString(),
}
room:moveCardTo(data.card, Card.Processing, nil, fk.ReasonJudge)
room:sendFootnote({ data.card.id }, {
@ -31,11 +32,10 @@ GameEvent.functions[GameEvent.Judge] = function(self)
logic:trigger(fk.AskForRetrial, who, data)
logic:trigger(fk.FinishRetrial, who, data)
Fk:filterCard(data.card.id, who, data)
room:sendLog{
type = "#JudgeResult",
from = who.id,
card = {data.card.id},
arg = data.card:toLogString(),
}
room:sendFootnote({ data.card.id }, {
type = "##JudgeCard",

View File

@ -3119,25 +3119,26 @@ function Room:retrial(card, player, judge, skillName, exchange)
local triggerResponded = self.owner_map[card:getEffectiveId()] == player
local isHandcard = (triggerResponded and self:getCardArea(card:getEffectiveId()) == Card.PlayerHand)
local oldJudge = judge.card
judge.card = Fk:getCardById(card:getEffectiveId())
local rebyre = judge.retrial_by_response
judge.retrial_by_response = player
local resp = {} ---@type CardResponseEvent
resp.from = player.id
resp.card = card
if triggerResponded then
self.logic:trigger(fk.PreCardRespond, player, resp)
local resp = {} ---@type CardResponseEvent
resp.from = player.id
resp.card = card
resp.skipDrop = true
self:responseCard(resp)
else
local move1 = {} ---@type CardsMoveInfo
move1.ids = { card:getEffectiveId() }
move1.from = player.id
move1.toArea = Card.Processing
move1.moveReason = fk.ReasonJustMove
move1.skillName = skillName
self:moveCards(move1)
end
local move1 = {} ---@type CardsMoveInfo
move1.ids = { card:getEffectiveId() }
move1.from = player.id
move1.toArea = Card.Processing
move1.moveReason = fk.ReasonResonpse
move1.skillName = skillName
local oldJudge = judge.card
judge.card = card
local rebyre = judge.retrial_by_response
judge.retrial_by_response = player
local move2 = {} ---@type CardsMoveInfo
move2.ids = { oldJudge:getEffectiveId() }
@ -3149,16 +3150,11 @@ function Room:retrial(card, player, judge, skillName, exchange)
type = "#ChangedJudge",
from = player.id,
to = { judge.who.id },
card = { card:getEffectiveId() },
arg2 = card:toLogString(),
arg = skillName,
}
self:moveCards(move1)
self:moveCards(move2)
if triggerResponded then
self.logic:trigger(fk.CardRespondFinished, player, resp)
end
end
--- 弃置一名角色的牌。

View File

@ -7,10 +7,6 @@ Fk:loadTranslationTable({
["wu"] = "*Wu*",
["qun"] = "*Neutral*",
["black"] = "Black",
["red"] = '<font color="#CC3131">Red</font>',
["nocolor"] = '<font color="grey">NoColor</font>',
["caocao"] = "Cao Cao",
["jianxiong"] = "Villainous Hero",
[":jianxiong"] = "After you suffer DMG: you can take the card(s) that caused it.",

View File

@ -7,10 +7,6 @@ Fk:loadTranslationTable{
["wu"] = "",
["qun"] = "",
["black"] = "黑色",
["red"] = '<font color="#CC3131">红色</font>',
["nocolor"] = '<font color="grey">无色</font>',
["caocao"] = "曹操",
["~caocao"] = "霸业未成!未成啊!",
["$jianxiong1"] = "宁教我负天下人,休教天下人负我!",

View File

@ -4,16 +4,19 @@ Fk:loadTranslationTable({
["standard_cards"] = "Standard",
["unknown_card"] = '<font color="#B5BA00"><b>Unknown card</b></font>',
["log_spade"] = "",
["log_spade"] = '<font color="black">♠</font>',
["log_heart"] = '<font color="#CC3131">♥</font>',
["log_club"] = "",
["log_club"] = '<font color="black">♣</font>',
["log_diamond"] = '<font color="#CC3131">♦</font>',
["log_nosuit"] = "No suit",
["nosuit"] = "No suit",
-- ["spade"] = "Spade",
-- ["heart"] = "Heart",
-- ["club"] = "Club",
-- ["diamond"] = "Diamond",
["nosuit"] = "No suit",
["black"] = '<font color="black">黑色</font>',
["red"] = '<font color="#CC3131">Red</font>',
["nocolor"] = '<font color="grey">NoColor</font>',
-- ["suit"] = "花色",
-- ["color"] = "颜色",
-- ["number"] = "点数",

View File

@ -4,16 +4,19 @@ Fk:loadTranslationTable{
["standard_cards"] = "标+EX",
["unknown_card"] = '<font color="#B5BA00"><b>未知牌</b></font>',
["log_spade"] = "",
["log_spade"] = '<font color="black">♠</font>',
["log_heart"] = '<font color="#CC3131">♥</font>',
["log_club"] = "",
["log_club"] = '<font color="black">♣</font>',
["log_diamond"] = '<font color="#CC3131">♦</font>',
["log_nosuit"] = "无花色",
["nosuit"] = "无花色",
["spade"] = "黑桃",
["heart"] = "红桃",
["club"] = "梅花",
["diamond"] = "方块",
["nosuit"] = "无花色",
["black"] = '<font color="black">黑色</font>',
["red"] = '<font color="#CC3131">红色</font>',
["nocolor"] = '<font color="grey">无色</font>',
["suit"] = "花色",
["color"] = "颜色",
["number"] = "点数",