diff --git a/lua/core/card.lua b/lua/core/card.lua index 0b86d6fa..b590d716 100644 --- a/lua/core/card.lua +++ b/lua/core/card.lua @@ -137,6 +137,7 @@ function Card:clone(suit, number) newCard.skill = self.skill newCard.special_skills = self.special_skills newCard.equip_skill = self.equip_skill + newCard.attack_range = self.attack_range newCard.is_damage_card = self.is_damage_card return newCard end diff --git a/lua/server/events/usecard.lua b/lua/server/events/usecard.lua index 85d63aeb..b308b25c 100644 --- a/lua/server/events/usecard.lua +++ b/lua/server/events/usecard.lua @@ -210,7 +210,7 @@ GameEvent.cleaners[GameEvent.UseCard] = function(self) self:moveCards({ ids = leftRealCardIds, toArea = Card.DiscardPile, - moveReason = fk.ReasonPutIntoDiscardPile, + moveReason = fk.ReasonUse, }) end end @@ -271,7 +271,7 @@ GameEvent.cleaners[GameEvent.RespondCard] = function(self) self:moveCards({ ids = realCardIds, toArea = Card.DiscardPile, - moveReason = fk.ReasonPutIntoDiscardPile, + moveReason = fk.ReasonResonpse, }) end end diff --git a/packages/maneuvering/init.lua b/packages/maneuvering/init.lua index a4b8957b..94b5efd1 100644 --- a/packages/maneuvering/init.lua +++ b/packages/maneuvering/init.lua @@ -249,7 +249,7 @@ local fireAttackSkill = fk.CreateActiveSkill{ from = from, to = to, card = cardEffectEvent.card, - damage = 1, + damage = 1 + (cardEffectEvent.additionalDamage or 0), damageType = fk.FireDamage, skillName = self.name }) diff --git a/packages/standard/aux_skills.lua b/packages/standard/aux_skills.lua index 52845cfa..7b86f45e 100644 --- a/packages/standard/aux_skills.lua +++ b/packages/standard/aux_skills.lua @@ -70,8 +70,39 @@ local choosePlayersSkill = fk.CreateActiveSkill{ max_target_num = function(self) return self.num end, } +local maxCardsSkill = fk.CreateMaxCardsSkill{ + name = "max_cards_skill", + global = true, + correct_func = function(self, player) + return player:getMark("AddMaxCards") + player:getMark("AddMaxCards-turn") - player:getMark("MinusMaxCards") - player:getMark("MinusMaxCards-turn") + end, +} + +local moveTokenSkill = fk.CreateTriggerSkill{ + name = "move_token_skill", + global = true, + + refresh_events = {fk.GameStart}, --refresh优先于on_use,不要在正常的游戏开始发牌技能refresh中拿牌 + can_refresh = function(self, event, target, player, data) + return player.seat == 1 + end, + on_refresh = function(self, event, target, player, data) + local room = player.room + for i = #room.draw_pile, 1, -1 do + if Fk:getCardById(room.draw_pile[i]).name[1] == "&" then + local id = room.draw_pile[i] + table.removeOne(room.draw_pile, id) + table.insert(room.void, id) + room:setCardArea(id, Card.Void, nil) + end + end + end, +} + AuxSkills = { discardSkill, chooseCardsSkill, choosePlayersSkill, + maxCardsSkill, + moveTokenSkill, } diff --git a/qml/Pages/Common/ChatBox.qml b/qml/Pages/Common/ChatBox.qml index 22380ce3..ea71d5cc 100644 --- a/qml/Pages/Common/ChatBox.qml +++ b/qml/Pages/Common/ChatBox.qml @@ -22,7 +22,7 @@ Rectangle { id: chatLogBox anchors.fill: parent anchors.margins: 10 - font.pixelSize: 14 + //font.pixelSize: 14 } } diff --git a/qml/Pages/Common/LogEdit.qml b/qml/Pages/Common/LogEdit.qml index 42cfabc8..3735e77c 100644 --- a/qml/Pages/Common/LogEdit.qml +++ b/qml/Pages/Common/LogEdit.qml @@ -3,16 +3,16 @@ import QtQuick import QtQuick.Controls -Flickable { +ListView { id: root - property alias font: textEdit.font - property alias text: textEdit.text - property alias color: textEdit.color - property alias textFormat: textEdit.textFormat + //property alias font: textEdit.font + //property alias text: textEdit.text + //property alias color: textEdit.color + //property alias textFormat: textEdit.textFormat - flickableDirection: Flickable.VerticalFlick - contentWidth: textEdit.width - contentHeight: textEdit.height + //flickableDirection: Flickable.VerticalFlick + //contentWidth: textEdit.width + //contentHeight: textEdit.height clip: true ScrollBar.vertical: ScrollBar { parent: root.parent @@ -21,9 +21,11 @@ Flickable { anchors.bottom: root.bottom } - TextEdit { + model: ListModel { id: logModel } + delegate: TextEdit { id: textEdit + text: logText width: root.width clip: true readOnly: true @@ -36,7 +38,7 @@ Flickable { function append(text) { let autoScroll = atYEnd; - textEdit.append(text); + logModel.append({ logText: text }); if (autoScroll && contentHeight > contentY + height) { contentY = contentHeight - height; } diff --git a/qml/Pages/RoomLogic.js b/qml/Pages/RoomLogic.js index 78774634..9da43653 100644 --- a/qml/Pages/RoomLogic.js +++ b/qml/Pages/RoomLogic.js @@ -146,7 +146,7 @@ function getPhotoOrDashboard(id) { function getAreaItem(area, id) { if (area === Card.DrawPile) { return drawPile; - } else if (area === Card.DiscardPile || area === Card.Processing) { + } else if (area === Card.DiscardPile || area === Card.Processing || area === Card.Void) { return tablePile; } else if (area === Card.AG) { return popupBox.item;