mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
Changelog: v0.3.7
This commit is contained in:
parent
db2910d1f0
commit
17f981f135
|
@ -2,6 +2,14 @@
|
|||
|
||||
___
|
||||
|
||||
## v0.3.7
|
||||
|
||||
新老bug一起修复!
|
||||
|
||||
这个周末是真的忙
|
||||
|
||||
___
|
||||
|
||||
## v0.3.5
|
||||
|
||||
小测一下,修了bug推个稳定版
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(FreeKill VERSION 0.3.6)
|
||||
project(FreeKill VERSION 0.3.7)
|
||||
add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\")
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS
|
||||
|
|
|
@ -275,7 +275,12 @@ Item {
|
|||
contentItem: ColumnLayout {
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
text: Backend.translate(name) + (idx ? " (" + idx.toString() + ")" : "")
|
||||
text: {
|
||||
if (name.endsWith("_win_audio")) {
|
||||
return "胜利语音";
|
||||
}
|
||||
return Backend.translate(name) + (idx ? " (" + idx.toString() + ")" : "");
|
||||
}
|
||||
font.bold: true
|
||||
font.pixelSize: 14
|
||||
}
|
||||
|
|
|
@ -1107,7 +1107,7 @@ Item {
|
|||
i: idx,
|
||||
}));
|
||||
} catch (e) {}
|
||||
const m = Backend.translate("$" + skill + (gene ? "_" + gene : "") + idx.toString());
|
||||
const m = Backend.translate("$" + skill + (gene ? "_" + gene : "") + (idx ? idx.toString() : ""));
|
||||
if (general === "")
|
||||
chat.append(`[${time}] ${userName}: ${m}`);
|
||||
else
|
||||
|
|
|
@ -98,7 +98,7 @@ CardItem {
|
|||
}
|
||||
|
||||
Shield {
|
||||
visible: detailed
|
||||
visible: shieldNum > 0 && detailed
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: hpRepeater.model > 4 ? 16 : 0
|
||||
|
|
|
@ -11,7 +11,7 @@ GraphicsBox {
|
|||
|
||||
// TODO: Adjust the UI design in case there are more than 7 cards
|
||||
width: 70 + 700
|
||||
height: 50 + Math.min(cardView.contentHeight, 400) + (multiChoose ? 20 : 0)
|
||||
height: 64 + Math.min(cardView.contentHeight, 400) + (multiChoose ? 20 : 0)
|
||||
|
||||
signal cardSelected(int cid)
|
||||
signal cardsSelected(var ids)
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.notify.FreeKill"
|
||||
android:installLocation="preferExternal"
|
||||
android:versionCode="306"
|
||||
android:versionName="0.3.6">
|
||||
android:versionCode="307"
|
||||
android:versionName="0.3.7">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
|
|
@ -284,11 +284,11 @@ FreeKill使用的是libgit2的C API,与此同时使用Git完成拓展包的下
|
|||
["Resume"] = "继续",
|
||||
|
||||
["Bulletin Info"] = [==[
|
||||
## v0.3.6
|
||||
## v0.3.7
|
||||
|
||||
0.3.6版本,修复bug,手机不会息屏。
|
||||
0.3.7版本,修复bug,下载拓展不会闪退(但愿如此)。
|
||||
|
||||
优化谋徐盛。
|
||||
移除了谋徐盛。
|
||||
]==],
|
||||
}
|
||||
|
||||
|
@ -446,6 +446,7 @@ Fk:loadTranslationTable{
|
|||
["#GuanxingResult"] = "%from 的观星结果为 %arg 上 %arg2 下",
|
||||
["#ChainStateChange"] = "%from %arg 了武将牌",
|
||||
["#ChainDamage"] = "%from 处于连环状态,将受到传导的伤害",
|
||||
["#ChangeKingdom"] = "%from 的国籍从 %arg 变成了 %arg2",
|
||||
}
|
||||
|
||||
-- card footnote
|
||||
|
|
|
@ -1,114 +1,114 @@
|
|||
-- SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
GameEvent.functions[GameEvent.ChangeProperty] = function(self)
|
||||
local data = table.unpack(self.data)
|
||||
local room = self.room
|
||||
local player = data.from
|
||||
local logic = room.logic
|
||||
logic:trigger(fk.BeforePropertyChange, player, data)
|
||||
|
||||
data.sendLog = data.sendLog or false
|
||||
local skills = {}
|
||||
|
||||
if data.general and data.general ~= "" and data.general ~= player.general then
|
||||
local originalGeneral = Fk.generals[player.general] or Fk.generals["blank_shibing"]
|
||||
local originalSkills = originalGeneral and originalGeneral:getSkillNameList() or Util.DummyTable
|
||||
table.insertTableIfNeed(skills, table.map(originalSkills, function(e)
|
||||
return "-" .. e
|
||||
end))
|
||||
local newGeneral = Fk.generals[data.general] or Fk.generals["blank_shibing"]
|
||||
for _, name in ipairs(newGeneral:getSkillNameList()) do
|
||||
local s = Fk.skills[name]
|
||||
if not s.relate_to_place or s.relate_to_place == "m" then
|
||||
table.insertIfNeed(skills, name)
|
||||
end
|
||||
end
|
||||
if data.sendLog then
|
||||
room:sendLog{
|
||||
type = "#ChangeHero",
|
||||
from = player.id,
|
||||
arg = player.general,
|
||||
arg2 = data.general,
|
||||
arg3 = "mainGeneral",
|
||||
}
|
||||
end
|
||||
data.results["generalChange"] = {player.general, data.general}
|
||||
room:setPlayerProperty(player, "general", data.general)
|
||||
end
|
||||
|
||||
if data.deputyGeneral and data.deputyGeneral ~= "" and data.deputyGeneral ~= player.deputyGeneral then
|
||||
local originalDeputy = Fk.generals[player.deputyGeneral] or Fk.generals["blank_shibing"]
|
||||
local originalSkills = originalDeputy and originalDeputy:getSkillNameList() or Util.DummyTable
|
||||
table.insertTableIfNeed(skills, table.map(originalSkills, function(e)
|
||||
return "-" .. e
|
||||
end))
|
||||
local newDeputy = Fk.generals[data.deputyGeneral] or Fk.generals["blank_shibing"]
|
||||
for _, name in ipairs(newDeputy:getSkillNameList()) do
|
||||
local s = Fk.skills[name]
|
||||
if not s.relate_to_place or s.relate_to_place == "d" then
|
||||
table.insertIfNeed(skills, name)
|
||||
end
|
||||
end
|
||||
if data.sendLog then
|
||||
room:sendLog{
|
||||
type = "#ChangeHero",
|
||||
from = player.id,
|
||||
arg = player.deputyGeneral,
|
||||
arg2 = data.deputyGeneral,
|
||||
arg3 = "deputyGeneral",
|
||||
}
|
||||
end
|
||||
data.results["deputyChange"] = {player.deputyGeneral, data.deputyGeneral}
|
||||
room:setPlayerProperty(player, "deputyGeneral", data.deputyGeneral)
|
||||
end
|
||||
|
||||
if data.gender and data.gender ~= player.gender then
|
||||
data.results["genderChange"] = {player.gender, data.gender}
|
||||
room:setPlayerProperty(player, "gender", data.gender)
|
||||
end
|
||||
|
||||
if data.kingdom and data.kingdom ~= "" and data.kingdom ~= player.kingdom then
|
||||
if data.sendLog then
|
||||
room:sendLog{
|
||||
type = "#ChangeKingdom",
|
||||
from = player.id,
|
||||
arg = player.kingdom,
|
||||
arg2 = data.kingdom,
|
||||
}
|
||||
end
|
||||
data.results["kingdomChange"] = {player.kingdom, data.kingdom}
|
||||
room:setPlayerProperty(player, "kingdom", data.kingdom)
|
||||
end
|
||||
|
||||
for _, s in ipairs(Fk.generals[player.general].skills) do
|
||||
if #s.attachedKingdom > 0 then
|
||||
if table.contains(s.attachedKingdom, player.kingdom) then
|
||||
table.insertIfNeed(skills, s.name)
|
||||
else
|
||||
if table.contains(skills, s.name) then
|
||||
table.removeOne(skills, s.name)
|
||||
else
|
||||
table.insertIfNeed(skills, "-"..s.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if player.deputyGeneral ~= "" then
|
||||
for _, s in ipairs(Fk.generals[player.deputyGeneral].skills) do
|
||||
if #s.attachedKingdom > 0 then
|
||||
if table.contains(s.attachedKingdom, player.kingdom) then
|
||||
table.insertIfNeed(skills, s.name)
|
||||
else
|
||||
if table.contains(skills, s.name) then
|
||||
table.removeOne(skills, s.name)
|
||||
else
|
||||
table.insertIfNeed(skills, "-"..s.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
room:handleAddLoseSkills(player, table.concat(skills, "|"), nil, data.sendLog, false)
|
||||
|
||||
logic:trigger(fk.AfterPropertyChange, player, data)
|
||||
end
|
||||
-- SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
GameEvent.functions[GameEvent.ChangeProperty] = function(self)
|
||||
local data = table.unpack(self.data)
|
||||
local room = self.room
|
||||
local player = data.from
|
||||
local logic = room.logic
|
||||
logic:trigger(fk.BeforePropertyChange, player, data)
|
||||
|
||||
data.sendLog = data.sendLog or false
|
||||
local skills = {}
|
||||
|
||||
if data.general and data.general ~= "" and data.general ~= player.general then
|
||||
local originalGeneral = Fk.generals[player.general] or Fk.generals["blank_shibing"]
|
||||
local originalSkills = originalGeneral and originalGeneral:getSkillNameList() or Util.DummyTable
|
||||
table.insertTableIfNeed(skills, table.map(originalSkills, function(e)
|
||||
return "-" .. e
|
||||
end))
|
||||
local newGeneral = Fk.generals[data.general] or Fk.generals["blank_shibing"]
|
||||
for _, name in ipairs(newGeneral:getSkillNameList()) do
|
||||
local s = Fk.skills[name]
|
||||
if not s.relate_to_place or s.relate_to_place == "m" then
|
||||
table.insertIfNeed(skills, name)
|
||||
end
|
||||
end
|
||||
if data.sendLog then
|
||||
room:sendLog{
|
||||
type = "#ChangeHero",
|
||||
from = player.id,
|
||||
arg = player.general,
|
||||
arg2 = data.general,
|
||||
arg3 = "mainGeneral",
|
||||
}
|
||||
end
|
||||
data.results["generalChange"] = {player.general, data.general}
|
||||
room:setPlayerProperty(player, "general", data.general)
|
||||
end
|
||||
|
||||
if data.deputyGeneral and data.deputyGeneral ~= "" and data.deputyGeneral ~= player.deputyGeneral then
|
||||
local originalDeputy = Fk.generals[player.deputyGeneral] or Fk.generals["blank_shibing"]
|
||||
local originalSkills = originalDeputy and originalDeputy:getSkillNameList() or Util.DummyTable
|
||||
table.insertTableIfNeed(skills, table.map(originalSkills, function(e)
|
||||
return "-" .. e
|
||||
end))
|
||||
local newDeputy = Fk.generals[data.deputyGeneral] or Fk.generals["blank_shibing"]
|
||||
for _, name in ipairs(newDeputy:getSkillNameList()) do
|
||||
local s = Fk.skills[name]
|
||||
if not s.relate_to_place or s.relate_to_place == "d" then
|
||||
table.insertIfNeed(skills, name)
|
||||
end
|
||||
end
|
||||
if data.sendLog then
|
||||
room:sendLog{
|
||||
type = "#ChangeHero",
|
||||
from = player.id,
|
||||
arg = player.deputyGeneral,
|
||||
arg2 = data.deputyGeneral,
|
||||
arg3 = "deputyGeneral",
|
||||
}
|
||||
end
|
||||
data.results["deputyChange"] = {player.deputyGeneral, data.deputyGeneral}
|
||||
room:setPlayerProperty(player, "deputyGeneral", data.deputyGeneral)
|
||||
end
|
||||
|
||||
if data.gender and data.gender ~= player.gender then
|
||||
data.results["genderChange"] = {player.gender, data.gender}
|
||||
room:setPlayerProperty(player, "gender", data.gender)
|
||||
end
|
||||
|
||||
if data.kingdom and data.kingdom ~= "" and data.kingdom ~= player.kingdom then
|
||||
if data.sendLog then
|
||||
room:sendLog{
|
||||
type = "#ChangeKingdom",
|
||||
from = player.id,
|
||||
arg = player.kingdom,
|
||||
arg2 = data.kingdom,
|
||||
}
|
||||
end
|
||||
data.results["kingdomChange"] = {player.kingdom, data.kingdom}
|
||||
room:setPlayerProperty(player, "kingdom", data.kingdom)
|
||||
end
|
||||
|
||||
for _, s in ipairs(Fk.generals[player.general].skills) do
|
||||
if #s.attachedKingdom > 0 then
|
||||
if table.contains(s.attachedKingdom, player.kingdom) then
|
||||
table.insertIfNeed(skills, s.name)
|
||||
else
|
||||
if table.contains(skills, s.name) then
|
||||
table.removeOne(skills, s.name)
|
||||
else
|
||||
table.insertIfNeed(skills, "-"..s.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if player.deputyGeneral ~= "" then
|
||||
for _, s in ipairs(Fk.generals[player.deputyGeneral].skills) do
|
||||
if #s.attachedKingdom > 0 then
|
||||
if table.contains(s.attachedKingdom, player.kingdom) then
|
||||
table.insertIfNeed(skills, s.name)
|
||||
else
|
||||
if table.contains(skills, s.name) then
|
||||
table.removeOne(skills, s.name)
|
||||
else
|
||||
table.insertIfNeed(skills, "-"..s.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
room:handleAddLoseSkills(player, table.concat(skills, "|"), nil, false, false)
|
||||
|
||||
logic:trigger(fk.AfterPropertyChange, player, data)
|
||||
end
|
||||
|
|
|
@ -38,6 +38,7 @@ GameEvent.functions[GameEvent.Pindian] = function(self)
|
|||
|
||||
table.insert(moveInfos, {
|
||||
ids = { _pindianCard.id },
|
||||
from = pindianData.from.id,
|
||||
fromArea = room:getCardArea(_pindianCard.id),
|
||||
toArea = Card.Processing,
|
||||
moveReason = fk.ReasonPut,
|
||||
|
|
15
mkfksource.sh
Executable file
15
mkfksource.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
dir=FreeKill-${FK_VER}
|
||||
mkdir $dir
|
||||
echo Copying
|
||||
cp -r ./Freekill/.git $dir
|
||||
|
||||
cd $dir
|
||||
git restore .
|
||||
git checkout v$FK_VER
|
||||
rm -rf .git lib docker docs android wasm
|
||||
cd ..
|
||||
|
||||
echo Compressing
|
||||
tar cfz ${dir}-source.tar.gz $dir
|
BIN
packages/test/audio/death/mouxusheng.mp3
Normal file
BIN
packages/test/audio/death/mouxusheng.mp3
Normal file
Binary file not shown.
BIN
packages/test/audio/skill/change_hero.mp3
Normal file
BIN
packages/test/audio/skill/change_hero.mp3
Normal file
Binary file not shown.
BIN
packages/test/audio/skill/cheat.mp3
Normal file
BIN
packages/test/audio/skill/cheat.mp3
Normal file
Binary file not shown.
BIN
packages/test/audio/skill/control.mp3
Normal file
BIN
packages/test/audio/skill/control.mp3
Normal file
Binary file not shown.
BIN
packages/test/audio/skill/damage_maker.mp3
Normal file
BIN
packages/test/audio/skill/damage_maker.mp3
Normal file
Binary file not shown.
BIN
packages/test/audio/skill/test_zhenggong.mp3
Normal file
BIN
packages/test/audio/skill/test_zhenggong.mp3
Normal file
Binary file not shown.
BIN
packages/test/image/generals/mouxusheng.jpg
Normal file
BIN
packages/test/image/generals/mouxusheng.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -41,10 +41,10 @@ local cheat = fk.CreateActiveSkill{
|
|||
end
|
||||
|
||||
local cardName = room:askForChoice(from, allCardNames, "cheat")
|
||||
local toGain = room:printCard(cardName, Card.Heart, 1)
|
||||
-- if #allCardMapper[cardName] > 0 then
|
||||
-- toGain = allCardMapper[cardName][math.random(1, #allCardMapper[cardName])]
|
||||
-- end
|
||||
local toGain -- = room:printCard(cardName, Card.Heart, 1)
|
||||
if #allCardMapper[cardName] > 0 then
|
||||
toGain = allCardMapper[cardName][math.random(1, #allCardMapper[cardName])]
|
||||
end
|
||||
|
||||
-- from:addToPile(self.name, toGain, true, self.name)
|
||||
-- room:setCardMark(Fk:getCardById(toGain), "@@test_cheat-phase", 1)
|
||||
|
@ -313,17 +313,18 @@ local test_feichu = fk.CreateActiveSkill{
|
|||
room:abortPlayerArea(from, eqipSlots)
|
||||
end,
|
||||
}
|
||||
local test2 = General(extension, "mouxusheng", "wu", 99, 99, General.Female)
|
||||
test2.shield = 5
|
||||
local test2 = General(extension, "mouxusheng", "wu", 4, 4, General.Female)
|
||||
test2.shield = 3
|
||||
test2.hidden = true
|
||||
test2:addSkill("rende")
|
||||
test2:addSkill(cheat)
|
||||
test2:addSkill(control)
|
||||
--test2:addSkill(test_vs)
|
||||
--test2:addSkill(test_trig)
|
||||
test2:addSkill(damage_maker)
|
||||
test2:addSkill(change_hero)
|
||||
test2:addSkill(test_zhenggong)
|
||||
test2:addSkill(test_feichu)
|
||||
test2:addSkill(change_hero)
|
||||
-- test2:addSkill(test_feichu)
|
||||
|
||||
local shibing = General(extension, "blank_shibing", "qun", 5)
|
||||
shibing.hidden = true
|
||||
|
@ -344,13 +345,15 @@ Fk:loadTranslationTable{
|
|||
[":test_filter"] = "你的点数大于11的牌视为无中生有。",
|
||||
["mouxusheng"] = "谋徐盛",
|
||||
-- ["cheat"] = "小开",
|
||||
[":cheat"] = "出牌阶段,你可以以红桃A打印一张想要的牌并获得之。",
|
||||
[":cheat"] = "出牌阶段,你可获得想要的牌。",
|
||||
["#cheat"] = "cheat:你可以获得一张想要的牌",
|
||||
["$cheat"] = "喝啊!",
|
||||
-- ["@@test_cheat-phase"] = "苦肉",
|
||||
-- ["@@test_cheat-inhand"] = "连营",
|
||||
--["#test_trig-ask"] = "你可弃置一张手牌",
|
||||
["control"] = "控制",
|
||||
[":control"] = "出牌阶段,你可以控制/解除控制若干名其他角色。",
|
||||
["$control"] = "战将临阵,斩关刈城!",
|
||||
|
||||
["test_vs"] = "视为",
|
||||
[":test_vs"] = "你可以将牌当包含无懈在内的某张锦囊使用。",
|
||||
|
@ -360,12 +363,17 @@ Fk:loadTranslationTable{
|
|||
[":damage_maker"] = "出牌阶段,你可以进行一次伤害制造器。",
|
||||
["#damage_maker"] = "制伤:选择一名小白鼠,可选另一名角色做伤害来源(默认谋徐盛)",
|
||||
["#revive-ask"] = "复活一名角色!",
|
||||
|
||||
["change_hero"] = "变更",
|
||||
[":change_hero"] = "出牌阶段,你可以变更一名角色武将牌。",
|
||||
["$damage_maker"] = "区区数百魏军,看我一击灭之!",
|
||||
|
||||
["test_zhenggong"] = "迅测",
|
||||
[":test_zhenggong"] = "锁定技,首轮开始时,你执行额外的回合。",
|
||||
["$test_zhenggong"] = "今疑兵之计,已搓敌兵心胆,其安敢侵近!",
|
||||
|
||||
["change_hero"] = "变更",
|
||||
[":change_hero"] = "出牌阶段,你可以变更一名角色武将牌。",
|
||||
["$change_hero"] = "敌军色厉内荏,可筑假城以退敌!",
|
||||
|
||||
["~mouxusheng"] = "来世,愿再为我江东之臣……",
|
||||
}
|
||||
|
||||
return { extension }
|
||||
|
|
|
@ -3,13 +3,8 @@
|
|||
#include "packman.h"
|
||||
#include "git2.h"
|
||||
#include "util.h"
|
||||
#include <qjsondocument.h>
|
||||
|
||||
#ifndef FK_SERVER_ONLY
|
||||
#include "qmlbackend.h"
|
||||
#else
|
||||
static void *Backend = nullptr;
|
||||
#endif
|
||||
#include <qjsondocument.h>
|
||||
|
||||
PackMan *Pacman;
|
||||
|
||||
|
|
|
@ -198,6 +198,8 @@ int main(int argc, char *argv[]) {
|
|||
prepareForLinux();
|
||||
#endif
|
||||
|
||||
Pacman = new PackMan;
|
||||
|
||||
#ifndef FK_CLIENT_ONLY
|
||||
// 分析命令行,如果有 -s 或者 --server 就在命令行直接开服务器
|
||||
QCommandLineParser parser;
|
||||
|
@ -239,7 +241,6 @@ int main(int argc, char *argv[]) {
|
|||
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
||||
// Linux 服务器的话可以启用一个 Shell 来操作服务器。
|
||||
auto shell = new Shell;
|
||||
Pacman = new PackMan;
|
||||
shell->start();
|
||||
#endif
|
||||
}
|
||||
|
@ -308,8 +309,6 @@ int main(int argc, char *argv[]) {
|
|||
QmlBackend backend;
|
||||
backend.setEngine(engine);
|
||||
|
||||
Pacman = new PackMan;
|
||||
|
||||
// 向 Qml 中先定义几个全局变量
|
||||
engine->rootContext()->setContextProperty("FkVersion", FK_VERSION);
|
||||
engine->rootContext()->setContextProperty("Backend", &backend);
|
||||
|
|
|
@ -18,3 +18,5 @@ class ClientPlayer *Self = nullptr;
|
|||
%include "qml-nogui.i"
|
||||
%include "player.i"
|
||||
%include "server.i"
|
||||
|
||||
QString GetDisabledPacks();
|
||||
|
|
|
@ -15,3 +15,5 @@
|
|||
%include "qt.i"
|
||||
%include "player.i"
|
||||
%include "client.i"
|
||||
|
||||
QString GetDisabledPacks();
|
||||
|
|
Loading…
Reference in New Issue
Block a user