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:
parent
cec18e0614
commit
520523bcc1
|
@ -122,14 +122,14 @@ Item {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: colorItem
|
id: colorItem
|
||||||
visible: known && (suit === "" || suit === "nosuit")
|
visible: known && (suit === "" || suit === "nosuit") // && number <= 0 // <- FIX ME:需要区分“黑色有点数”和“无色有点数”
|
||||||
source: (visible && color !== "") ? SkinBank.CARD_SUIT_DIR + "/" + color : ""
|
source: (visible && color !== "") ? SkinBank.CARD_SUIT_DIR + "/" + color : ""
|
||||||
x: 1
|
x: 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: virt_rect
|
id: virt_rect
|
||||||
visible: root.virt_name !== ""
|
visible: root.virt_name !== "" && root.virt_name !== root.name
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 20
|
height: 20
|
||||||
y: 40
|
y: 40
|
||||||
|
|
|
@ -376,9 +376,9 @@ Fk:loadTranslationTable({
|
||||||
|
|
||||||
-- judge
|
-- judge
|
||||||
["#StartJudgeReason"] = "%from started a judgement (%arg)",
|
["#StartJudgeReason"] = "%from started a judgement (%arg)",
|
||||||
["#InitialJudge"] = "Judge card of %from was %card",
|
["#InitialJudge"] = "Judge card of %from was %arg",
|
||||||
["#ChangedJudge"] = "%from invoked %arg, retrialed judgement of %to with %card",
|
["#ChangedJudge"] = "%from invoked %arg, retrialed judgement of %to with %arg2",
|
||||||
["#JudgeResult"] = "The judge result of %from was %card",
|
["#JudgeResult"] = "The judge result of %from was %arg",
|
||||||
|
|
||||||
-- turnOver
|
-- turnOver
|
||||||
["#TurnOver"] = "%from turned over character card, now his status is %arg",
|
["#TurnOver"] = "%from turned over character card, now his status is %arg",
|
||||||
|
|
|
@ -430,9 +430,9 @@ Fk:loadTranslationTable{
|
||||||
|
|
||||||
-- judge
|
-- judge
|
||||||
["#StartJudgeReason"] = "%from 开始了 %arg 的判定",
|
["#StartJudgeReason"] = "%from 开始了 %arg 的判定",
|
||||||
["#InitialJudge"] = "%from 的判定牌为 %card",
|
["#InitialJudge"] = "%from 的判定牌为 %arg",
|
||||||
["#ChangedJudge"] = "%from 发动“%arg”把 %to 的判定牌改为 %card",
|
["#ChangedJudge"] = "%from 发动“%arg”把 %to 的判定牌改为 %arg2",
|
||||||
["#JudgeResult"] = "%from 的判定结果为 %card",
|
["#JudgeResult"] = "%from 的判定结果为 %arg",
|
||||||
|
|
||||||
-- turnOver
|
-- turnOver
|
||||||
["#TurnOver"] = "%from 将武将牌翻面,现在是 %arg",
|
["#TurnOver"] = "%from 将武将牌翻面,现在是 %arg",
|
||||||
|
|
|
@ -212,6 +212,7 @@ GameEvent.exit_funcs[GameEvent.Damage] = function(self)
|
||||||
type = "#ChainDamage",
|
type = "#ChainDamage",
|
||||||
from = p.id
|
from = p.id
|
||||||
}
|
}
|
||||||
|
|
||||||
local dmg = {
|
local dmg = {
|
||||||
from = damageStruct.from,
|
from = damageStruct.from,
|
||||||
to = p,
|
to = p,
|
||||||
|
|
|
@ -17,11 +17,12 @@ GameEvent.functions[GameEvent.Judge] = function(self)
|
||||||
arg = data.reason,
|
arg = data.reason,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Fk:filterCard(data.card.id, who, data)
|
||||||
|
|
||||||
room:sendLog{
|
room:sendLog{
|
||||||
type = "#InitialJudge",
|
type = "#InitialJudge",
|
||||||
from = who.id,
|
from = who.id,
|
||||||
card = {data.card.id},
|
arg = data.card:toLogString(),
|
||||||
}
|
}
|
||||||
room:moveCardTo(data.card, Card.Processing, nil, fk.ReasonJudge)
|
room:moveCardTo(data.card, Card.Processing, nil, fk.ReasonJudge)
|
||||||
room:sendFootnote({ data.card.id }, {
|
room:sendFootnote({ data.card.id }, {
|
||||||
|
@ -31,11 +32,10 @@ GameEvent.functions[GameEvent.Judge] = function(self)
|
||||||
|
|
||||||
logic:trigger(fk.AskForRetrial, who, data)
|
logic:trigger(fk.AskForRetrial, who, data)
|
||||||
logic:trigger(fk.FinishRetrial, who, data)
|
logic:trigger(fk.FinishRetrial, who, data)
|
||||||
Fk:filterCard(data.card.id, who, data)
|
|
||||||
room:sendLog{
|
room:sendLog{
|
||||||
type = "#JudgeResult",
|
type = "#JudgeResult",
|
||||||
from = who.id,
|
from = who.id,
|
||||||
card = {data.card.id},
|
arg = data.card:toLogString(),
|
||||||
}
|
}
|
||||||
room:sendFootnote({ data.card.id }, {
|
room:sendFootnote({ data.card.id }, {
|
||||||
type = "##JudgeCard",
|
type = "##JudgeCard",
|
||||||
|
|
|
@ -3119,25 +3119,26 @@ function Room:retrial(card, player, judge, skillName, exchange)
|
||||||
local triggerResponded = self.owner_map[card:getEffectiveId()] == player
|
local triggerResponded = self.owner_map[card:getEffectiveId()] == player
|
||||||
local isHandcard = (triggerResponded and self:getCardArea(card:getEffectiveId()) == Card.PlayerHand)
|
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
|
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
|
end
|
||||||
|
|
||||||
local move1 = {} ---@type CardsMoveInfo
|
local oldJudge = judge.card
|
||||||
move1.ids = { card:getEffectiveId() }
|
judge.card = card
|
||||||
move1.from = player.id
|
local rebyre = judge.retrial_by_response
|
||||||
move1.toArea = Card.Processing
|
judge.retrial_by_response = player
|
||||||
move1.moveReason = fk.ReasonResonpse
|
|
||||||
move1.skillName = skillName
|
|
||||||
|
|
||||||
local move2 = {} ---@type CardsMoveInfo
|
local move2 = {} ---@type CardsMoveInfo
|
||||||
move2.ids = { oldJudge:getEffectiveId() }
|
move2.ids = { oldJudge:getEffectiveId() }
|
||||||
|
@ -3149,16 +3150,11 @@ function Room:retrial(card, player, judge, skillName, exchange)
|
||||||
type = "#ChangedJudge",
|
type = "#ChangedJudge",
|
||||||
from = player.id,
|
from = player.id,
|
||||||
to = { judge.who.id },
|
to = { judge.who.id },
|
||||||
card = { card:getEffectiveId() },
|
arg2 = card:toLogString(),
|
||||||
arg = skillName,
|
arg = skillName,
|
||||||
}
|
}
|
||||||
|
|
||||||
self:moveCards(move1)
|
|
||||||
self:moveCards(move2)
|
self:moveCards(move2)
|
||||||
|
|
||||||
if triggerResponded then
|
|
||||||
self.logic:trigger(fk.CardRespondFinished, player, resp)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--- 弃置一名角色的牌。
|
--- 弃置一名角色的牌。
|
||||||
|
|
|
@ -7,10 +7,6 @@ Fk:loadTranslationTable({
|
||||||
["wu"] = "*Wu*",
|
["wu"] = "*Wu*",
|
||||||
["qun"] = "*Neutral*",
|
["qun"] = "*Neutral*",
|
||||||
|
|
||||||
["black"] = "Black",
|
|
||||||
["red"] = '<font color="#CC3131">Red</font>',
|
|
||||||
["nocolor"] = '<font color="grey">NoColor</font>',
|
|
||||||
|
|
||||||
["caocao"] = "Cao Cao",
|
["caocao"] = "Cao Cao",
|
||||||
["jianxiong"] = "Villainous Hero",
|
["jianxiong"] = "Villainous Hero",
|
||||||
[":jianxiong"] = "After you suffer DMG: you can take the card(s) that caused it.",
|
[":jianxiong"] = "After you suffer DMG: you can take the card(s) that caused it.",
|
||||||
|
|
|
@ -7,10 +7,6 @@ Fk:loadTranslationTable{
|
||||||
["wu"] = "吴",
|
["wu"] = "吴",
|
||||||
["qun"] = "群",
|
["qun"] = "群",
|
||||||
|
|
||||||
["black"] = "黑色",
|
|
||||||
["red"] = '<font color="#CC3131">红色</font>',
|
|
||||||
["nocolor"] = '<font color="grey">无色</font>',
|
|
||||||
|
|
||||||
["caocao"] = "曹操",
|
["caocao"] = "曹操",
|
||||||
["~caocao"] = "霸业未成!未成啊!",
|
["~caocao"] = "霸业未成!未成啊!",
|
||||||
["$jianxiong1"] = "宁教我负天下人,休教天下人负我!",
|
["$jianxiong1"] = "宁教我负天下人,休教天下人负我!",
|
||||||
|
|
|
@ -4,16 +4,19 @@ Fk:loadTranslationTable({
|
||||||
["standard_cards"] = "Standard",
|
["standard_cards"] = "Standard",
|
||||||
|
|
||||||
["unknown_card"] = '<font color="#B5BA00"><b>Unknown card</b></font>',
|
["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_heart"] = '<font color="#CC3131">♥</font>',
|
||||||
["log_club"] = "♣",
|
["log_club"] = '<font color="black">♣</font>',
|
||||||
["log_diamond"] = '<font color="#CC3131">♦</font>',
|
["log_diamond"] = '<font color="#CC3131">♦</font>',
|
||||||
["log_nosuit"] = "No suit",
|
["log_nosuit"] = "No suit",
|
||||||
["nosuit"] = "No suit",
|
|
||||||
-- ["spade"] = "Spade",
|
-- ["spade"] = "Spade",
|
||||||
-- ["heart"] = "Heart",
|
-- ["heart"] = "Heart",
|
||||||
-- ["club"] = "Club",
|
-- ["club"] = "Club",
|
||||||
-- ["diamond"] = "Diamond",
|
-- ["diamond"] = "Diamond",
|
||||||
|
["nosuit"] = "No suit",
|
||||||
|
["black"] = '<font color="black">黑色</font>',
|
||||||
|
["red"] = '<font color="#CC3131">Red</font>',
|
||||||
|
["nocolor"] = '<font color="grey">NoColor</font>',
|
||||||
-- ["suit"] = "花色",
|
-- ["suit"] = "花色",
|
||||||
-- ["color"] = "颜色",
|
-- ["color"] = "颜色",
|
||||||
-- ["number"] = "点数",
|
-- ["number"] = "点数",
|
||||||
|
|
|
@ -4,16 +4,19 @@ Fk:loadTranslationTable{
|
||||||
["standard_cards"] = "标+EX",
|
["standard_cards"] = "标+EX",
|
||||||
|
|
||||||
["unknown_card"] = '<font color="#B5BA00"><b>未知牌</b></font>',
|
["unknown_card"] = '<font color="#B5BA00"><b>未知牌</b></font>',
|
||||||
["log_spade"] = "♠",
|
["log_spade"] = '<font color="black">♠</font>',
|
||||||
["log_heart"] = '<font color="#CC3131">♥</font>',
|
["log_heart"] = '<font color="#CC3131">♥</font>',
|
||||||
["log_club"] = "♣",
|
["log_club"] = '<font color="black">♣</font>',
|
||||||
["log_diamond"] = '<font color="#CC3131">♦</font>',
|
["log_diamond"] = '<font color="#CC3131">♦</font>',
|
||||||
["log_nosuit"] = "无花色",
|
["log_nosuit"] = "无花色",
|
||||||
["nosuit"] = "无花色",
|
|
||||||
["spade"] = "黑桃",
|
["spade"] = "黑桃",
|
||||||
["heart"] = "红桃",
|
["heart"] = "红桃",
|
||||||
["club"] = "梅花",
|
["club"] = "梅花",
|
||||||
["diamond"] = "方块",
|
["diamond"] = "方块",
|
||||||
|
["nosuit"] = "无花色",
|
||||||
|
["black"] = '<font color="black">黑色</font>',
|
||||||
|
["red"] = '<font color="#CC3131">红色</font>',
|
||||||
|
["nocolor"] = '<font color="grey">无色</font>',
|
||||||
["suit"] = "花色",
|
["suit"] = "花色",
|
||||||
["color"] = "颜色",
|
["color"] = "颜色",
|
||||||
["number"] = "点数",
|
["number"] = "点数",
|
||||||
|
|
Loading…
Reference in New Issue