diff --git a/lua/client/i18n/zh_CN.lua b/lua/client/i18n/zh_CN.lua index 07ced9dd..3b150d87 100644 --- a/lua/client/i18n/zh_CN.lua +++ b/lua/client/i18n/zh_CN.lua @@ -334,6 +334,7 @@ Fk:loadTranslationTable{ ["general_card"] = "武将牌", ["General"] = "武将", + ["noGeneral"] = "无武将", ["Hp"] = "体力", ["Damage"] = "伤害", ["Lost"] = "失去", @@ -366,8 +367,8 @@ Fk:loadTranslationTable{ ["#LoseSkill"] = "%from 失去了技能 “%arg”", -- moveCards (they are sent by notifyMoveCards) - ["$PutCard"] = "%from 的 %arg 张牌被置于牌堆顶", - ["$PutKnownCard"] = "%from 的牌 %card 被置于牌堆顶", + ["$PutCard"] = "%from 的 %arg 张牌被置于牌堆", + ["$PutKnownCard"] = "%from 的牌 %card 被置于牌堆", ["$RemoveCardFromGame"] = "%arg2 张牌被作为 %arg 移出游戏", ["$AddToPile"] = "%card 被作为 %arg 移出游戏", ["$GetCardsFromPile"] = "%from 从 %arg 中获得了 %arg2 张牌 %card", diff --git a/lua/core/player.lua b/lua/core/player.lua index 811a5938..28dcb81b 100644 --- a/lua/core/player.lua +++ b/lua/core/player.lua @@ -992,16 +992,8 @@ function Player:getAvailableEquipSlots(subtype) local tempSealedSlots = table.simpleClone(self.sealedSlots) if subtype then - local subtype2slot = { - [Card.SubtypeWeapon] = Player.WeaponSlot, - [Card.SubtypeArmor] = Player.ArmorSlot, - [Card.SubtypeOffensiveRide] = Player.OffensiveRideSlot, - [Card.SubtypeDefensiveRide] = Player.DefensiveRideSlot, - [Card.SubtypeTreasure] = Player.TreasureSlot, - } - local singleSlot = table.filter(tempSlots, function(slot) - return slot == subtype2slot[subtype] + return slot == Util.convertSubtypeAndEquipSlot(subtype) end) for _, sealedSlot in ipairs(tempSealedSlots) do diff --git a/lua/server/room.lua b/lua/server/room.lua index e8d8d274..17d01628 100644 --- a/lua/server/room.lua +++ b/lua/server/room.lua @@ -581,7 +581,7 @@ function Room:changeHero(player, new_general, full, isDeputy, sendLog, maxHpChan local orig = isDeputy and (player.deputyGeneral or "") or player.general orig = Fk.generals[orig] - local orig_skills = orig and orig:getSkillNameList() + local orig_skills = orig and orig:getSkillNameList() or Util.DummyTable local new = Fk.generals[new_general] or Fk.generals["sunce"] or Fk.generals["blank_shibing"] local new_skills = {} @@ -618,7 +618,7 @@ function Room:changeHero(player, new_general, full, isDeputy, sendLog, maxHpChan self:sendLog{ type = "#ChangeHero", from = player.id, - arg = orig.name, + arg = orig and orig.name or "noGeneral", arg2 = new.name, arg3 = isDeputy and "deputyGeneral" or "mainGeneral" } diff --git a/packages/standard/init.lua b/packages/standard/init.lua index 412a6b75..cf7b4daa 100644 --- a/packages/standard/init.lua +++ b/packages/standard/init.lua @@ -624,7 +624,7 @@ local longdan = fk.CreateViewAsSkill{ else return false end - return (Fk.currentResponsePattern == nil and c.skill:canUse(Self)) or (Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(c)) + return (Fk.currentResponsePattern == nil and Self:canUse(c)) or (Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(c)) end, view_as = function(self, cards) if #cards ~= 1 then @@ -684,7 +684,8 @@ local jizhi = fk.CreateTriggerSkill{ anim_type = "drawcard", events = {fk.CardUsing}, can_trigger = function(self, event, target, player, data) - return target == player and player:hasSkill(self.name) and data.card:isCommonTrick() + return target == player and player:hasSkill(self.name) and data.card:isCommonTrick() and + (not data.card:isVirtual() or #data.card.subcards == 0) end, on_use = function(self, event, target, player, data) player:drawCards(1, self.name) @@ -1008,7 +1009,7 @@ local jieyin = fk.CreateActiveSkill{ local target = Fk:currentRoom():getPlayerById(to_select) return target:isWounded() and target.gender == General.Male - and #selected < 1 + and #selected < 1 and to_select ~= Self.id end, target_num = 1, card_num = 2,