|
@ -21,6 +21,7 @@ chmod 644 assets/res/certs/*
|
||||||
mkdir assets/res/packages
|
mkdir assets/res/packages
|
||||||
cp -r ../packages/standard assets/res/packages
|
cp -r ../packages/standard assets/res/packages
|
||||||
cp -r ../packages/standard_cards assets/res/packages
|
cp -r ../packages/standard_cards assets/res/packages
|
||||||
|
cp -r ../packages/maneuvering assets/res/packages
|
||||||
cp -r ../packages/test assets/res/packages
|
cp -r ../packages/test assets/res/packages
|
||||||
rm assets/res/packages/test/test.lua
|
rm assets/res/packages/test/test.lua
|
||||||
cp ../packages/init.sql assets/res/packages
|
cp ../packages/init.sql assets/res/packages
|
||||||
|
|
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 24 KiB |
|
@ -125,6 +125,9 @@ Fk:loadTranslationTable{
|
||||||
["phase_draw"] = "摸牌阶段",
|
["phase_draw"] = "摸牌阶段",
|
||||||
["phase_play"] = "出牌阶段",
|
["phase_play"] = "出牌阶段",
|
||||||
["phase_discard"] = "弃牌阶段",
|
["phase_discard"] = "弃牌阶段",
|
||||||
|
|
||||||
|
["chained"] = "横置",
|
||||||
|
["not-chained"] = "重置",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- related to sendLog
|
-- related to sendLog
|
||||||
|
@ -142,6 +145,8 @@ Fk:loadTranslationTable{
|
||||||
|
|
||||||
["$DrawCards"] = "%from 摸了 %arg 张牌 %card",
|
["$DrawCards"] = "%from 摸了 %arg 张牌 %card",
|
||||||
["$DiscardCards"] = "%from 弃置了 %arg 张牌 %card",
|
["$DiscardCards"] = "%from 弃置了 %arg 张牌 %card",
|
||||||
|
["$InstallEquip"] = "%from 装备了 %card",
|
||||||
|
["$UninstallEquip"] = "%from 卸载了 %card",
|
||||||
|
|
||||||
-- phase
|
-- phase
|
||||||
["#PhaseSkipped"] = "%from 跳过了 %arg",
|
["#PhaseSkipped"] = "%from 跳过了 %arg",
|
||||||
|
@ -192,4 +197,6 @@ Fk:loadTranslationTable{
|
||||||
|
|
||||||
-- misc
|
-- misc
|
||||||
["#GuanxingResult"] = "%from 的观星结果为 %arg 上 %arg2 下",
|
["#GuanxingResult"] = "%from 的观星结果为 %arg 上 %arg2 下",
|
||||||
|
["#ChainStateChange"] = "%from %arg 了武将牌",
|
||||||
|
["#ChainDamage"] = "%from 处于连环状态,将受到传导的伤害",
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,8 @@ local function matchCard(matcher, card)
|
||||||
card = Fk:getCardById(card)
|
card = Fk:getCardById(card)
|
||||||
end
|
end
|
||||||
|
|
||||||
if matcher.name and not table.contains(matcher.name, card.name) then
|
if matcher.name and not table.contains(matcher.name, card.name) and
|
||||||
|
not table.contains(matcher.name, card.trueName) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -463,6 +463,10 @@ function Player:isWounded()
|
||||||
return self.hp < self.maxHp
|
return self.hp < self.maxHp
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Player:getLostHp()
|
||||||
|
return math.min(self.maxHp - self.hp, self.maxHp)
|
||||||
|
end
|
||||||
|
|
||||||
---@param skill string | Skill
|
---@param skill string | Skill
|
||||||
---@return Skill
|
---@return Skill
|
||||||
local function getActualSkill(skill)
|
local function getActualSkill(skill)
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
local playCardEmotionAndSound = function(room, player, card)
|
local playCardEmotionAndSound = function(room, player, card)
|
||||||
if card.type ~= Card.TypeEquip then
|
if card.type ~= Card.TypeEquip then
|
||||||
room:setEmotion(player, "./packages/" ..
|
local anim_path = "./packages/" .. card.package.extensionName .. "/image/anim/" .. card.name
|
||||||
card.package.extensionName .. "/image/anim/" .. card.name)
|
if not FileIO.exists(anim_path) then
|
||||||
|
for _, dir in ipairs(FileIO.ls("./packages/")) do
|
||||||
|
anim_path = "./packages/" .. dir .. "/image/anim/" .. card.name
|
||||||
|
if FileIO.exists(anim_path) then break end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if FileIO.exists(anim_path) then room:setEmotion(player, anim_path) end
|
||||||
end
|
end
|
||||||
|
|
||||||
local soundName
|
local soundName
|
||||||
|
@ -19,6 +25,13 @@ local playCardEmotionAndSound = function(room, player, card)
|
||||||
else
|
else
|
||||||
soundName = "./packages/" .. card.package.extensionName .. "/audio/card/"
|
soundName = "./packages/" .. card.package.extensionName .. "/audio/card/"
|
||||||
.. (player.gender == General.Male and "male/" or "female/") .. card.name
|
.. (player.gender == General.Male and "male/" or "female/") .. card.name
|
||||||
|
if not FileIO.exists(soundName .. ".mp3") then
|
||||||
|
for _, dir in ipairs(FileIO.ls("./packages/")) do
|
||||||
|
soundName = "./packages/" .. dir .. "/audio/card/"
|
||||||
|
.. (player.gender == General.Male and "male/" or "female/") .. card.name
|
||||||
|
if FileIO.exists(soundName .. ".mp3") then break end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
room:broadcastPlaySound(soundName)
|
room:broadcastPlaySound(soundName)
|
||||||
end
|
end
|
||||||
|
|
|
@ -899,7 +899,10 @@ function Room:askForCardsChosen(chooser, target, min, max, flag, reason)
|
||||||
end
|
end
|
||||||
|
|
||||||
local new_ret = table.filter(ret, function(id) return id ~= -1 end)
|
local new_ret = table.filter(ret, function(id) return id ~= -1 end)
|
||||||
table.insertTable(new_ret, table.random(target:getCardIds(Player.Hand), #ret - #new_ret))
|
local hand_num = #ret - #new_ret
|
||||||
|
if hand_num > 0 then
|
||||||
|
table.insertTable(new_ret, table.random(target:getCardIds(Player.Hand), hand_num))
|
||||||
|
end
|
||||||
|
|
||||||
return new_ret
|
return new_ret
|
||||||
end
|
end
|
||||||
|
|
|
@ -510,4 +510,15 @@ function ServerPlayer:setSkillUseHistory(cardName, num, scope)
|
||||||
self:doNotify("SetSkillUseHistory", json.encode{cardName, num, scope})
|
self:doNotify("SetSkillUseHistory", json.encode{cardName, num, scope})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param chained boolean
|
||||||
|
function ServerPlayer:setChainState(chained)
|
||||||
|
self.chained = chained
|
||||||
|
self.room:broadcastProperty(self, "chained")
|
||||||
|
self.room:sendLog{
|
||||||
|
type = "#ChainStateChange",
|
||||||
|
from = self.id,
|
||||||
|
arg = self.chained and "chained" or "not-chained"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
return ServerPlayer
|
return ServerPlayer
|
||||||
|
|
|
@ -47,6 +47,7 @@ fk.FireDamage = 3
|
||||||
---@field to ServerPlayer
|
---@field to ServerPlayer
|
||||||
---@field damage integer
|
---@field damage integer
|
||||||
---@field card Card
|
---@field card Card
|
||||||
|
---@field chain boolean
|
||||||
---@field damageType DamageType
|
---@field damageType DamageType
|
||||||
---@field skillName string
|
---@field skillName string
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
!standard/
|
!standard/
|
||||||
!standard_cards/
|
!standard_cards/
|
||||||
!test/
|
!test/
|
||||||
!manuvering/
|
!maneuvering/
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!init.sql
|
!init.sql
|
||||||
|
|
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 724 B |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 20 KiB |