|
@ -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
packages/.gitignore
vendored
|
@ -2,6 +2,6 @@
|
||||||
!standard/
|
!standard/
|
||||||
!standard_cards/
|
!standard_cards/
|
||||||
!test/
|
!test/
|
||||||
!manuvering/
|
!maneuvering/
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!init.sql
|
!init.sql
|
||||||
|
|
BIN
packages/maneuvering/audio/card/fan.mp3
Normal file
BIN
packages/maneuvering/audio/card/female/analeptic.mp3
Normal file
BIN
packages/maneuvering/audio/card/female/fire__slash.mp3
Normal file
BIN
packages/maneuvering/audio/card/female/fire_attack.mp3
Normal file
BIN
packages/maneuvering/audio/card/female/iron_chain.mp3
Normal file
BIN
packages/maneuvering/audio/card/female/supply_shortage.mp3
Normal file
BIN
packages/maneuvering/audio/card/female/thunder__slash.mp3
Normal file
BIN
packages/maneuvering/audio/card/guding_blade.mp3
Normal file
BIN
packages/maneuvering/audio/card/male/analeptic.mp3
Normal file
BIN
packages/maneuvering/audio/card/male/fire__slash.mp3
Normal file
BIN
packages/maneuvering/audio/card/male/fire_attack.mp3
Normal file
BIN
packages/maneuvering/audio/card/male/iron_chain.mp3
Normal file
BIN
packages/maneuvering/audio/card/male/supply_shortage.mp3
Normal file
BIN
packages/maneuvering/audio/card/male/thunder__slash.mp3
Normal file
BIN
packages/maneuvering/audio/card/silver_lion.mp3
Normal file
BIN
packages/maneuvering/audio/card/vine.mp3
Normal file
BIN
packages/maneuvering/audio/card/vineburn.mp3
Normal file
BIN
packages/maneuvering/image/anim/fan/0.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
packages/maneuvering/image/anim/fan/1.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
packages/maneuvering/image/anim/fan/10.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
packages/maneuvering/image/anim/fan/11.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
packages/maneuvering/image/anim/fan/12.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
packages/maneuvering/image/anim/fan/13.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
packages/maneuvering/image/anim/fan/14.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
packages/maneuvering/image/anim/fan/15.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
packages/maneuvering/image/anim/fan/16.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
packages/maneuvering/image/anim/fan/17.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
packages/maneuvering/image/anim/fan/18.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
packages/maneuvering/image/anim/fan/19.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
packages/maneuvering/image/anim/fan/2.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
packages/maneuvering/image/anim/fan/20.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
packages/maneuvering/image/anim/fan/21.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
packages/maneuvering/image/anim/fan/22.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
packages/maneuvering/image/anim/fan/23.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
packages/maneuvering/image/anim/fan/3.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
packages/maneuvering/image/anim/fan/4.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
packages/maneuvering/image/anim/fan/5.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
packages/maneuvering/image/anim/fan/6.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
packages/maneuvering/image/anim/fan/7.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
packages/maneuvering/image/anim/fan/8.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
packages/maneuvering/image/anim/fan/9.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/0.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/1.png
Normal file
After Width: | Height: | Size: 724 B |
BIN
packages/maneuvering/image/anim/fire__slash/10.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/11.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/12.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/13.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/14.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/15.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/16.png
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/17.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/18.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/19.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/2.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/20.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/21.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/22.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/23.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/3.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/4.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/5.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/6.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/7.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/8.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
packages/maneuvering/image/anim/fire__slash/9.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/0.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/1.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/10.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/11.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/12.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/13.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/14.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/15.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/16.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/17.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/18.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/19.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/2.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/20.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/21.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/22.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/23.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/24.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/3.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/4.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/5.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/6.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
packages/maneuvering/image/anim/guding_blade/7.png
Normal file
After Width: | Height: | Size: 20 KiB |