From b34343317f4664591a6a86de1bf6f7e5032bdc67 Mon Sep 17 00:00:00 2001 From: YoumuKon <38815081+YoumuKon@users.noreply.github.com> Date: Sat, 20 Apr 2024 10:04:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=BB=E9=87=8F=E7=BA=A7bugfix=20(#351)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复了造成无来源伤害牌的bug - 修复了从处理区获得的牌仍然偏转的bug - 修复了甩不掉新手保护的bug - 优化了移动牌显示 --- Fk/RoomElement/TablePile.qml | 2 +- lua/client/client_util.lua | 2 +- lua/server/events/hp.lua | 3 ++- lua/server/room.lua | 2 +- packages/standard_cards/init.lua | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Fk/RoomElement/TablePile.qml b/Fk/RoomElement/TablePile.qml index b88eb173..c6855d20 100644 --- a/Fk/RoomElement/TablePile.qml +++ b/Fk/RoomElement/TablePile.qml @@ -98,7 +98,7 @@ Item { c.selectable = false; c.height = c.height / 0.8; c.width = c.width / 0.8; - // c.rotation = 0; + c.rotation = 0; }); const vanished = []; if (result.length < outputs.length) { diff --git a/lua/client/client_util.lua b/lua/client/client_util.lua index 130ed61d..a0c8dce3 100644 --- a/lua/client/client_util.lua +++ b/lua/client/client_util.lua @@ -695,7 +695,7 @@ function SetPlayerGameData(pid, data) local total, win, run = table.unpack(data) p.player:setGameData(total, win, run) table.insert(data, 1, pid) - ClientInstance:notifyUI("UpdateGameData", json.encode(data)) + ClientInstance:notifyUI("UpdateGameData", data) end function FilterMyHandcards() diff --git a/lua/server/events/hp.lua b/lua/server/events/hp.lua index ee316db2..15fb92e8 100644 --- a/lua/server/events/hp.lua +++ b/lua/server/events/hp.lua @@ -116,7 +116,8 @@ GameEvent.functions[GameEvent.Damage] = function(self) local damageStruct = table.unpack(self.data) local room = self.room local logic = room.logic - if not damageStruct.chain and logic:damageByCardEffect(true) then + + if not damageStruct.chain and logic:damageByCardEffect(not not damageStruct.from) then local cardEffectData = logic:getCurrentEvent():findParent(GameEvent.CardEffect) if cardEffectData then local cardEffectEvent = cardEffectData.data[1] diff --git a/lua/server/room.lua b/lua/server/room.lua index 15ff53bf..6a0f69a9 100644 --- a/lua/server/room.lua +++ b/lua/server/room.lua @@ -926,7 +926,7 @@ function Room:notifyMoveCards(players, card_moves, forceVisible) if not (move.moveVisible or forceVisible or containArea(move.toArea, move.to and p.isBuddy and p:isBuddy(move.to))) then for _, info in ipairs(move.moveInfo) do - if not containArea(info.fromArea, move.from == p.id) then + if not containArea(info.fromArea, move.from and p.isBuddy and p:isBuddy(move.from)) then info.cardId = -1 end end diff --git a/packages/standard_cards/init.lua b/packages/standard_cards/init.lua index d4827b6a..962e3d11 100644 --- a/packages/standard_cards/init.lua +++ b/packages/standard_cards/init.lua @@ -709,7 +709,7 @@ local lightningSkill = fk.CreateActiveSkill{ } room:moveCards{ - ids = { effect.cardId }, + ids = Card:getIdList(effect.card), toArea = Card.DiscardPile, moveReason = fk.ReasonUse }