diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 02ea4229..00000000 --- a/PKGBUILD +++ /dev/null @@ -1,44 +0,0 @@ -# Maintainer: Notify-ctrl - -pkgname=freekill -_upper_pkgname=FreeKill -pkgver=0.0.1 -pkgrel=1 -arch=('x86_64') -url='https://github.com/Notify-ctrl/FreeKill' -license=('GPL3') -pkgdesc='A Bang-like card game' -depends=('qt6-declarative' 'qt6-multimedia' 'qt6-5compat' - 'qt6-shadertools' 'libgit2' 'lua' 'sqlite' 'openssl' - 'readline' ) -makedepends=('cmake' 'flex' 'bison' 'qt6-tools' 'swig') -# TODO: set source to release tarball -source=("file:///home/notify/develop/FreeKill-demo.tar.gz") -sha256sums=('SKIP') - -prepare() { - cd ${srcdir}/${_upper_pkgname} - rm -rf build -} - -build() { - cd ${srcdir}/${_upper_pkgname} - mkdir build && cd build - cmake .. - make -} - -package() { - mkdir -p ${pkgdir}/usr/share/${_upper_pkgname} - mkdir -p ${pkgdir}/usr/share/icons - mkdir -p ${pkgdir}/usr/share/applications - mkdir -p ${pkgdir}/usr/bin - mkdir -p ${pkgdir}/usr/lib - cd ${srcdir}/${_upper_pkgname} - cmake --install build --prefix ${pkgdir}/usr --config Release - - cp -r audio fonts image lua packages qml server build/zh_CN.qm \ - ${pkgdir}/usr/share/${_upper_pkgname} - install -Dm644 image/icon.png ${pkgdir}/usr/share/icons/freekill_logo.png - install -Dm644 freekill.desktop ${pkgdir}/usr/share/applications/freekill.desktop -} diff --git a/android/copy_assets.sh b/android/copy_assets.sh index 4a1cec83..07a653a3 100755 --- a/android/copy_assets.sh +++ b/android/copy_assets.sh @@ -17,6 +17,7 @@ cp -r ../image assets/res cp -r ../lua assets/res # TODO: Windows hosts machine cp -r /etc/ca-certificates/extracted/cadir assets/res/certs +chmod 644 assets/res/certs/* mkdir assets/res/packages cp -r ../packages/standard assets/res/packages cp -r ../packages/standard_cards assets/res/packages diff --git a/doc/dev/gamelogic.md b/doc/dev/gamelogic.md index 8c8363b0..19f57339 100644 --- a/doc/dev/gamelogic.md +++ b/doc/dev/gamelogic.md @@ -122,6 +122,34 @@ ___ ## 移动牌 +移动牌的核心函数是`Room:moveCards(...)`。这是个变长参数函数,根据Emmy注解可知所有的参数都应该是CardsMoveInfo类型。CardsMoveInfo在[system_enum.lua](../../lua/server/system_enum.lua)里面有类型注解,来看看: + +```lua +---@class CardsMoveInfo +---@field ids integer[] +---@field from integer|null +---@field to integer|null +---@field toArea CardArea +---@field moveReason CardMoveReason +---@field proposer integer +---@field skillName string|null +---@field moveVisible boolean|null +---@field specialName string|null +---@field specialVisible boolean|null +``` + +moveCards函数的第一步是将参数中所有的moveInfo都转化为CardsMoveStruct。CardsMoveStruct与CardsMoveInfo几乎没有区别,除了它将每一张牌都单独划分出了一个moveinfo之外。这么做是为了在同时移动来源不同的牌的时候,让牌能该明牌明牌,该暗牌暗牌。 + +全部转化完成后,先针对这个CardsMoveStruct[]触发一次BeforeCardsMove,给各种奇怪的触发技修改移动牌信息的机会。如此如此之后就正式开始移动牌了,移动完了之后再触发AfterCardsMove,这样就完成了对卡牌的移动。 + +正式移牌中,首先服务器会向各个客户端发送一条消息让客户端知道牌被移动了。 + +然后,对所有的CardsMoveStruct进行遍历,根据move.from和move.fromArea获取这张牌的id实际所在的数组,然后将这个id移动到目标数组中。如此就在服务端的数据层面移动了一张牌。移牌OK后,Room会更新这张牌的位置信息,然后视情况更新这张牌的锁定视为技信息。如果是装备牌的话,那么就做一些跟装备技能有关的事情。 + ___ ## 使用牌 + +使用一张牌应该是全游戏最复杂而又最常见的一种事件了。说他复杂,其实也是被狗卡各种乱七八糟的技能和规则搞得很复杂的。 + +使用牌的核心函数是`Room:useCard`,接收的参数是CardUseStruct。不行太复杂了,过一阵子再来看吧。 diff --git a/doc/dev/todo.md b/doc/dev/todo.md new file mode 100644 index 00000000..60e6c77e --- /dev/null +++ b/doc/dev/todo.md @@ -0,0 +1,42 @@ +# TODO list + +___ + +本文档用来记载一些可能会需要实现但暂且无暇的想法。留待日后再做或者同伴帮忙做了。 + +## 服务端的包验证 + +当客户端连接到服务端遇到MD5失败时,考虑: + +1. 服务端除了告知失败之外还告知客户端自己的打包属性,即自己启用了哪些包,包的URL和版本等。 +2. 客户端根据信息禁用掉不需要的包,下载没有的包,更新启用的包,将需要的包都切换到服务器提供的版本。 + +___ + +## UI主题可拓展 + +考虑影响一下skin-bank.js,使其根据某个config的不同,将相应的值设为不同的路径。然后确保所有图片资源(关于页面和logo除外)都通过skin-bank.js访问所需图片。 + +由于所有拓展包都是只能通过init.lua访问,考虑为QmlBackend提供相应的Lua接口使其能够注册新的配置方案。配置文件本身的组织考虑JSON。 + +考虑在skin-bank.js中加入更多信息,例如各个组件的x, y, width, height等。因为影响到的都是Image所以设置这些应该是够了。 + +___ + +## 对话框可拓展 + +考虑劫营,严教等含有特殊交互框的例子。 + +可以通过类似fk.Backend:loadDialog的方式弹出对话框。在Lua文件中相应的地方影响client_callback这张全局表。但同时考虑到拓展包比server/client相关的Lua先加载,或许需要一些特殊的办法,比如弄一张全局表,然后client.lua初始回调函数列表的时候先把那个表的结果加进去之类的。 + +至于Lua如何与QML进行交互,毫无疑问的是通过JSON字符串。QML最后需要自己将数据发回给服务端,这里需要用到ClientInstance手动发送了,不能用RoomLogic.js。同样的需要有统一的方法初始化QML对话框的数据,考虑都传入JSON字符串,然后QML在Component.onComplete时候加载初始化数据。 + +skin-bank.js的话依然可以用相对位置进行加载,这个理论上应该是不会被影响到。 + +___ + +## 代码简洁化 + +目前FK的lua代码中仍有不少地方的代码重用度不高,典型的例子是fk_ex.lua。考虑在这里用local function将重复代码合并一下。 + +还有视为技/触发技/主动技这些能够被“发动”的技能(即继承于UsableSkill的基本),它们的技能生效环节都有很多重复,比如播放声音动画和具体生效等。考虑在某处用一个函数总结一下,至于具体生效部分可以包在一个函数里面`function() skill:onEffect(room, effect) end`然后作为参数传递到useskill函数中。如果后面要做SkillUsed之类的时机的话,这方面就更加重要了。 diff --git a/doc/diy/01-env.md b/doc/diy/01-env.md new file mode 100644 index 00000000..7129c121 --- /dev/null +++ b/doc/diy/01-env.md @@ -0,0 +1,227 @@ +# Fk DIY - 环境搭建 + +> [diy](./index.md) > 环境搭建 + +* [DIY总览](#diy总览) +* [环境搭建](#环境搭建) + * [Fk](#fk) + * [代码编辑器](#代码编辑器) + * [git](#git) + * [安装git](#安装git) +* [新增mod](#新增mod) +* [发布mod](#发布mod) + * [将终端切换为Git Bash](#将终端切换为git-bash) + * [配置ssh key](#配置ssh-key) + * [新建git仓库](#新建git仓库) + * [让他人安装并游玩你的mod](#让他人安装并游玩你的mod) + * [更新mod](#更新mod) + +___ + +## DIY总览 + +正如[项目README](../../README.md)所言,FreeKill“试图打造一个最适合diy玩家游玩的民间三国杀”。即便是最开始游戏功能尚未完善,FreeKill也已经具备了对DIY的支持。所有拓展包都列在packages/文件夹下,感兴趣者可以自行查看。 + +欲为FreeKill进行DIY,需要使用的编程语言为Lua。若您对Lua语言完全不熟悉,推荐去[菜鸟教程](https://www.runoob.com/lua/lua-tutorial.html)速通一遍基本语法。剩下的就基本是在实践中慢慢领会了。 + +FreeKill本体中自带有标准包和标准卡牌包,可作为DIY时候的例子。事实上,其他DIY包也是像这样子组织的。 + +接下来讲述如何配置环境。 + +___ + +## 环境搭建 + +### Fk + +Fk是游戏本身,也是拓展包运行的平台。事实上这份文档应该与Fk一同发布的,如果您正在阅读这份文档,那么您理应已经接收到了Fk本身。 + +### 代码编辑器 + +代码编辑器任选一种即可,但一定要确保以下几点: + +- 至少要是一款**代码**编辑器,要有语法高亮功能 +- 需要有EmmyLua插件的支持 +- 需要默认UTF-8格式保存代码文件 + +> EmmyLua是一种特别的Lua注释方式,可以为本来弱类型的Lua语言提供类型支持,这对于像FreeKill这种稍有规模的Lua项目是十分必要的。目前能提供开箱即用的EmmyLua插件编辑器主要有IntelliJ IDEA和Visual Studio Code。EmmyLua也能以LSP的方式运行,因此支持LSP的编辑器(这种就多了,比如vim, sublime)也能符合条件。 + +编辑器的具体安装以及插件配置不在此赘述。 + +> 出于易用性和免费的考虑,推荐用VSCode进行拓展。下文将以VSCode为编辑器进行进一步说明。 + +### git + +git就不必多介绍了吧,这里说说为什么需要配置git。这是因为在Fk中,拓展包拥有在线安装/在线更新的功能,这种功能都是依托于git进行的,因此如果你打算将自己的拓展包发布出去的话,就需要将其创建git仓库,并托管到git托管网站去。 + +> 考虑到国内绝大部分人的访问速度,综合国内几家git托管平台,建议使用gitee。 + +大多数人可能从未用过git,并且git上手的门槛并不低,因此以下会对涉及git的操作进行详尽的解说。 + +#### 安装git + +前往[官网](https://git-scm.com/download/win)下载git,下载64-bit Git for Windows Setup。这样应该会为您下载一个exe安装包。 + +考虑到官网的下载链接实际上指向github,而且可能连官网的都进不去,所以也考虑[从清华源下载Git](https://mirrors.tuna.tsinghua.edu.cn/github-release/git-for-windows/git/)。 + +欲验证安装是否完成,可以按下Win+R -> cmd弹出命令行窗口,输入git命令,如果出来一长串英文说明安装成功了。 + +___ + +## 新增mod + +这只是新增mod的一个例子。当然了,以后有啥要做的实例也会继续用这个拓展包的。 + +首先前往packages下,新建名为fk_study的文件夹。 + +再在fk_study下新建init.lua文件,写入以下内容: + +```lua +local extension = Package("fk_study") + +Fk:loadTranslationTable{ + ["fk_study"] = "fk学习包", +} + +return { extension } +``` + +保存退出,打开Fk,进武将一览。你现在应该能在武将一览里面看到“fk学习包”了,但也仅此而已了,毕竟这还只是个空壳包而已。 + +至此我们已经创建了最为简单的mod。mod的文件结构如下: + + fk_study + └── init.lua + +___ + +## 发布mod + +一种最常见的发布mod方式是把mod打包成zip,发到公共平台上供玩家下载。这种办法虽然可行,但并不是fk推荐的做法。 + +> 以下介绍的其实就是新建仓库并推送到gitee的办法,熟悉git者请跳过。 + +下面着重介绍用git发布mod的办法。使用git进行发布的话,就可以让用户体验在线安装、在线更新等便捷之处。 + +以下假设你使用vscode进行代码编辑。你是先用vscode打开了整个FreeKill文件夹,再在其中新建文件夹和文件、然后进行编辑的。 + +菜单栏 -> 终端 -> 新建终端。我们接下来的工作都在终端中完成。 + +### 将终端切换为Git Bash + +启动终端后,终端的内容大概是: + +```plain +Mincrosoft Windows 10 [版本号啥的] +xxxxxxxx 保留所有权利。 + +C:\FreeKill> +``` + +这个是Windows自带的cmd,我们不使用这个,而是去用git bash。此时终端上面应该有这么一条: + +```plain +问题 输出 调试控制台 _终端_ cmd + v 分屏 删除 + 注意这个加号 +``` + +这时候点击加号右边那个下拉箭头,选择"Git Bash"。这样就成功的切换到了git bash中,终端看起来应该像这样: + +```plain +xxx@xxxxx MINGW64 /c/FreeKill +$ +``` + +### 配置ssh key + +你应该已经注册好了自己的gitee账号。首先在Git bash中输入这些命令(#号后面的是命令注释,不用照搬;命令开头的\$符号是模拟shell的界面,不要输入进去): + +```sh +$ cd ~/.ssh +$ ssh-keygen -t rsa -C "你注册用的邮箱地址" # 换成自己真正的邮箱 + # 出来一堆东西,一路点回车就是了 +$ cat id_rsa.pub + # 出来一堆乱七八糟的东西:ssh-rsa <一大堆乱七八糟的内容> <你的邮箱> +$ cd - +``` + +在cat id_rsa.pub中,出来的那一堆以ssh-rsa的输出,就是这里要用到的“公钥”。然后在gitee中: + +1. 点右上角你的头像,点账号设置 +2. 点左侧栏中 安全设置 - SSH公钥 +3. 此时弹出公钥添加界面,标题任选,下面公钥那一栏中,将刚刚生成的公钥复制粘贴上去 +4. 点确定 + +这样就配置好了ssh公钥。进行验证,在bash中使用命令: + +```sh +$ ssh -T git@gitee.com +Hi xxxx! You've successfully authenticated, but GITEE.COM does not provide shell access. +``` + +输出像Hi xxx!这样的信息,就说明配置成功了。否则需要进一步检查自己的操作,上网查一下吧。 + +### 新建git仓库 + +现在终端的工作目录应该还是FreeKill根目录,我们先切换到mod的目录去,然后再在shell中进行一系列操作。 + +```sh +$ cd packages/fk_study +$ git init # 创建新的空仓库 +$ git add . # 将文件夹中所有的文件都加入暂存区 +$ git commit -m "init" # 提交目前所有的文件,这样文件就正式存在于仓库里面了 +作者身份未知 +*** 请告诉我您是谁。 +运行 + git config --global user.email "you@example.com" + git config --global user.name "Your Name" + +来设置您账号的缺省身份标识。如果仅在本仓库设置身份标识,则省略 --global 参数。 +``` + +看来我们初次安装Git,Git还不知道我们的身份呢,不过git已经告诉了配置所需的命令了。运行前一条命令告知自己的名字,运行后一条命令告知自己的邮箱。如此就OK了,然后再commit一次。 + +然后在gitee中也新建一个仓库,取名为fk_study。接下来回到终端里面: + +```sh +$ git remote add origin git@gitee.com:xxx/fk_study # 其中这个xxx是你的用户名 +$ git push -u origin master +``` + +OK了,刷新你新建的那个仓库的页面,可以看到里面已经有init.lua了。此时距离发布mod只有最后一步,那就是把仓库设置为开源。请自行在gitee中设置吧。 + +### 让他人安装并游玩你的mod + +注意到Fk初始界面里面的“管理拓展包”了不?这个就是让你安装、删除、更新拓展包用的。在那个页面里面有个输入框,在浏览器中复制仓库的地址(比如https://gitee.com/xxx/fk_study/ ),粘贴到输入框,然后单击“从URL安装”即可安装拓展包了。 + +### 更新mod + +现在mod要发生更新了,更新内容为一个武将。先在init.lua中新增武将吧。 + +```lua +local study_sunce = General(extension, "study_sunce", "wu", 4) +Fk:loadTranslationTable{ + ["study_sunce"] = "孙伯符", +} +``` + +保存,此时注意vscode左侧栏变成了: + + v fk_study + └── init.lua M + +init.lua后面出现了“M”,并且文件名字也变成了黄色,这表示这个文件已经被修改过了,接下来我们把修改文件提交到仓库中: + +```sh +$ git add . # 将当前目录下的文件暂存 +$ git commit -m "add general sunce" # 提交更改,提交说明为add general sunce +$ git push # “推”到远端,也就是把本地的更新传给远端 +``` + +不喜欢用命令行的话,也可以用vscode自带的git支持完成这些操作,这里就不赘述了。做完git push后,实际上就已经完成更新了,可以让大伙点点更新按钮来更新你的新版本了。 + +___ + +以上介绍了大致的创建mod以及更新的流程。至于资源文件组织等等杂七杂八的问题,请参考已有的例子拓展包。 + +下一篇: [fk技能类型总览](./02-skilltype.md) diff --git a/doc/diy/02-skilltype.md b/doc/diy/02-skilltype.md new file mode 100644 index 00000000..4d4cad90 --- /dev/null +++ b/doc/diy/02-skilltype.md @@ -0,0 +1,45 @@ +# fk技能类型总览 + +> [diy](./index.md) > fk技能类型总览 + +___ + +fk的目的是便于三国杀的DIY,而三国杀DIY的核心就是制作各种技能了。 + +fk的技能分为两大类,这两大类又各自细分为更小的分类: + +(关于这部分的源码详见lua/core/skill.lua和lua/core/skill_type下的所有文件) + +* 可使用类技能(UsableSkill) + * 触发技(TriggerSkill):在满足一定条件时,能够通过被动触发发挥效果的技能 + * 主动技(ActiveSkill):玩家主动发动的技能 + * 视为技(ViewAsSkill):将一张牌当做另一张牌的技能 +* 状态技(StatusSkill) + * 距离技(DistanceSkill):影响距离计算的技能 + * 攻击范围技(DistanceSkill):影响攻击范围计算的技能 + * 手牌上限技(MaxCardsSkill):影响手牌上限计算的技能 + * 禁止技(ProhibitSkill):禁止成为卡牌目标的技能 + * 卡牌增强技(TargetModSkill):影响卡牌使用次数上限、目标上限、距离限制等等的技能 + * 锁定视为技(FilterSkill):让一张牌强制视为另一张牌的技能 + +其中,触发技的逻辑最为复杂,但是[已经在这里分析过了](../dev/gamelogic.md),故不再赘述。 + +主动技和状态技应该不算难,先按下不表。视为技与神杀有所区别,区别如下: + +在神杀中,视为技是否可响应是专门写在enabled_at_response的,fk则不然,看倾国的代码: + +```lua +local qingguo = fk.CreateViewAsSkill{ + name = "qingguo", + anim_type = "defensive", + pattern = "jink", + card_filter = function(self, to_select, selected) + -- ... + end, + view_as = function(self, cards) + -- ... + end, +} +``` + +可见并没有编写跟响应时候有关的函数,也没有声明出牌阶段不可用。其中的奥妙就在于pattern中,视为技可以转化的卡牌都应该写在pattern里面,Fk会根据pattern的内容判断技能出牌阶段是否可用、是否能够响应等。 diff --git a/doc/diy/03-events.md b/doc/diy/03-events.md new file mode 100644 index 00000000..0d28d1ce --- /dev/null +++ b/doc/diy/03-events.md @@ -0,0 +1,9 @@ +# fk中的游戏事件 + +在进行DIY时,需要对三国杀的规则有一定了解;在编写技能时,也要熟悉游戏提供的各种事件,他的触发方式、触发时机、相关数据。必须要知道这些才能写出正确的代码。 + +- [与游戏流程相关的事件](./event/gameflow.md) +- [与体力值相关的事件](./event/hp.md) +- [与卡牌使用有关的事件](./event/usecard.md) +- [与移动牌有关的事件](./event/movecard.md) +- [杂项](./event/misc.md) diff --git a/doc/diy/event/gameflow.md b/doc/diy/event/gameflow.md new file mode 100644 index 00000000..985a3af6 --- /dev/null +++ b/doc/diy/event/gameflow.md @@ -0,0 +1,33 @@ +# 与游戏流程有关的事件 + +先来看游戏流程本身。以下节选自lua/server/gamelogic.lua + +```lua +function GameLogic:action() + self:trigger(fk.GameStart) + local room = self.room + + for _, p in ipairs(room.alive_players) do + self:trigger(fk.DrawInitialCards, p, { num = 4 }) + end + + local function checkNoHuman() + -- 如果房里已经没有人类玩家了就结束游戏 + end + + while true do + self:trigger(fk.TurnStart, room.current) + if room.game_finished then break end + room.current = room.current:getNextAlive() + if checkNoHuman() then + room:gameOver("") + end + end +end +``` + +以上这段代码,述说的就是整个游戏流程的核心。首先开始游戏、摸初始手牌,然后按照座位顺序每人依次执行回合直到游戏结束。 + +___ + +TODO diff --git a/doc/diy/event/hp.md b/doc/diy/event/hp.md new file mode 100644 index 00000000..3bd7708e --- /dev/null +++ b/doc/diy/event/hp.md @@ -0,0 +1,11 @@ +# 与体力值相关的事件 + +___ + +## 伤害 + +## 失去体力/体力上限 + +## 回复体力 + +## 濒死和死亡 diff --git a/doc/diy/event/misc.md b/doc/diy/event/misc.md new file mode 100644 index 00000000..e69de29b diff --git a/doc/diy/event/movecard.md b/doc/diy/event/movecard.md new file mode 100644 index 00000000..e69de29b diff --git a/doc/diy/event/usecard.md b/doc/diy/event/usecard.md new file mode 100644 index 00000000..e69de29b diff --git a/doc/diy/index.md b/doc/diy/index.md index ecb2c1a1..e992b84d 100644 --- a/doc/diy/index.md +++ b/doc/diy/index.md @@ -3,3 +3,14 @@ > diy ___ + +以下是一系列文档,旨在向从未接触过FreeKill(以后简称为Fk)的DIYer介绍Fk的DIY接口,以及如何打包、发布。 + +本系列文档针对对神杀Lua有基础的读者编写。 + +由于对于Win系统而言,fk仅仅支持Win 10及以上的64位系统,因此本文档假设您正使用Windows 10作为操作系统,且使用着64位的处理器。 + +文档中蓝色字均为超链接。 + +1. [环境搭建](./01-env.md) +2. [fk技能类型总览](./02-skilltype.md) diff --git a/fkparse b/fkparse index d150d2ee..64481662 160000 --- a/fkparse +++ b/fkparse @@ -1 +1 @@ -Subproject commit d150d2eec986c49a16f9e84772525a4fb7a84926 +Subproject commit 64481662879765f5631a291d512f7a74125051f3 diff --git a/lang/zh_CN.ts b/lang/zh_CN.ts index a6478086..6eeaa254 100644 --- a/lang/zh_CN.ts +++ b/lang/zh_CN.ts @@ -51,6 +51,10 @@ PackageManage 管理拓展包 + + updated packages for md5 + 已为您与服务器同步拓展包,请尝试再次连入 + diff --git a/lua/client/client.lua b/lua/client/client.lua index d71a3303..aeeb699f 100644 --- a/lua/client/client.lua +++ b/lua/client/client.lua @@ -71,14 +71,14 @@ function Client:moveCards(moves) table.remove(from.player_cards[Player.Hand]) end else - from:removeCards(move.fromArea, move.ids) + from:removeCards(move.fromArea, move.ids, move.fromSpecialName) end elseif move.fromArea == Card.DiscardPile then table.removeOne(self.discard_pile, move.ids[1]) end if move.to and move.toArea then - self:getPlayerById(move.to):addCards(move.toArea, move.ids) + self:getPlayerById(move.to):addCards(move.toArea, move.ids, move.specialName) elseif move.toArea == Card.DiscardPile then table.insert(self.discard_pile, move.ids[1]) end @@ -294,6 +294,8 @@ local function separateMoves(moves) toArea = move.toArea, fromArea = info.fromArea, moveReason = move.moveReason, + specialName = move.specialName, + fromSpecialName = info.fromSpecialName, }) end end @@ -305,8 +307,9 @@ local function mergeMoves(moves) local ret = {} local temp = {} for _, move in ipairs(moves) do - local info = string.format("%q,%q,%q,%q", - move.from, move.to, move.fromArea, move.toArea) + local info = string.format("%q,%q,%q,%q,%s,%s", + move.from, move.to, move.fromArea, move.toArea, + move.specialName, move.fromSpecialName) if temp[info] == nil then temp[info] = { ids = {}, @@ -315,6 +318,8 @@ local function mergeMoves(moves) fromArea = move.fromArea, toArea = move.toArea, moveReason = move.moveReason, + specialName = move.specialName, + fromSpecialName = move.fromSpecialName, } end table.insert(temp[info].ids, move.ids[1]) diff --git a/lua/client/client_util.lua b/lua/client/client_util.lua index a36ad385..fbba4857 100644 --- a/lua/client/client_util.lua +++ b/lua/client/client_util.lua @@ -117,6 +117,10 @@ function DistanceTo(from, to) return a:distanceTo(b) end +function GetPile(id, name) + return json.encode(ClientInstance:getPlayerById(id):getPile(name) or {}) +end + ---@param card string | integer ---@param player integer function CanUseCard(card, player) @@ -138,7 +142,7 @@ function CanUseCard(card, player) end end - local ret = c.skill:canUse(ClientInstance:getPlayerById(player)) + local ret = c.skill:canUse(ClientInstance:getPlayerById(player), c) return json.encode(ret) end @@ -160,7 +164,7 @@ function CanUseCardToTarget(card, to_select, selected) return ActiveTargetFilter(t.skill, to_select, selected, t.subcards) end - local ret = c.skill:targetFilter(to_select, selected, selected_cards) + local ret = c.skill:targetFilter(to_select, selected, selected_cards, c) if ret then local r = Fk:currentRoom() local status_skills = r.status_skills[ProhibitSkill] or {} @@ -242,7 +246,7 @@ function ActiveCanUse(skill_name) end for _, n in ipairs(cnames) do local c = Fk:cloneCard(n) - ret = c.skill:canUse(Self) + ret = c.skill:canUse(Self, c) if ret then break end end end diff --git a/lua/core/card.lua b/lua/core/card.lua index 368edc08..1f5ab6f4 100644 --- a/lua/core/card.lua +++ b/lua/core/card.lua @@ -59,7 +59,9 @@ function Card:initialize(name, suit, number, color) self.name = name self.suit = suit or Card.NoSuit self.number = number or 0 - self.trueName = name + + local name_splited = name:split("__") + self.trueName = name_splited[#name_splited] if suit == Card.Spade or suit == Card.Club then self.color = Card.Black @@ -217,4 +219,26 @@ function Card:toLogString() return ret end +---@param c integer|integer[]|Card|Card[] +---@return integer[] +function Card.static:getIdList(c) + if type(c) == "number" then + return {c} + end + if c.class and c:isInstanceOf(Card) then + if c:isVirtual() then + return table.clone(c.subcards) + else + return {c.id} + end + end + + -- array + local ret = {} + for _, c2 in ipairs(c) do + table.insertTable(ret, Card:getIdList(c)) + end + return ret +end + return Card diff --git a/lua/core/engine.lua b/lua/core/engine.lua index db7813ac..1b7ea8de 100644 --- a/lua/core/engine.lua +++ b/lua/core/engine.lua @@ -68,12 +68,14 @@ function Engine:loadPackages() local pack = require(string.format("packages.%s", dir)) -- Note that instance of Package is a table too -- so dont use type(pack) == "table" here - if pack[1] ~= nil then - for _, p in ipairs(pack) do - self:loadPackage(p) + if type(pack) == "table" then + if pack[1] ~= nil then + for _, p in ipairs(pack) do + self:loadPackage(p) + end + else + self:loadPackage(pack) end - else - self:loadPackage(pack) end end end diff --git a/lua/core/player.lua b/lua/core/player.lua index 66c6932c..f5fc25c4 100644 --- a/lua/core/player.lua +++ b/lua/core/player.lua @@ -259,6 +259,19 @@ function Player:getCardIds(playerAreas, specialName) return cardIds end +---@param name string +function Player:getPile(name) + return self.special_cards[name] or {} +end + +---@param id integer +---@return string|null +function Player:getPileNameOfId(id) + for k, v in pairs(self.special_cards) do + if table.contains(v, id) then return k end + end +end + -- for fkp only function Player:getHandcardNum() return #self:getCardIds(Player.Hand) diff --git a/lua/core/skill_type/target_mod.lua b/lua/core/skill_type/target_mod.lua index b1daea2a..afdb1fd1 100644 --- a/lua/core/skill_type/target_mod.lua +++ b/lua/core/skill_type/target_mod.lua @@ -3,19 +3,19 @@ local TargetModSkill = StatusSkill:subclass("TargetModSkill") ---@param player Player ---@param card_skill ActiveSkill -function TargetModSkill:getResidueNum(player, card_skill, scope) +function TargetModSkill:getResidueNum(player, card_skill, scope, card) return 0 end ---@param player Player ---@param card_skill ActiveSkill -function TargetModSkill:getDistanceLimit(player, card_skill) +function TargetModSkill:getDistanceLimit(player, card_skill, card) return 0 end ---@param player Player ---@param card_skill ActiveSkill -function TargetModSkill:getExtraTargetNum(player, card_skill) +function TargetModSkill:getExtraTargetNum(player, card_skill, card) return 0 end diff --git a/lua/core/skill_type/trigger.lua b/lua/core/skill_type/trigger.lua index 30d90d9f..e475df6a 100644 --- a/lua/core/skill_type/trigger.lua +++ b/lua/core/skill_type/trigger.lua @@ -56,14 +56,9 @@ end function TriggerSkill:doCost(event, target, player, data) local ret = self:cost(event, target, player, data) if ret then - local room = player.room - if not self.mute then - room:broadcastSkillInvoke(self.name) - end - room:notifySkillInvoked(player, self.name) - player:addSkillUseHistory(self.name) - ret = self:use(event, target, player, data) - return ret + return player.room:useSkill(player, self, function() + return self:use(event, target, player, data) + end) end end diff --git a/lua/core/skill_type/usable_skill.lua b/lua/core/skill_type/usable_skill.lua index 875b5105..629e592f 100644 --- a/lua/core/skill_type/usable_skill.lua +++ b/lua/core/skill_type/usable_skill.lua @@ -14,39 +14,39 @@ function UsableSkill:initialize(name, frequency) end ---@param player Player -function UsableSkill:getMinTargetNum(player) +function UsableSkill:getMinTargetNum(player, card) local ret = type(self.target_num) == "table" and self.target_num[1] or self.target_num return ret end -function UsableSkill:getMaxTargetNum(player) +function UsableSkill:getMaxTargetNum(player, card) local ret = type(self.target_num) == "table" and self.target_num[2] or self.target_num local status_skills = Fk:currentRoom().status_skills[TargetModSkill] or {} for _, skill in ipairs(status_skills) do - local correct = skill:getExtraTargetNum(player, self) + local correct = skill:getExtraTargetNum(player, self, card) if correct == nil then correct = 0 end ret = ret + correct end return ret end -function UsableSkill:getMaxUseTime(player, scope) +function UsableSkill:getMaxUseTime(player, scope, card) scope = scope or Player.HistoryTurn local ret = self.max_use_time[scope] local status_skills = Fk:currentRoom().status_skills[TargetModSkill] or {} for _, skill in ipairs(status_skills) do - local correct = skill:getResidueNum(player, self, scope) + local correct = skill:getResidueNum(player, self, scope, card) if correct == nil then correct = 0 end ret = ret + correct end return ret end -function UsableSkill:getDistanceLimit(player) +function UsableSkill:getDistanceLimit(player, card) local ret = self.distance_limit local status_skills = Fk:currentRoom().status_skills[TargetModSkill] or {} for _, skill in ipairs(status_skills) do - local correct = skill:getDistanceLimit(player, self) + local correct = skill:getDistanceLimit(player, self, card) if correct == nil then correct = 0 end ret = ret + correct end diff --git a/lua/core/util.lua b/lua/core/util.lua index be0f6e96..0fd42d22 100644 --- a/lua/core/util.lua +++ b/lua/core/util.lua @@ -9,6 +9,57 @@ function fk.qlist(list) return qlist_iterator, list, -1 end +---@param func fun(element, index, array) +function table:forEach(func) + for i, v in ipairs(self) do + func(v, i, self) + end +end + +---@param func fun(element, index, array) +function table:every(func) + for i, v in ipairs(self) do + if not func(v, i, self) then + return false + end + end + return true +end + +---@generic T +---@param self T[] +---@param func fun(element, index, array) +---@return T[] +function table.filter(self, func) + local ret = {} + for i, v in ipairs(self) do + if func(v, i, self) then + table.insert(ret, v) + end + end + return ret +end + +---@param func fun(element, index, array) +function table.map(self, func) + local ret = {} + for i, v in ipairs(self) do + table.insert(ret, func(v, i, self)) + end + return ret +end + +---@generic T +---@param self T[] +---@return T[] +function table.reverse(self) + local ret = {} + for _, e in ipairs(self) do + table.insert(ret, 1, e) + end + return ret +end + function table:contains(element) if #self == 0 then return false end for _, e in ipairs(self) do @@ -120,7 +171,7 @@ Sql = { --- Execute a `SELECT` SQL statement. ---@param db fk.SQLite3 ---@param sql string - ---@return table @ { [columnName] --> result : string[] } + ---@return table[] @ Array of Json object, the key is column name and value is row value exec_select = function(db, sql) return json.decode(fk.SelectFromDb(db, sql)) end, diff --git a/lua/fk_ex.lua b/lua/fk_ex.lua index ae56fa56..491d859d 100644 --- a/lua/fk_ex.lua +++ b/lua/fk_ex.lua @@ -355,6 +355,7 @@ end ---@class CardSpec: Card ---@field skill Skill +---@field equip_skill Skill local defaultCardSkill = fk.CreateActiveSkill{ name = "default_card_skill", diff --git a/lua/lib/fkparser.lua b/lua/lib/fkparser.lua index 6edb49fa..7dd5c92b 100644 --- a/lua/lib/fkparser.lua +++ b/lua/lib/fkparser.lua @@ -96,6 +96,62 @@ end fkp.functions.hasSkill = function(p, s) return p:hasSkill(s) end fkp.functions.turnOver = function(p) p:turnOver() end fkp.functions.distanceTo = function(p1, p2) return p1:distanceTo(p2) end +fkp.functions.getCards = function(p, area) + return table.map(p:getCardIds(area), function(id) return Fk:getCardById(id) end) +end + +-- interactive methods + +fkp.functions.buildPrompt = function(base, src, dest, arg, arg2) + if src == nil then + src = "" + else + src = src.id + end + if dest == nil then + dest = "" + else + dest = dest.id + end + if arg == nil then arg = "" end + if arg2 == nil then arg2 = "" end + + local prompt_tab = {src, dest, arg, arg2} + if arg2 == "" then + table.remove(prompt_tab, 4) + if arg == "" then + table.remove(prompt_tab, 3) + if dest == "" then + table.remove(prompt_tab, 2) + if src == "" then + table.remove(prompt_tab, 1) + end + end + end + end + + for _, str in ipairs(prompt_tab) do + base = base .. ":" .. str + end + + return base +end + +fkp.functions.askForChoice = function(player, choices, reason) + return player.room:askForChoice(player, choices, reason) +end + +fkp.functions.askForPlayerChosen = function(player, targets, reason, prompt, optional, notify) + return player.room:askForChoosePlayers(player, targets, 1, 1, prompt, reason) +end + +fkp.functions.askForSkillInvoke = function(player, skill) + return player:askForSkillInvoke(skill) +end + +fkp.functions.askRespondForCard = function(player, pattern, prompt, isRetrial, skill_name) + return player.room:askForResponse(player, skill_name, pattern, prompt, true) +end -- skill prototypes -------------------------------------------- @@ -277,18 +333,18 @@ fkp.CreateTargetModSkill = function(_spec) return Fk:cloneCard(str) end if _spec.residue_func then - spec.residue_func = function(self, target, skill, scope) - return _spec.residue_func(self, target, getVCardFromActiveSkill(skill)) + spec.residue_func = function(self, target, skill, scope, card) + return _spec.residue_func(self, target, card or getVCardFromActiveSkill(skill)) end end if _spec.distance_limit_func then - spec.distance_limit_func = function(self, target, skill) - return _spec.distance_limit_func(self, target, getVCardFromActiveSkill(skill)) + spec.distance_limit_func = function(self, target, skill, card) + return _spec.distance_limit_func(self, target, card or getVCardFromActiveSkill(skill)) end end if _spec.extra_target_func then - spec.extra_target_func = function(self, target, skill) - return _spec.extra_target_func(self, target, getVCardFromActiveSkill(skill)) + spec.extra_target_func = function(self, target, skill, card) + return _spec.extra_target_func(self, target, card or getVCardFromActiveSkill(skill)) end end return fk.CreateTargetModSkill(spec) diff --git a/lua/server/gamelogic.lua b/lua/server/gamelogic.lua index a7773a08..07aeebdf 100644 --- a/lua/server/gamelogic.lua +++ b/lua/server/gamelogic.lua @@ -63,7 +63,7 @@ function GameLogic:chooseGenerals() player.general = general player.gender = Fk.generals[general].gender self.room:notifyProperty(player, player, "general") - self.room:notifyProperty(player, player, "gender") + self.room:broadcastProperty(player, "gender") end local lord = room:getLord() local lord_general = nil diff --git a/lua/server/room.lua b/lua/server/room.lua index af370497..6eea3df4 100644 --- a/lua/server/room.lua +++ b/lua/server/room.lua @@ -491,9 +491,9 @@ end -- delay function, should only be used in main coroutine ---@param ms integer @ millisecond to be delayed function Room:delay(ms) - local start = fk.GetMicroSecond() + local start = os.getms() while true do - if fk.GetMicroSecond() - start >= ms * 1000 then + if os.getms() - start >= ms * 1000 then break end coroutine.yield() @@ -521,9 +521,9 @@ function Room:notifyMoveCards(players, card_moves, forceVisible) -- forceVisible make the move visible -- FIXME: move.moveInfo is an array, fix this - move.moveVisible = (forceVisible) + move.moveVisible = move.moveVisible or (forceVisible) -- if move is relevant to player, it should be open - or ((move.from == p.id) or (move.to == p.id and move.toArea ~= Card.PlayerSpecial)) + or ((move.from == p.id) or (move.to == p.id)) -- cards move from/to equip/judge/discard/processing should be open or infosContainArea(move.moveInfo, Card.PlayerEquip) or move.toArea == Card.PlayerEquip @@ -589,6 +589,14 @@ function Room:setCardEmotion(cid, name) }) end +function Room:doSuperLightBox(path, extra_data) + path = path or "RoomElement/SuperLightBox.qml" + self:doAnimate("SuperLightBox", { + path = path, + data = extra_data, + }) +end + function Room:sendLogEvent(type, data, players) players = players or self.players data.type = type @@ -885,26 +893,19 @@ function Room:handleUseCardReply(player, data) local skill = Fk.skills[card_data.skill] local selected_cards = card_data.subcards if skill:isInstanceOf(ActiveSkill) then - if not skill.mute then - self:broadcastSkillInvoke(skill.name) - end - self:notifySkillInvoked(player, skill.name) - player:addSkillUseHistory(skill.name) - self:doIndicate(player.id, targets) - skill:onUse(self, { - from = player.id, - cards = selected_cards, - tos = targets, - }) + self:useSkill(player, skill, function() + self:doIndicate(player.id, targets) + skill:onUse(self, { + from = player.id, + cards = selected_cards, + tos = targets, + }) + end) return nil elseif skill:isInstanceOf(ViewAsSkill) then local c = skill:viewAs(selected_cards) if c then - if not skill.mute then - self:broadcastSkillInvoke(skill.name) - end - self:notifySkillInvoked(player, skill.name) - player:addSkillUseHistory(skill.name) + self:useSkill(player, skill) local use = {} ---@type CardUseStruct use.from = player.id use.tos = {} @@ -1004,10 +1005,52 @@ function Room:askForNullification(players, card_name, pattern, prompt, cancelabl return nil end +-- Show a qml dialog and return qml's ClientInstance.replyToServer +-- Do anything you like through this function + +---@param player ServerPlayer +---@param focustxt string +---@param qmlPath string +---@param extra_data any +---@return string +function Room:askForCustomDialog(player, focustxt, qmlPath, extra_data) + local command = "CustomDialog" + self:notifyMoveFocus(player, focustxt) + return self:doRequest(player, command, json.encode{ + path = qmlPath, + data = extra_data, + }) +end + ------------------------------------------------------------------------ -- use card logic, and wrappers ------------------------------------------------------------------------ +local playCardEmotionAndSound = function(room, player, card) + if card.type ~= Card.TypeEquip then + room:setEmotion(player, "./packages/" .. + card.package.extensionName .. "/image/anim/" .. card.name) + end + + local soundName + if card.type == Card.TypeEquip then + local subTypeStr + if card.sub_type == Card.SubtypeDefensiveRide or card.sub_type == Card.SubtypeOffensiveRide then + subTypeStr = "horse" + elseif card.sub_type == Card.SubtypeWeapon then + subTypeStr = "weapon" + else + subTypeStr = "armor" + end + + soundName = "./audio/card/common/" .. subTypeStr + else + soundName = "./packages/" .. card.package.extensionName .. "/audio/card/" + .. (player.gender == General.Male and "male/" or "female/") .. card.name + end + room:broadcastPlaySound(soundName) +end + ---@param room Room ---@param cardUseEvent CardUseStruct local sendCardEmotionAndLog = function(room, cardUseEvent) @@ -1023,26 +1066,7 @@ local sendCardEmotionAndLog = function(room, cardUseEvent) card = temp.card end - room:setEmotion(room:getPlayerById(from), card.name) - - local soundName - if card.type == Card.TypeEquip then - local subTypeStr - if card.sub_type == Card.SubtypeDefensiveRide or card.sub_type == Card.SubtypeOffensiveRide then - subTypeStr = "horse" - elseif card.sub_type == Card.SubtypeWeapon then - subTypeStr = "weapon" - else - subTypeStr = "armor" - end - - soundName = "./audio/card/common/" .. subTypeStr - else - soundName = "./packages/" .. card.package.extensionName .. "/audio/card/" - .. (room:getPlayerById(from).gender == General.Male and "male/" or "female/") .. card.name - end - room:broadcastPlaySound(soundName) - + playCardEmotionAndSound(room, room:getPlayerById(from), card) room:doAnimate("Indicate", { from = from, to = cardUseEvent.tos or {}, @@ -1272,7 +1296,7 @@ function Room:useCard(cardUseEvent) sendCardEmotionAndLog(self, cardUseEvent) if self.logic:trigger(fk.PreCardUse, self:getPlayerById(cardUseEvent.from), cardUseEvent) then - return false + goto clean end if not cardUseEvent.extraUse then @@ -1291,153 +1315,13 @@ function Room:useCard(cardUseEvent) self.logic:trigger(event, self:getPlayerById(cardUseEvent.from), cardUseEvent) if event == fk.CardUsing then - ---@type table - local aimEventCollaborators = {} - if cardUseEvent.tos and not onAim(self, cardUseEvent, aimEventCollaborators) then - break - end - - local realCardIds = self:getSubcardsByRule(cardUseEvent.card, { Card.Processing }) - if cardUseEvent.card.type == Card.TypeEquip then - if #realCardIds == 0 then - break - end - - if self:getPlayerById(TargetGroup:getRealTargets(cardUseEvent.tos)[1]).dead then - self.moveCards({ - ids = realCardIds, - toArea = Card.DiscardPile, - moveReason = fk.ReasonPutIntoDiscardPile, - }) - else - local target = TargetGroup:getRealTargets(cardUseEvent.tos)[1] - local existingEquipId = self:getPlayerById(target):getEquipment(cardUseEvent.card.sub_type) - if existingEquipId then - self:moveCards( - { - ids = { existingEquipId }, - from = target, - toArea = Card.DiscardPile, - moveReason = fk.ReasonPutIntoDiscardPile, - }, - { - ids = realCardIds, - to = target, - toArea = Card.PlayerEquip, - moveReason = fk.ReasonUse, - } - ) - else - self:moveCards({ - ids = realCardIds, - to = target, - toArea = Card.PlayerEquip, - moveReason = fk.ReasonUse, - }) - end - end - - break - elseif cardUseEvent.card.sub_type == Card.SubtypeDelayedTrick then - if #realCardIds == 0 then - break - end - - local target = TargetGroup:getRealTargets(cardUseEvent.tos)[1] - if not self:getPlayerById(target).dead then - local findSameCard = false - for _, cardId in ipairs(self:getPlayerById(target):getCardIds(Player.Judge)) do - if Fk:getCardById(cardId).trueName == cardUseEvent.card.trueName then - findSameCard = true - end - end - - if not findSameCard then - if cardUseEvent.card:isVirtual() then - self:getPlayerById(target):addVirtualEquip(cardUseEvent.card) - end - - self:moveCards({ - ids = realCardIds, - to = target, - toArea = Card.PlayerJudge, - moveReason = fk.ReasonUse, - }) - - break - end - end - - self:moveCards({ - ids = realCardIds, - toArea = Card.DiscardPile, - moveReason = fk.ReasonPutIntoDiscardPile, - }) - - break - end - - if cardUseEvent.card.skill then - ---@type CardEffectEvent - local cardEffectEvent = { - from = cardUseEvent.from, - tos = cardUseEvent.tos, - card = cardUseEvent.card, - toCard = cardUseEvent.toCard, - responseToEvent = cardUseEvent.responseToEvent, - nullifiedTargets = cardUseEvent.nullifiedTargets, - disresponsiveList = cardUseEvent.disresponsiveList, - unoffsetableList = cardUseEvent.unoffsetableList, - addtionalDamage = cardUseEvent.addtionalDamage, - cardIdsResponded = cardUseEvent.nullifiedTargets, - } - - if cardUseEvent.toCard ~= nil then - self:doCardEffect(cardEffectEvent) - else - local collaboratorsIndex = {} - for _, toId in ipairs(TargetGroup:getRealTargets(cardUseEvent.tos)) do - if not table.contains(cardUseEvent.nullifiedTargets, toId) and self:getPlayerById(toId):isAlive() then - if aimEventCollaborators[toId] then - cardEffectEvent.to = toId - collaboratorsIndex[toId] = collaboratorsIndex[toId] or 1 - local curAimEvent = aimEventCollaborators[toId][collaboratorsIndex[toId]] - - cardEffectEvent.subTargets = curAimEvent.subTargets - cardEffectEvent.addtionalDamage = curAimEvent.additionalDamage - - if curAimEvent.disresponsiveList then - for _, disresponsivePlayer in ipairs(curAimEvent.disresponsiveList) do - if not table.contains(cardEffectEvent.disresponsiveList, disresponsivePlayer) then - table.insert(cardEffectEvent.disresponsiveList, disresponsivePlayer) - end - end - end - - if curAimEvent.unoffsetableList then - for _, unoffsetablePlayer in ipairs(curAimEvent.unoffsetableList) do - if not table.contains(cardEffectEvent.unoffsetablePlayer, unoffsetablePlayer) then - table.insert(cardEffectEvent.unoffsetablePlayer, unoffsetablePlayer) - end - end - end - - cardEffectEvent.disresponsive = curAimEvent.disresponsive - cardEffectEvent.unoffsetable = curAimEvent.unoffsetable - - collaboratorsIndex[toId] = collaboratorsIndex[toId] + 1 - - self:doCardEffect(table.simpleClone(cardEffectEvent)) - end - end - end - end - end + self:doCardUseEffect(cardUseEvent) end end self.logic:trigger(fk.CardUseFinished, self:getPlayerById(cardUseEvent.from), cardUseEvent) +::clean:: local leftRealCardIds = self:getSubcardsByRule(cardUseEvent.card, { Card.Processing }) if #leftRealCardIds > 0 then self:moveCards({ @@ -1448,6 +1332,159 @@ function Room:useCard(cardUseEvent) end end +---@param cardUseEvent CardUseStruct +function Room:doCardUseEffect(cardUseEvent) + ---@type table + local aimEventCollaborators = {} + if cardUseEvent.tos and not onAim(self, cardUseEvent, aimEventCollaborators) then + return + end + + local realCardIds = self:getSubcardsByRule(cardUseEvent.card, { Card.Processing }) + + -- If using Equip or Delayed trick, move them to the area and return + if cardUseEvent.card.type == Card.TypeEquip then + if #realCardIds == 0 then + return + end + + if self:getPlayerById(TargetGroup:getRealTargets(cardUseEvent.tos)[1]).dead then + self.moveCards({ + ids = realCardIds, + toArea = Card.DiscardPile, + moveReason = fk.ReasonPutIntoDiscardPile, + }) + else + local target = TargetGroup:getRealTargets(cardUseEvent.tos)[1] + local existingEquipId = self:getPlayerById(target):getEquipment(cardUseEvent.card.sub_type) + if existingEquipId then + self:moveCards( + { + ids = { existingEquipId }, + from = target, + toArea = Card.DiscardPile, + moveReason = fk.ReasonPutIntoDiscardPile, + }, + { + ids = realCardIds, + to = target, + toArea = Card.PlayerEquip, + moveReason = fk.ReasonUse, + } + ) + else + self:moveCards({ + ids = realCardIds, + to = target, + toArea = Card.PlayerEquip, + moveReason = fk.ReasonUse, + }) + end + end + + return + elseif cardUseEvent.card.sub_type == Card.SubtypeDelayedTrick then + if #realCardIds == 0 then + return + end + + local target = TargetGroup:getRealTargets(cardUseEvent.tos)[1] + if not self:getPlayerById(target).dead then + local findSameCard = false + for _, cardId in ipairs(self:getPlayerById(target):getCardIds(Player.Judge)) do + if Fk:getCardById(cardId).trueName == cardUseEvent.card.trueName then + findSameCard = true + end + end + + if not findSameCard then + if cardUseEvent.card:isVirtual() then + self:getPlayerById(target):addVirtualEquip(cardUseEvent.card) + end + + self:moveCards({ + ids = realCardIds, + to = target, + toArea = Card.PlayerJudge, + moveReason = fk.ReasonUse, + }) + + return + end + end + + self:moveCards({ + ids = realCardIds, + toArea = Card.DiscardPile, + moveReason = fk.ReasonPutIntoDiscardPile, + }) + + return + end + + if not cardUseEvent.card.skill then + return + end + + ---@type CardEffectEvent + local cardEffectEvent = { + from = cardUseEvent.from, + tos = cardUseEvent.tos, + card = cardUseEvent.card, + toCard = cardUseEvent.toCard, + responseToEvent = cardUseEvent.responseToEvent, + nullifiedTargets = cardUseEvent.nullifiedTargets, + disresponsiveList = cardUseEvent.disresponsiveList, + unoffsetableList = cardUseEvent.unoffsetableList, + addtionalDamage = cardUseEvent.addtionalDamage, + cardIdsResponded = cardUseEvent.nullifiedTargets, + } + + -- If using card to other card (like jink or nullification), simply effect and return + if cardUseEvent.toCard ~= nil then + self:doCardEffect(cardEffectEvent) + return + end + + -- Else: do effect to all targets + local collaboratorsIndex = {} + for _, toId in ipairs(TargetGroup:getRealTargets(cardUseEvent.tos)) do + if not table.contains(cardUseEvent.nullifiedTargets, toId) and self:getPlayerById(toId):isAlive() then + if aimEventCollaborators[toId] then + cardEffectEvent.to = toId + collaboratorsIndex[toId] = collaboratorsIndex[toId] or 1 + local curAimEvent = aimEventCollaborators[toId][collaboratorsIndex[toId]] + + cardEffectEvent.subTargets = curAimEvent.subTargets + cardEffectEvent.addtionalDamage = curAimEvent.additionalDamage + + if curAimEvent.disresponsiveList then + for _, disresponsivePlayer in ipairs(curAimEvent.disresponsiveList) do + if not table.contains(cardEffectEvent.disresponsiveList, disresponsivePlayer) then + table.insert(cardEffectEvent.disresponsiveList, disresponsivePlayer) + end + end + end + + if curAimEvent.unoffsetableList then + for _, unoffsetablePlayer in ipairs(curAimEvent.unoffsetableList) do + if not table.contains(cardEffectEvent.unoffsetablePlayer, unoffsetablePlayer) then + table.insert(cardEffectEvent.unoffsetablePlayer, unoffsetablePlayer) + end + end + end + + cardEffectEvent.disresponsive = curAimEvent.disresponsive + cardEffectEvent.unoffsetable = curAimEvent.unoffsetable + + collaboratorsIndex[toId] = collaboratorsIndex[toId] + 1 + + self:doCardEffect(table.simpleClone(cardEffectEvent)) + end + end + end +end + ---@param cardEffectEvent CardEffectEvent function Room:doCardEffect(cardEffectEvent) for _, event in ipairs({ fk.PreCardEffect, fk.BeforeCardEffect, fk.CardEffecting, fk.CardEffectFinished }) do @@ -1490,12 +1527,14 @@ function Room:doCardEffect(cardEffectEvent) use.responseToEvent = cardEffectEvent self:useCard(use) end - elseif cardEffectEvent.card.type == Card.TypeTrick then + elseif cardEffectEvent.card.type == Card.TypeTrick and + not cardEffectEvent.disresponsive then local players = {} for _, p in ipairs(self.alive_players) do - local cards = p.player_cards[Player.Hand] + local cards = p:getCardIds(Player.Hand) for _, cid in ipairs(cards) do - if Fk:getCardById(cid).name == "nullification" then + if Fk:getCardById(cid).name == "nullification" and + not table.contains(cardEffectEvent.disresponsiveList or {}, p.id) then table.insert(players, p) break end @@ -1560,9 +1599,7 @@ function Room:responseCard(cardResponseEvent) moveReason = fk.ReasonResonpse, }) - self:setEmotion(self:getPlayerById(from), card.name) - local soundName = (self:getPlayerById(from).gender == General.Male and "male/" or "female/") .. card.name - self:broadcastPlaySound("./audio/card/" .. soundName) + playCardEmotionAndSound(self, self:getPlayerById(from), card) for _, event in ipairs({ fk.PreCardRespond, fk.CardResponding, fk.CardRespondFinished }) do self.logic:trigger(event, self:getPlayerById(cardResponseEvent.from), cardResponseEvent) @@ -1599,7 +1636,11 @@ function Room:moveCards(...) ---@type MoveInfo[] local infos = {} for _, id in ipairs(cardsMoveInfo.ids) do - table.insert(infos, { cardId = id, fromArea = self:getCardArea(id) }) + table.insert(infos, { + cardId = id, + fromArea = self:getCardArea(id), + fromSpecialName = cardsMoveInfo.from and self:getPlayerById(cardsMoveInfo.from):getPileNameOfId(id), + }) end ---@type CardsMoveStruct @@ -1640,7 +1681,7 @@ function Room:moveCards(...) local playerAreas = { Player.Hand, Player.Equip, Player.Judge, Player.Special } if table.contains(playerAreas, realFromArea) and data.from then - self:getPlayerById(data.from):removeCards(realFromArea, { info.cardId }, data.specialName) + self:getPlayerById(data.from):removeCards(realFromArea, { info.cardId }, info.fromSpecialName) elseif realFromArea ~= Card.Unknown then local fromAreaIds = {} if realFromArea == Card.Processing then @@ -1743,18 +1784,12 @@ end ---@param reason integer ---@param skill_name string ---@param special_name string -function Room:moveCardTo(card, to_place, target, reason, skill_name, special_name) +---@param visible boolean +function Room:moveCardTo(card, to_place, target, reason, skill_name, special_name, visible) reason = reason or fk.ReasonJustMove skill_name = skill_name or "" special_name = special_name or "" - local ids = {} - if card[1] ~= nil then - for _, cd in ipairs(card) do - table.insertTable(ids, self:getSubcardsByRule(card)) - end - else - ids = self:getSubcardsByRule(card) - end + local ids = Card:getIdList(card) local to if table.contains( @@ -1770,7 +1805,8 @@ function Room:moveCardTo(card, to_place, target, reason, skill_name, special_nam toArea = to_place, moveReason = reason, skillName = skill_name, - specialName = special_name + specialName = special_name, + moveVisible = visible, } end @@ -1933,6 +1969,7 @@ function Room:damage(damageStruct) if damageStruct.damage < 1 then return false end + damageStruct.damageType = damageStruct.damageType or fk.NormalDamage if damageStruct.from and not damageStruct.from:isAlive() then damageStruct.from = nil @@ -2246,6 +2283,11 @@ function Room:throwCard(card_ids, skillName, who, thrower) }) end +---@param pindianStruct PindianStruct +function Room:pindian(pindianStruct) + +end + -- other helpers function Room:adjustSeats() @@ -2289,7 +2331,30 @@ function Room:shuffleDrawPile() table.shuffle(self.draw_pile) end +---@param player ServerPlayer +---@param skill Skill +---@param effect_cb fun() +function Room:useSkill(player, skill, effect_cb) + if not skill.mute then + if skill.attached_equip then + local equip = Fk:cloneCard(skill.attached_equip) + local pkgPath = "./packages/" .. equip.package.extensionName + local soundName = pkgPath .. "/audio/card/" .. equip.name + self:broadcastPlaySound(soundName) + self:setEmotion(player, pkgPath .. "/image/anim/" .. equip.name) + else + self:broadcastSkillInvoke(skill.name) + self:notifySkillInvoked(player, skill.name) + end + end + player:addSkillUseHistory(skill.name) + if effect_cb then + return effect_cb() + end +end + function Room:gameOver(winner) + self.logic:trigger(fk.GameFinished, nil, winner) self.game_started = false self.game_finished = true diff --git a/lua/server/serverplayer.lua b/lua/server/serverplayer.lua index 38335186..b333b158 100644 --- a/lua/server/serverplayer.lua +++ b/lua/server/serverplayer.lua @@ -60,13 +60,13 @@ end local function _waitForReply(player, timeout) local result - local start = fk.GetMicroSecond() + local start = os.getms() while true do result = player.serverplayer:waitForReply(0) if result ~= "__notready" then return result end - if timeout and (fk.GetMicroSecond() - start) / 1000 >= timeout * 1000 then + if timeout and (os.getms() - start) / 1000 >= timeout * 1000 then return "" end coroutine.yield() @@ -176,7 +176,9 @@ function ServerPlayer:marshal(player) end for k, v in pairs(self.cardUsedHistory) do - player:doNotify("AddCardUseHistory", json.encode{k, v[1]}) + if v[1] > 0 then + player:doNotify("AddCardUseHistory", json.encode{k, v[1]}) + end end if self.role_shown then @@ -402,6 +404,15 @@ function ServerPlayer:drawCards(num, skillName, fromPlace) return self.room:drawCards(self, num, skillName, fromPlace) end +---@param pile_name string +---@param card integer|Card +---@param visible boolean +---@param skillName string +function ServerPlayer:addToPile(pile_name, card, visible, skillName) + local room = self.room + room:moveCardTo(card, Card.PlayerSpecial, self, fk.ReasonJustMove, skillName, pile_name, visible) +end + function ServerPlayer:bury() -- self:clearFlags() -- self:clearHistory() diff --git a/lua/server/system_enum.lua b/lua/server/system_enum.lua index 6c66209e..bc032a21 100644 --- a/lua/server/system_enum.lua +++ b/lua/server/system_enum.lua @@ -13,6 +13,7 @@ ---@class MoveInfo ---@field cardId integer ---@field fromArea CardArea +---@field fromSpecialName string|null ---@class CardsMoveStruct ---@field moveInfo MoveInfo[] @@ -25,7 +26,6 @@ ---@field moveVisible boolean|null ---@field specialName string|null ---@field specialVisible boolean|null ----@field fromSpecialName string|null ---@class HpChangedData ---@field num integer @@ -99,7 +99,7 @@ fk.FireDamage = 3 ---@field tos TargetGroup ---@field card Card ---@field toCard Card|null ----@field responseToEvent CardEffectStruct|null +---@field responseToEvent CardEffectEvent|null ---@field nullifiedTargets interger[]|null ---@field extraUse boolean|null ---@field disresponsiveList integer[]|null @@ -142,6 +142,16 @@ fk.ReasonExchange = 8 fk.ReasonUse = 9 fk.ReasonResonpse = 10 +---@class PindianStruct +---@field from ServerPlayer +---@field to ServerPlayer +---@field from_card Card +---@field to_card Card +---@field from_number integer +---@field to_number integer +---@field reason string +---@field winner ServerPlayer|null + ---@class LogMessage ---@field type string ---@field from integer diff --git a/packages/standard/audio/death/caocao.mp3 b/packages/standard/audio/death/caocao.mp3 index 9854192b..1888ffc0 100644 Binary files a/packages/standard/audio/death/caocao.mp3 and b/packages/standard/audio/death/caocao.mp3 differ diff --git a/packages/standard/audio/death/daqiao.mp3 b/packages/standard/audio/death/daqiao.mp3 index c55c9d01..487cf8ca 100644 Binary files a/packages/standard/audio/death/daqiao.mp3 and b/packages/standard/audio/death/daqiao.mp3 differ diff --git a/packages/standard/audio/death/diaochan.mp3 b/packages/standard/audio/death/diaochan.mp3 index 36d88522..d0db3937 100644 Binary files a/packages/standard/audio/death/diaochan.mp3 and b/packages/standard/audio/death/diaochan.mp3 differ diff --git a/packages/standard/audio/death/ganning.mp3 b/packages/standard/audio/death/ganning.mp3 index 8904b2a2..f8726a7b 100644 Binary files a/packages/standard/audio/death/ganning.mp3 and b/packages/standard/audio/death/ganning.mp3 differ diff --git a/packages/standard/audio/death/guanyu.mp3 b/packages/standard/audio/death/guanyu.mp3 index a6ae047d..fb351b15 100644 Binary files a/packages/standard/audio/death/guanyu.mp3 and b/packages/standard/audio/death/guanyu.mp3 differ diff --git a/packages/standard/audio/death/guojia.mp3 b/packages/standard/audio/death/guojia.mp3 index 3200ae8c..76f6f943 100644 Binary files a/packages/standard/audio/death/guojia.mp3 and b/packages/standard/audio/death/guojia.mp3 differ diff --git a/packages/standard/audio/death/huanggai.mp3 b/packages/standard/audio/death/huanggai.mp3 index 0a03bcdc..ac79f6e2 100644 Binary files a/packages/standard/audio/death/huanggai.mp3 and b/packages/standard/audio/death/huanggai.mp3 differ diff --git a/packages/standard/audio/death/huangyueying.mp3 b/packages/standard/audio/death/huangyueying.mp3 index 6d6656f5..6ef39968 100644 Binary files a/packages/standard/audio/death/huangyueying.mp3 and b/packages/standard/audio/death/huangyueying.mp3 differ diff --git a/packages/standard/audio/death/huatuo.mp3 b/packages/standard/audio/death/huatuo.mp3 index 61578619..3bd55196 100644 Binary files a/packages/standard/audio/death/huatuo.mp3 and b/packages/standard/audio/death/huatuo.mp3 differ diff --git a/packages/standard/audio/death/liubei.mp3 b/packages/standard/audio/death/liubei.mp3 index 8451479a..bd417949 100644 Binary files a/packages/standard/audio/death/liubei.mp3 and b/packages/standard/audio/death/liubei.mp3 differ diff --git a/packages/standard/audio/death/luxun.mp3 b/packages/standard/audio/death/luxun.mp3 index 8ee55884..04dd51f6 100644 Binary files a/packages/standard/audio/death/luxun.mp3 and b/packages/standard/audio/death/luxun.mp3 differ diff --git a/packages/standard/audio/death/lvbu.mp3 b/packages/standard/audio/death/lvbu.mp3 index 6876280f..d6c6593f 100644 Binary files a/packages/standard/audio/death/lvbu.mp3 and b/packages/standard/audio/death/lvbu.mp3 differ diff --git a/packages/standard/audio/death/lvmeng.mp3 b/packages/standard/audio/death/lvmeng.mp3 index d8de1e68..afac7236 100644 Binary files a/packages/standard/audio/death/lvmeng.mp3 and b/packages/standard/audio/death/lvmeng.mp3 differ diff --git a/packages/standard/audio/death/machao.mp3 b/packages/standard/audio/death/machao.mp3 index 5c42197d..1a4c7da0 100644 Binary files a/packages/standard/audio/death/machao.mp3 and b/packages/standard/audio/death/machao.mp3 differ diff --git a/packages/standard/audio/death/simayi.mp3 b/packages/standard/audio/death/simayi.mp3 index ffeda187..b598287a 100644 Binary files a/packages/standard/audio/death/simayi.mp3 and b/packages/standard/audio/death/simayi.mp3 differ diff --git a/packages/standard/audio/death/sunquan.mp3 b/packages/standard/audio/death/sunquan.mp3 index 8f846a70..744f2245 100644 Binary files a/packages/standard/audio/death/sunquan.mp3 and b/packages/standard/audio/death/sunquan.mp3 differ diff --git a/packages/standard/audio/death/sunshangxiang.mp3 b/packages/standard/audio/death/sunshangxiang.mp3 index b1ad9515..62b822b7 100644 Binary files a/packages/standard/audio/death/sunshangxiang.mp3 and b/packages/standard/audio/death/sunshangxiang.mp3 differ diff --git a/packages/standard/audio/death/xiahoudun.mp3 b/packages/standard/audio/death/xiahoudun.mp3 index 3625b5f2..63d996c1 100644 Binary files a/packages/standard/audio/death/xiahoudun.mp3 and b/packages/standard/audio/death/xiahoudun.mp3 differ diff --git a/packages/standard/audio/death/xuchu.mp3 b/packages/standard/audio/death/xuchu.mp3 index 7b2264e9..e8cfbb22 100644 Binary files a/packages/standard/audio/death/xuchu.mp3 and b/packages/standard/audio/death/xuchu.mp3 differ diff --git a/packages/standard/audio/death/zhangfei.mp3 b/packages/standard/audio/death/zhangfei.mp3 index ab6a3629..dd236a57 100644 Binary files a/packages/standard/audio/death/zhangfei.mp3 and b/packages/standard/audio/death/zhangfei.mp3 differ diff --git a/packages/standard/audio/death/zhangliao.mp3 b/packages/standard/audio/death/zhangliao.mp3 index d6e8f979..89509183 100644 Binary files a/packages/standard/audio/death/zhangliao.mp3 and b/packages/standard/audio/death/zhangliao.mp3 differ diff --git a/packages/standard/audio/death/zhaoyun.mp3 b/packages/standard/audio/death/zhaoyun.mp3 index bd21595f..bd668ac7 100644 Binary files a/packages/standard/audio/death/zhaoyun.mp3 and b/packages/standard/audio/death/zhaoyun.mp3 differ diff --git a/packages/standard/audio/death/zhenji.mp3 b/packages/standard/audio/death/zhenji.mp3 index e2dc7f02..5920c6c2 100644 Binary files a/packages/standard/audio/death/zhenji.mp3 and b/packages/standard/audio/death/zhenji.mp3 differ diff --git a/packages/standard/audio/death/zhouyu.mp3 b/packages/standard/audio/death/zhouyu.mp3 index e0488fcd..2b78b641 100644 Binary files a/packages/standard/audio/death/zhouyu.mp3 and b/packages/standard/audio/death/zhouyu.mp3 differ diff --git a/packages/standard/audio/death/zhugeliang.mp3 b/packages/standard/audio/death/zhugeliang.mp3 index 651a0306..048dc407 100644 Binary files a/packages/standard/audio/death/zhugeliang.mp3 and b/packages/standard/audio/death/zhugeliang.mp3 differ diff --git a/packages/standard/audio/skill/biyue1.mp3 b/packages/standard/audio/skill/biyue1.mp3 index 2e1de0df..7113eebc 100644 Binary files a/packages/standard/audio/skill/biyue1.mp3 and b/packages/standard/audio/skill/biyue1.mp3 differ diff --git a/packages/standard/audio/skill/biyue2.mp3 b/packages/standard/audio/skill/biyue2.mp3 index 1276509a..2846d0dc 100644 Binary files a/packages/standard/audio/skill/biyue2.mp3 and b/packages/standard/audio/skill/biyue2.mp3 differ diff --git a/packages/standard/audio/skill/fanjian1.mp3 b/packages/standard/audio/skill/fanjian1.mp3 index 178d2c9e..5a622782 100644 Binary files a/packages/standard/audio/skill/fanjian1.mp3 and b/packages/standard/audio/skill/fanjian1.mp3 differ diff --git a/packages/standard/audio/skill/fanjian2.mp3 b/packages/standard/audio/skill/fanjian2.mp3 index 72109667..43de8da3 100644 Binary files a/packages/standard/audio/skill/fanjian2.mp3 and b/packages/standard/audio/skill/fanjian2.mp3 differ diff --git a/packages/standard/audio/skill/fankui1.mp3 b/packages/standard/audio/skill/fankui1.mp3 index 57ab5c1f..160ba01e 100644 Binary files a/packages/standard/audio/skill/fankui1.mp3 and b/packages/standard/audio/skill/fankui1.mp3 differ diff --git a/packages/standard/audio/skill/fankui2.mp3 b/packages/standard/audio/skill/fankui2.mp3 index 2c9c2ffc..7d157ed4 100644 Binary files a/packages/standard/audio/skill/fankui2.mp3 and b/packages/standard/audio/skill/fankui2.mp3 differ diff --git a/packages/standard/audio/skill/ganglie1.mp3 b/packages/standard/audio/skill/ganglie1.mp3 index d6648d0e..abb5072d 100644 Binary files a/packages/standard/audio/skill/ganglie1.mp3 and b/packages/standard/audio/skill/ganglie1.mp3 differ diff --git a/packages/standard/audio/skill/ganglie2.mp3 b/packages/standard/audio/skill/ganglie2.mp3 index d914dd95..bd976a81 100644 Binary files a/packages/standard/audio/skill/ganglie2.mp3 and b/packages/standard/audio/skill/ganglie2.mp3 differ diff --git a/packages/standard/audio/skill/guanxing1.mp3 b/packages/standard/audio/skill/guanxing1.mp3 index 7f0dd2cf..41022b2b 100644 Binary files a/packages/standard/audio/skill/guanxing1.mp3 and b/packages/standard/audio/skill/guanxing1.mp3 differ diff --git a/packages/standard/audio/skill/guanxing2.mp3 b/packages/standard/audio/skill/guanxing2.mp3 index f3f46e79..0edbad2d 100644 Binary files a/packages/standard/audio/skill/guanxing2.mp3 and b/packages/standard/audio/skill/guanxing2.mp3 differ diff --git a/packages/standard/audio/skill/guicai1.mp3 b/packages/standard/audio/skill/guicai1.mp3 index 131b2c54..63b4886f 100644 Binary files a/packages/standard/audio/skill/guicai1.mp3 and b/packages/standard/audio/skill/guicai1.mp3 differ diff --git a/packages/standard/audio/skill/guicai2.mp3 b/packages/standard/audio/skill/guicai2.mp3 index f07ec7f2..780e838c 100644 Binary files a/packages/standard/audio/skill/guicai2.mp3 and b/packages/standard/audio/skill/guicai2.mp3 differ diff --git a/packages/standard/audio/skill/guose1.mp3 b/packages/standard/audio/skill/guose1.mp3 index a42ba695..3b3d4406 100644 Binary files a/packages/standard/audio/skill/guose1.mp3 and b/packages/standard/audio/skill/guose1.mp3 differ diff --git a/packages/standard/audio/skill/guose2.mp3 b/packages/standard/audio/skill/guose2.mp3 index 64ee97c3..0b60f836 100644 Binary files a/packages/standard/audio/skill/guose2.mp3 and b/packages/standard/audio/skill/guose2.mp3 differ diff --git a/packages/standard/audio/skill/jianxiong1.mp3 b/packages/standard/audio/skill/jianxiong1.mp3 index c064465e..9fe0cc7f 100644 Binary files a/packages/standard/audio/skill/jianxiong1.mp3 and b/packages/standard/audio/skill/jianxiong1.mp3 differ diff --git a/packages/standard/audio/skill/jianxiong2.mp3 b/packages/standard/audio/skill/jianxiong2.mp3 index f0300193..74deabdf 100644 Binary files a/packages/standard/audio/skill/jianxiong2.mp3 and b/packages/standard/audio/skill/jianxiong2.mp3 differ diff --git a/packages/standard/audio/skill/jieyin1.mp3 b/packages/standard/audio/skill/jieyin1.mp3 index 62c05b3b..76a06286 100644 Binary files a/packages/standard/audio/skill/jieyin1.mp3 and b/packages/standard/audio/skill/jieyin1.mp3 differ diff --git a/packages/standard/audio/skill/jieyin2.mp3 b/packages/standard/audio/skill/jieyin2.mp3 index c5c9ea2c..693fef07 100644 Binary files a/packages/standard/audio/skill/jieyin2.mp3 and b/packages/standard/audio/skill/jieyin2.mp3 differ diff --git a/packages/standard/audio/skill/jijiu1.mp3 b/packages/standard/audio/skill/jijiu1.mp3 index b067464a..5db80128 100644 Binary files a/packages/standard/audio/skill/jijiu1.mp3 and b/packages/standard/audio/skill/jijiu1.mp3 differ diff --git a/packages/standard/audio/skill/jijiu2.mp3 b/packages/standard/audio/skill/jijiu2.mp3 index 8092f0de..165094c5 100644 Binary files a/packages/standard/audio/skill/jijiu2.mp3 and b/packages/standard/audio/skill/jijiu2.mp3 differ diff --git a/packages/standard/audio/skill/jizhi1.mp3 b/packages/standard/audio/skill/jizhi1.mp3 index f2a88699..65020fbb 100644 Binary files a/packages/standard/audio/skill/jizhi1.mp3 and b/packages/standard/audio/skill/jizhi1.mp3 differ diff --git a/packages/standard/audio/skill/jizhi2.mp3 b/packages/standard/audio/skill/jizhi2.mp3 index 16d0bb93..014bcf01 100644 Binary files a/packages/standard/audio/skill/jizhi2.mp3 and b/packages/standard/audio/skill/jizhi2.mp3 differ diff --git a/packages/standard/audio/skill/keji1.mp3 b/packages/standard/audio/skill/keji1.mp3 index 8385a49a..11ad133e 100644 Binary files a/packages/standard/audio/skill/keji1.mp3 and b/packages/standard/audio/skill/keji1.mp3 differ diff --git a/packages/standard/audio/skill/keji2.mp3 b/packages/standard/audio/skill/keji2.mp3 index 59ef0d59..02619b30 100644 Binary files a/packages/standard/audio/skill/keji2.mp3 and b/packages/standard/audio/skill/keji2.mp3 differ diff --git a/packages/standard/audio/skill/kongcheng1.mp3 b/packages/standard/audio/skill/kongcheng1.mp3 index 39a46ee7..b25cd14e 100644 Binary files a/packages/standard/audio/skill/kongcheng1.mp3 and b/packages/standard/audio/skill/kongcheng1.mp3 differ diff --git a/packages/standard/audio/skill/kongcheng2.mp3 b/packages/standard/audio/skill/kongcheng2.mp3 index 22ccc597..28f2303a 100644 Binary files a/packages/standard/audio/skill/kongcheng2.mp3 and b/packages/standard/audio/skill/kongcheng2.mp3 differ diff --git a/packages/standard/audio/skill/kurou1.mp3 b/packages/standard/audio/skill/kurou1.mp3 index fea20594..719e10f8 100644 Binary files a/packages/standard/audio/skill/kurou1.mp3 and b/packages/standard/audio/skill/kurou1.mp3 differ diff --git a/packages/standard/audio/skill/kurou2.mp3 b/packages/standard/audio/skill/kurou2.mp3 index d09be0ab..ba0f6008 100644 Binary files a/packages/standard/audio/skill/kurou2.mp3 and b/packages/standard/audio/skill/kurou2.mp3 differ diff --git a/packages/standard/audio/skill/lianying1.mp3 b/packages/standard/audio/skill/lianying1.mp3 index b3a3821d..286db5da 100644 Binary files a/packages/standard/audio/skill/lianying1.mp3 and b/packages/standard/audio/skill/lianying1.mp3 differ diff --git a/packages/standard/audio/skill/lianying2.mp3 b/packages/standard/audio/skill/lianying2.mp3 index cefcfb46..e283eb70 100644 Binary files a/packages/standard/audio/skill/lianying2.mp3 and b/packages/standard/audio/skill/lianying2.mp3 differ diff --git a/packages/standard/audio/skill/lijian1.mp3 b/packages/standard/audio/skill/lijian1.mp3 index 572049b1..0e39f3c8 100644 Binary files a/packages/standard/audio/skill/lijian1.mp3 and b/packages/standard/audio/skill/lijian1.mp3 differ diff --git a/packages/standard/audio/skill/lijian2.mp3 b/packages/standard/audio/skill/lijian2.mp3 index 1787d8a8..2a997881 100644 Binary files a/packages/standard/audio/skill/lijian2.mp3 and b/packages/standard/audio/skill/lijian2.mp3 differ diff --git a/packages/standard/audio/skill/liuli1.mp3 b/packages/standard/audio/skill/liuli1.mp3 index c0c91ace..87ec8181 100644 Binary files a/packages/standard/audio/skill/liuli1.mp3 and b/packages/standard/audio/skill/liuli1.mp3 differ diff --git a/packages/standard/audio/skill/liuli2.mp3 b/packages/standard/audio/skill/liuli2.mp3 index 2fd49c38..bd25a14d 100644 Binary files a/packages/standard/audio/skill/liuli2.mp3 and b/packages/standard/audio/skill/liuli2.mp3 differ diff --git a/packages/standard/audio/skill/longdan1.mp3 b/packages/standard/audio/skill/longdan1.mp3 index fd484688..ebc7b0b7 100644 Binary files a/packages/standard/audio/skill/longdan1.mp3 and b/packages/standard/audio/skill/longdan1.mp3 differ diff --git a/packages/standard/audio/skill/longdan2.mp3 b/packages/standard/audio/skill/longdan2.mp3 index b83e96e5..be4979f1 100644 Binary files a/packages/standard/audio/skill/longdan2.mp3 and b/packages/standard/audio/skill/longdan2.mp3 differ diff --git a/packages/standard/audio/skill/luoshen1.mp3 b/packages/standard/audio/skill/luoshen1.mp3 index 927def4f..b2a97b98 100644 Binary files a/packages/standard/audio/skill/luoshen1.mp3 and b/packages/standard/audio/skill/luoshen1.mp3 differ diff --git a/packages/standard/audio/skill/luoshen2.mp3 b/packages/standard/audio/skill/luoshen2.mp3 index aee0268f..68a3baf2 100644 Binary files a/packages/standard/audio/skill/luoshen2.mp3 and b/packages/standard/audio/skill/luoshen2.mp3 differ diff --git a/packages/standard/audio/skill/luoyi1.mp3 b/packages/standard/audio/skill/luoyi1.mp3 index cdad92c5..67f17824 100644 Binary files a/packages/standard/audio/skill/luoyi1.mp3 and b/packages/standard/audio/skill/luoyi1.mp3 differ diff --git a/packages/standard/audio/skill/luoyi2.mp3 b/packages/standard/audio/skill/luoyi2.mp3 index e32aa76f..aebc2c86 100644 Binary files a/packages/standard/audio/skill/luoyi2.mp3 and b/packages/standard/audio/skill/luoyi2.mp3 differ diff --git a/packages/standard/audio/skill/paoxiao1.mp3 b/packages/standard/audio/skill/paoxiao1.mp3 index 6482afa2..7288f6be 100644 Binary files a/packages/standard/audio/skill/paoxiao1.mp3 and b/packages/standard/audio/skill/paoxiao1.mp3 differ diff --git a/packages/standard/audio/skill/paoxiao2.mp3 b/packages/standard/audio/skill/paoxiao2.mp3 index 36423478..aeaf3ea2 100644 Binary files a/packages/standard/audio/skill/paoxiao2.mp3 and b/packages/standard/audio/skill/paoxiao2.mp3 differ diff --git a/packages/standard/audio/skill/qianxun1.mp3 b/packages/standard/audio/skill/qianxun1.mp3 index 5537ba5e..af0b1f02 100644 Binary files a/packages/standard/audio/skill/qianxun1.mp3 and b/packages/standard/audio/skill/qianxun1.mp3 differ diff --git a/packages/standard/audio/skill/qianxun2.mp3 b/packages/standard/audio/skill/qianxun2.mp3 index 15742323..073a96d5 100644 Binary files a/packages/standard/audio/skill/qianxun2.mp3 and b/packages/standard/audio/skill/qianxun2.mp3 differ diff --git a/packages/standard/audio/skill/qingguo1.mp3 b/packages/standard/audio/skill/qingguo1.mp3 index e47f1486..4a6b44dc 100644 Binary files a/packages/standard/audio/skill/qingguo1.mp3 and b/packages/standard/audio/skill/qingguo1.mp3 differ diff --git a/packages/standard/audio/skill/qingguo2.mp3 b/packages/standard/audio/skill/qingguo2.mp3 index a6e701e6..f13f7694 100644 Binary files a/packages/standard/audio/skill/qingguo2.mp3 and b/packages/standard/audio/skill/qingguo2.mp3 differ diff --git a/packages/standard/audio/skill/qingnang1.mp3 b/packages/standard/audio/skill/qingnang1.mp3 index b0a128a5..dc29cadb 100644 Binary files a/packages/standard/audio/skill/qingnang1.mp3 and b/packages/standard/audio/skill/qingnang1.mp3 differ diff --git a/packages/standard/audio/skill/qingnang2.mp3 b/packages/standard/audio/skill/qingnang2.mp3 index 482b5ca0..185fc133 100644 Binary files a/packages/standard/audio/skill/qingnang2.mp3 and b/packages/standard/audio/skill/qingnang2.mp3 differ diff --git a/packages/standard/audio/skill/qixi1.mp3 b/packages/standard/audio/skill/qixi1.mp3 index fc39c093..24d211fa 100644 Binary files a/packages/standard/audio/skill/qixi1.mp3 and b/packages/standard/audio/skill/qixi1.mp3 differ diff --git a/packages/standard/audio/skill/qixi2.mp3 b/packages/standard/audio/skill/qixi2.mp3 index bc5f2c92..e7926336 100644 Binary files a/packages/standard/audio/skill/qixi2.mp3 and b/packages/standard/audio/skill/qixi2.mp3 differ diff --git a/packages/standard/audio/skill/rende1.mp3 b/packages/standard/audio/skill/rende1.mp3 index 18571d1c..164a1ed5 100644 Binary files a/packages/standard/audio/skill/rende1.mp3 and b/packages/standard/audio/skill/rende1.mp3 differ diff --git a/packages/standard/audio/skill/rende2.mp3 b/packages/standard/audio/skill/rende2.mp3 index 25402f33..d43758f1 100644 Binary files a/packages/standard/audio/skill/rende2.mp3 and b/packages/standard/audio/skill/rende2.mp3 differ diff --git a/packages/standard/audio/skill/tiandu1.mp3 b/packages/standard/audio/skill/tiandu1.mp3 index f911ec0c..53fc57a2 100644 Binary files a/packages/standard/audio/skill/tiandu1.mp3 and b/packages/standard/audio/skill/tiandu1.mp3 differ diff --git a/packages/standard/audio/skill/tiandu2.mp3 b/packages/standard/audio/skill/tiandu2.mp3 index 52481666..02140e7d 100644 Binary files a/packages/standard/audio/skill/tiandu2.mp3 and b/packages/standard/audio/skill/tiandu2.mp3 differ diff --git a/packages/standard/audio/skill/tieqi1.mp3 b/packages/standard/audio/skill/tieqi1.mp3 index 8db166c4..88b48da5 100644 Binary files a/packages/standard/audio/skill/tieqi1.mp3 and b/packages/standard/audio/skill/tieqi1.mp3 differ diff --git a/packages/standard/audio/skill/tieqi2.mp3 b/packages/standard/audio/skill/tieqi2.mp3 index 81514190..ba483650 100644 Binary files a/packages/standard/audio/skill/tieqi2.mp3 and b/packages/standard/audio/skill/tieqi2.mp3 differ diff --git a/packages/standard/audio/skill/tuxi1.mp3 b/packages/standard/audio/skill/tuxi1.mp3 index 74d41b3a..5de29e20 100644 Binary files a/packages/standard/audio/skill/tuxi1.mp3 and b/packages/standard/audio/skill/tuxi1.mp3 differ diff --git a/packages/standard/audio/skill/tuxi2.mp3 b/packages/standard/audio/skill/tuxi2.mp3 index fe142e16..6ed9936a 100644 Binary files a/packages/standard/audio/skill/tuxi2.mp3 and b/packages/standard/audio/skill/tuxi2.mp3 differ diff --git a/packages/standard/audio/skill/wusheng1.mp3 b/packages/standard/audio/skill/wusheng1.mp3 index e8f8f130..834ec8a3 100644 Binary files a/packages/standard/audio/skill/wusheng1.mp3 and b/packages/standard/audio/skill/wusheng1.mp3 differ diff --git a/packages/standard/audio/skill/wusheng2.mp3 b/packages/standard/audio/skill/wusheng2.mp3 index c33029d0..3e27c498 100644 Binary files a/packages/standard/audio/skill/wusheng2.mp3 and b/packages/standard/audio/skill/wusheng2.mp3 differ diff --git a/packages/standard/audio/skill/wushuang1.mp3 b/packages/standard/audio/skill/wushuang1.mp3 index 6c601b43..afa7a40a 100644 Binary files a/packages/standard/audio/skill/wushuang1.mp3 and b/packages/standard/audio/skill/wushuang1.mp3 differ diff --git a/packages/standard/audio/skill/wushuang2.mp3 b/packages/standard/audio/skill/wushuang2.mp3 index b2c6dc47..cfa29257 100644 Binary files a/packages/standard/audio/skill/wushuang2.mp3 and b/packages/standard/audio/skill/wushuang2.mp3 differ diff --git a/packages/standard/audio/skill/xiaoji1.mp3 b/packages/standard/audio/skill/xiaoji1.mp3 index 811f22eb..a743ace6 100644 Binary files a/packages/standard/audio/skill/xiaoji1.mp3 and b/packages/standard/audio/skill/xiaoji1.mp3 differ diff --git a/packages/standard/audio/skill/xiaoji2.mp3 b/packages/standard/audio/skill/xiaoji2.mp3 index d28ea595..ae3497f1 100644 Binary files a/packages/standard/audio/skill/xiaoji2.mp3 and b/packages/standard/audio/skill/xiaoji2.mp3 differ diff --git a/packages/standard/audio/skill/yiji1.mp3 b/packages/standard/audio/skill/yiji1.mp3 index d8e96816..157b1a9e 100644 Binary files a/packages/standard/audio/skill/yiji1.mp3 and b/packages/standard/audio/skill/yiji1.mp3 differ diff --git a/packages/standard/audio/skill/yiji2.mp3 b/packages/standard/audio/skill/yiji2.mp3 index 0ac76a58..c1237cc3 100644 Binary files a/packages/standard/audio/skill/yiji2.mp3 and b/packages/standard/audio/skill/yiji2.mp3 differ diff --git a/packages/standard/audio/skill/yingzi1.mp3 b/packages/standard/audio/skill/yingzi1.mp3 index def3c7c5..4f68a3e1 100644 Binary files a/packages/standard/audio/skill/yingzi1.mp3 and b/packages/standard/audio/skill/yingzi1.mp3 differ diff --git a/packages/standard/audio/skill/yingzi2.mp3 b/packages/standard/audio/skill/yingzi2.mp3 index b545002c..a56e6576 100644 Binary files a/packages/standard/audio/skill/yingzi2.mp3 and b/packages/standard/audio/skill/yingzi2.mp3 differ diff --git a/packages/standard/audio/skill/zhiheng1.mp3 b/packages/standard/audio/skill/zhiheng1.mp3 index bfdca368..3751dfaa 100644 Binary files a/packages/standard/audio/skill/zhiheng1.mp3 and b/packages/standard/audio/skill/zhiheng1.mp3 differ diff --git a/packages/standard/audio/skill/zhiheng2.mp3 b/packages/standard/audio/skill/zhiheng2.mp3 index 775dd4ad..d347526b 100644 Binary files a/packages/standard/audio/skill/zhiheng2.mp3 and b/packages/standard/audio/skill/zhiheng2.mp3 differ diff --git a/packages/standard/init.lua b/packages/standard/init.lua index ed59e11e..7583199a 100644 --- a/packages/standard/init.lua +++ b/packages/standard/init.lua @@ -1007,6 +1007,35 @@ Fk:loadTranslationTable{ ["lvbu"] = "吕布", } +local lijian = fk.CreateActiveSkill{ + name = "lijian", + anim_type = "offensive", + can_use = function(self, player) + return player:usedSkillTimes(self.name) == 0 + end, + card_filter = function(self, to_select, selected) + return #selected == 0 + end, + target_filter = function(self, to_select, selected) + return #selected < 2 and to_select ~= Self.id and + ClientInstance:getPlayerById(to_select).gender == General.Male + end, + feasible = function(self, targets, cards) + return #targets == 2 and #cards > 0 + end, + on_use = function(self, room, use) + room:throwCard(use.cards, self.name, room:getPlayerById(use.from)) + local duel = Fk:cloneCard("duel") + local new_use = {} ---@type CardUseStruct + new_use.from = use.tos[2] + new_use.tos = { { use.tos[1] } } + new_use.card = duel + new_use.disresponsiveList = table.map(room:getAlivePlayers(), function(e) + return e.id + end) + room:useCard(new_use) + end, +} local biyue = fk.CreateTriggerSkill{ name = "biyue", anim_type = "drawcard", @@ -1020,9 +1049,12 @@ local biyue = fk.CreateTriggerSkill{ end, } local diaochan = General:new(extension, "diaochan", "qun", 3, 3, General.Female) +diaochan:addSkill(lijian) diaochan:addSkill(biyue) Fk:loadTranslationTable{ ["diaochan"] = "貂蝉", + ["lijian"] = "离间", + [":lijian"] = "阶段技,你可以弃置一张牌并选择两名其他男性角色,后选择的角色视为对先选择的角色使用了一张不能被无懈可击的决斗。", ["biyue"] = "闭月", [":biyue"] = "结束阶段开始时,你可以摸一张牌。", } diff --git a/packages/standard_cards/audio/card/axe.mp3 b/packages/standard_cards/audio/card/axe.mp3 new file mode 100644 index 00000000..c6437440 Binary files /dev/null and b/packages/standard_cards/audio/card/axe.mp3 differ diff --git a/packages/standard_cards/audio/card/blade.mp3 b/packages/standard_cards/audio/card/blade.mp3 new file mode 100644 index 00000000..c89a05f9 Binary files /dev/null and b/packages/standard_cards/audio/card/blade.mp3 differ diff --git a/packages/standard_cards/audio/card/crossbow.mp3 b/packages/standard_cards/audio/card/crossbow.mp3 new file mode 100644 index 00000000..4f9980dc Binary files /dev/null and b/packages/standard_cards/audio/card/crossbow.mp3 differ diff --git a/packages/standard_cards/audio/card/double_swords.mp3 b/packages/standard_cards/audio/card/double_swords.mp3 new file mode 100644 index 00000000..b112c943 Binary files /dev/null and b/packages/standard_cards/audio/card/double_swords.mp3 differ diff --git a/packages/standard_cards/audio/card/eight_diagram.mp3 b/packages/standard_cards/audio/card/eight_diagram.mp3 new file mode 100644 index 00000000..21634452 Binary files /dev/null and b/packages/standard_cards/audio/card/eight_diagram.mp3 differ diff --git a/packages/standard_cards/audio/card/female/amazing_grace.mp3 b/packages/standard_cards/audio/card/female/amazing_grace.mp3 index 9b33beb4..7861f755 100644 Binary files a/packages/standard_cards/audio/card/female/amazing_grace.mp3 and b/packages/standard_cards/audio/card/female/amazing_grace.mp3 differ diff --git a/packages/standard_cards/audio/card/female/archery_attack.mp3 b/packages/standard_cards/audio/card/female/archery_attack.mp3 index ce2c8639..45a68b8d 100644 Binary files a/packages/standard_cards/audio/card/female/archery_attack.mp3 and b/packages/standard_cards/audio/card/female/archery_attack.mp3 differ diff --git a/packages/standard_cards/audio/card/female/collateral.mp3 b/packages/standard_cards/audio/card/female/collateral.mp3 index 51814ac5..b70fca5b 100644 Binary files a/packages/standard_cards/audio/card/female/collateral.mp3 and b/packages/standard_cards/audio/card/female/collateral.mp3 differ diff --git a/packages/standard_cards/audio/card/female/dismantlement.mp3 b/packages/standard_cards/audio/card/female/dismantlement.mp3 index 5796adf1..e864f05a 100644 Binary files a/packages/standard_cards/audio/card/female/dismantlement.mp3 and b/packages/standard_cards/audio/card/female/dismantlement.mp3 differ diff --git a/packages/standard_cards/audio/card/female/duel.mp3 b/packages/standard_cards/audio/card/female/duel.mp3 index 1606fad1..4a5abfe0 100644 Binary files a/packages/standard_cards/audio/card/female/duel.mp3 and b/packages/standard_cards/audio/card/female/duel.mp3 differ diff --git a/packages/standard_cards/audio/card/female/ex_nihilo.mp3 b/packages/standard_cards/audio/card/female/ex_nihilo.mp3 index 1480dcd7..4d7ca10c 100644 Binary files a/packages/standard_cards/audio/card/female/ex_nihilo.mp3 and b/packages/standard_cards/audio/card/female/ex_nihilo.mp3 differ diff --git a/packages/standard_cards/audio/card/female/god_salvation.mp3 b/packages/standard_cards/audio/card/female/god_salvation.mp3 index fdafeba0..0ce6680f 100644 Binary files a/packages/standard_cards/audio/card/female/god_salvation.mp3 and b/packages/standard_cards/audio/card/female/god_salvation.mp3 differ diff --git a/packages/standard_cards/audio/card/female/indulgence.mp3 b/packages/standard_cards/audio/card/female/indulgence.mp3 index afaed649..52c0714c 100644 Binary files a/packages/standard_cards/audio/card/female/indulgence.mp3 and b/packages/standard_cards/audio/card/female/indulgence.mp3 differ diff --git a/packages/standard_cards/audio/card/female/jink.mp3 b/packages/standard_cards/audio/card/female/jink.mp3 index 21a550dc..deb2d451 100644 Binary files a/packages/standard_cards/audio/card/female/jink.mp3 and b/packages/standard_cards/audio/card/female/jink.mp3 differ diff --git a/packages/standard_cards/audio/card/female/lightning.mp3 b/packages/standard_cards/audio/card/female/lightning.mp3 index dc111c19..ec33b413 100644 Binary files a/packages/standard_cards/audio/card/female/lightning.mp3 and b/packages/standard_cards/audio/card/female/lightning.mp3 differ diff --git a/packages/standard_cards/audio/card/female/nullification.mp3 b/packages/standard_cards/audio/card/female/nullification.mp3 index 4e4edad6..a7484e71 100644 Binary files a/packages/standard_cards/audio/card/female/nullification.mp3 and b/packages/standard_cards/audio/card/female/nullification.mp3 differ diff --git a/packages/standard_cards/audio/card/female/peach.mp3 b/packages/standard_cards/audio/card/female/peach.mp3 index 2f8ebdd4..5b68283b 100644 Binary files a/packages/standard_cards/audio/card/female/peach.mp3 and b/packages/standard_cards/audio/card/female/peach.mp3 differ diff --git a/packages/standard_cards/audio/card/female/savage_assault.mp3 b/packages/standard_cards/audio/card/female/savage_assault.mp3 index 5fe21f41..76096961 100644 Binary files a/packages/standard_cards/audio/card/female/savage_assault.mp3 and b/packages/standard_cards/audio/card/female/savage_assault.mp3 differ diff --git a/packages/standard_cards/audio/card/female/slash.mp3 b/packages/standard_cards/audio/card/female/slash.mp3 index 25c3c231..b211bf2b 100644 Binary files a/packages/standard_cards/audio/card/female/slash.mp3 and b/packages/standard_cards/audio/card/female/slash.mp3 differ diff --git a/packages/standard_cards/audio/card/female/snatch.mp3 b/packages/standard_cards/audio/card/female/snatch.mp3 index 09e6659a..3ded7c58 100644 Binary files a/packages/standard_cards/audio/card/female/snatch.mp3 and b/packages/standard_cards/audio/card/female/snatch.mp3 differ diff --git a/packages/standard_cards/audio/card/halberd.mp3 b/packages/standard_cards/audio/card/halberd.mp3 new file mode 100644 index 00000000..0a96b155 Binary files /dev/null and b/packages/standard_cards/audio/card/halberd.mp3 differ diff --git a/packages/standard_cards/audio/card/ice_sword.mp3 b/packages/standard_cards/audio/card/ice_sword.mp3 new file mode 100644 index 00000000..6f2a5720 Binary files /dev/null and b/packages/standard_cards/audio/card/ice_sword.mp3 differ diff --git a/packages/standard_cards/audio/card/kylin_bow.mp3 b/packages/standard_cards/audio/card/kylin_bow.mp3 new file mode 100644 index 00000000..ce871cdc Binary files /dev/null and b/packages/standard_cards/audio/card/kylin_bow.mp3 differ diff --git a/packages/standard_cards/audio/card/male/amazing_grace.mp3 b/packages/standard_cards/audio/card/male/amazing_grace.mp3 index 43deea7e..c0c3c4c1 100644 Binary files a/packages/standard_cards/audio/card/male/amazing_grace.mp3 and b/packages/standard_cards/audio/card/male/amazing_grace.mp3 differ diff --git a/packages/standard_cards/audio/card/male/archery_attack.mp3 b/packages/standard_cards/audio/card/male/archery_attack.mp3 index f4811659..eb4d1027 100644 Binary files a/packages/standard_cards/audio/card/male/archery_attack.mp3 and b/packages/standard_cards/audio/card/male/archery_attack.mp3 differ diff --git a/packages/standard_cards/audio/card/male/collateral.mp3 b/packages/standard_cards/audio/card/male/collateral.mp3 index db2ad753..a813afee 100644 Binary files a/packages/standard_cards/audio/card/male/collateral.mp3 and b/packages/standard_cards/audio/card/male/collateral.mp3 differ diff --git a/packages/standard_cards/audio/card/male/dismantlement.mp3 b/packages/standard_cards/audio/card/male/dismantlement.mp3 index 6c734b82..59837e16 100644 Binary files a/packages/standard_cards/audio/card/male/dismantlement.mp3 and b/packages/standard_cards/audio/card/male/dismantlement.mp3 differ diff --git a/packages/standard_cards/audio/card/male/duel.mp3 b/packages/standard_cards/audio/card/male/duel.mp3 index 775cfb39..e6c321a5 100644 Binary files a/packages/standard_cards/audio/card/male/duel.mp3 and b/packages/standard_cards/audio/card/male/duel.mp3 differ diff --git a/packages/standard_cards/audio/card/male/ex_nihilo.mp3 b/packages/standard_cards/audio/card/male/ex_nihilo.mp3 index c0857e86..d613e6ca 100644 Binary files a/packages/standard_cards/audio/card/male/ex_nihilo.mp3 and b/packages/standard_cards/audio/card/male/ex_nihilo.mp3 differ diff --git a/packages/standard_cards/audio/card/male/god_salvation.mp3 b/packages/standard_cards/audio/card/male/god_salvation.mp3 index 780c7537..c27bc4b7 100644 Binary files a/packages/standard_cards/audio/card/male/god_salvation.mp3 and b/packages/standard_cards/audio/card/male/god_salvation.mp3 differ diff --git a/packages/standard_cards/audio/card/male/indulgence.mp3 b/packages/standard_cards/audio/card/male/indulgence.mp3 index 3c3b43ca..7896e8a5 100644 Binary files a/packages/standard_cards/audio/card/male/indulgence.mp3 and b/packages/standard_cards/audio/card/male/indulgence.mp3 differ diff --git a/packages/standard_cards/audio/card/male/jink.mp3 b/packages/standard_cards/audio/card/male/jink.mp3 index f8b1be7d..5d20e643 100644 Binary files a/packages/standard_cards/audio/card/male/jink.mp3 and b/packages/standard_cards/audio/card/male/jink.mp3 differ diff --git a/packages/standard_cards/audio/card/male/lightning.mp3 b/packages/standard_cards/audio/card/male/lightning.mp3 index 91f36e45..058ac9a1 100644 Binary files a/packages/standard_cards/audio/card/male/lightning.mp3 and b/packages/standard_cards/audio/card/male/lightning.mp3 differ diff --git a/packages/standard_cards/audio/card/male/nullification.mp3 b/packages/standard_cards/audio/card/male/nullification.mp3 index a30553df..c720dca3 100644 Binary files a/packages/standard_cards/audio/card/male/nullification.mp3 and b/packages/standard_cards/audio/card/male/nullification.mp3 differ diff --git a/packages/standard_cards/audio/card/male/peach.mp3 b/packages/standard_cards/audio/card/male/peach.mp3 index 2f8ebdd4..5b68283b 100644 Binary files a/packages/standard_cards/audio/card/male/peach.mp3 and b/packages/standard_cards/audio/card/male/peach.mp3 differ diff --git a/packages/standard_cards/audio/card/male/savage_assault.mp3 b/packages/standard_cards/audio/card/male/savage_assault.mp3 index ae7c3c79..65bd7974 100644 Binary files a/packages/standard_cards/audio/card/male/savage_assault.mp3 and b/packages/standard_cards/audio/card/male/savage_assault.mp3 differ diff --git a/packages/standard_cards/audio/card/male/slash.mp3 b/packages/standard_cards/audio/card/male/slash.mp3 index 8787c334..a239735d 100644 Binary files a/packages/standard_cards/audio/card/male/slash.mp3 and b/packages/standard_cards/audio/card/male/slash.mp3 differ diff --git a/packages/standard_cards/audio/card/male/snatch.mp3 b/packages/standard_cards/audio/card/male/snatch.mp3 index ab3339e9..84a17f2d 100644 Binary files a/packages/standard_cards/audio/card/male/snatch.mp3 and b/packages/standard_cards/audio/card/male/snatch.mp3 differ diff --git a/packages/standard_cards/audio/card/nioh_shield.mp3 b/packages/standard_cards/audio/card/nioh_shield.mp3 new file mode 100644 index 00000000..1c6a4035 Binary files /dev/null and b/packages/standard_cards/audio/card/nioh_shield.mp3 differ diff --git a/packages/standard_cards/audio/card/qinggang_sword.mp3 b/packages/standard_cards/audio/card/qinggang_sword.mp3 new file mode 100644 index 00000000..cf1b0963 Binary files /dev/null and b/packages/standard_cards/audio/card/qinggang_sword.mp3 differ diff --git a/packages/standard_cards/audio/card/spear.mp3 b/packages/standard_cards/audio/card/spear.mp3 new file mode 100644 index 00000000..a758a427 Binary files /dev/null and b/packages/standard_cards/audio/card/spear.mp3 differ diff --git a/packages/standard_cards/image/anim/axe/0.png b/packages/standard_cards/image/anim/axe/0.png new file mode 100644 index 00000000..53eba2fa Binary files /dev/null and b/packages/standard_cards/image/anim/axe/0.png differ diff --git a/packages/standard_cards/image/anim/axe/1.png b/packages/standard_cards/image/anim/axe/1.png new file mode 100644 index 00000000..62c6d376 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/1.png differ diff --git a/packages/standard_cards/image/anim/axe/10.png b/packages/standard_cards/image/anim/axe/10.png new file mode 100644 index 00000000..09979665 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/10.png differ diff --git a/packages/standard_cards/image/anim/axe/11.png b/packages/standard_cards/image/anim/axe/11.png new file mode 100644 index 00000000..95fa98bc Binary files /dev/null and b/packages/standard_cards/image/anim/axe/11.png differ diff --git a/packages/standard_cards/image/anim/axe/12.png b/packages/standard_cards/image/anim/axe/12.png new file mode 100644 index 00000000..2727d036 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/12.png differ diff --git a/packages/standard_cards/image/anim/axe/13.png b/packages/standard_cards/image/anim/axe/13.png new file mode 100644 index 00000000..fa57bdc3 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/13.png differ diff --git a/packages/standard_cards/image/anim/axe/14.png b/packages/standard_cards/image/anim/axe/14.png new file mode 100644 index 00000000..1e61112a Binary files /dev/null and b/packages/standard_cards/image/anim/axe/14.png differ diff --git a/packages/standard_cards/image/anim/axe/15.png b/packages/standard_cards/image/anim/axe/15.png new file mode 100644 index 00000000..690bd978 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/15.png differ diff --git a/packages/standard_cards/image/anim/axe/16.png b/packages/standard_cards/image/anim/axe/16.png new file mode 100644 index 00000000..a56227de Binary files /dev/null and b/packages/standard_cards/image/anim/axe/16.png differ diff --git a/packages/standard_cards/image/anim/axe/17.png b/packages/standard_cards/image/anim/axe/17.png new file mode 100644 index 00000000..a56227de Binary files /dev/null and b/packages/standard_cards/image/anim/axe/17.png differ diff --git a/packages/standard_cards/image/anim/axe/18.png b/packages/standard_cards/image/anim/axe/18.png new file mode 100644 index 00000000..df3b4687 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/18.png differ diff --git a/packages/standard_cards/image/anim/axe/19.png b/packages/standard_cards/image/anim/axe/19.png new file mode 100644 index 00000000..bff439c2 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/19.png differ diff --git a/packages/standard_cards/image/anim/axe/2.png b/packages/standard_cards/image/anim/axe/2.png new file mode 100644 index 00000000..61137fa0 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/2.png differ diff --git a/packages/standard_cards/image/anim/axe/20.png b/packages/standard_cards/image/anim/axe/20.png new file mode 100644 index 00000000..b636345f Binary files /dev/null and b/packages/standard_cards/image/anim/axe/20.png differ diff --git a/packages/standard_cards/image/anim/axe/21.png b/packages/standard_cards/image/anim/axe/21.png new file mode 100644 index 00000000..2ba5c114 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/21.png differ diff --git a/packages/standard_cards/image/anim/axe/22.png b/packages/standard_cards/image/anim/axe/22.png new file mode 100644 index 00000000..43c2db52 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/22.png differ diff --git a/packages/standard_cards/image/anim/axe/23.png b/packages/standard_cards/image/anim/axe/23.png new file mode 100644 index 00000000..c185ef80 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/23.png differ diff --git a/packages/standard_cards/image/anim/axe/24.png b/packages/standard_cards/image/anim/axe/24.png new file mode 100644 index 00000000..8bb7f26a Binary files /dev/null and b/packages/standard_cards/image/anim/axe/24.png differ diff --git a/packages/standard_cards/image/anim/axe/25.png b/packages/standard_cards/image/anim/axe/25.png new file mode 100644 index 00000000..35ff578e Binary files /dev/null and b/packages/standard_cards/image/anim/axe/25.png differ diff --git a/packages/standard_cards/image/anim/axe/3.png b/packages/standard_cards/image/anim/axe/3.png new file mode 100644 index 00000000..90c9066d Binary files /dev/null and b/packages/standard_cards/image/anim/axe/3.png differ diff --git a/packages/standard_cards/image/anim/axe/4.png b/packages/standard_cards/image/anim/axe/4.png new file mode 100644 index 00000000..597131f6 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/4.png differ diff --git a/packages/standard_cards/image/anim/axe/5.png b/packages/standard_cards/image/anim/axe/5.png new file mode 100644 index 00000000..31697aab Binary files /dev/null and b/packages/standard_cards/image/anim/axe/5.png differ diff --git a/packages/standard_cards/image/anim/axe/6.png b/packages/standard_cards/image/anim/axe/6.png new file mode 100644 index 00000000..450a87f6 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/6.png differ diff --git a/packages/standard_cards/image/anim/axe/7.png b/packages/standard_cards/image/anim/axe/7.png new file mode 100644 index 00000000..d6ec2873 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/7.png differ diff --git a/packages/standard_cards/image/anim/axe/8.png b/packages/standard_cards/image/anim/axe/8.png new file mode 100644 index 00000000..22049489 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/8.png differ diff --git a/packages/standard_cards/image/anim/axe/9.png b/packages/standard_cards/image/anim/axe/9.png new file mode 100644 index 00000000..cba05b40 Binary files /dev/null and b/packages/standard_cards/image/anim/axe/9.png differ diff --git a/packages/standard_cards/image/anim/blade/0.png b/packages/standard_cards/image/anim/blade/0.png new file mode 100644 index 00000000..30eb995a Binary files /dev/null and b/packages/standard_cards/image/anim/blade/0.png differ diff --git a/packages/standard_cards/image/anim/blade/1.png b/packages/standard_cards/image/anim/blade/1.png new file mode 100644 index 00000000..833039c4 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/1.png differ diff --git a/packages/standard_cards/image/anim/blade/10.png b/packages/standard_cards/image/anim/blade/10.png new file mode 100644 index 00000000..c13f4fad Binary files /dev/null and b/packages/standard_cards/image/anim/blade/10.png differ diff --git a/packages/standard_cards/image/anim/blade/11.png b/packages/standard_cards/image/anim/blade/11.png new file mode 100644 index 00000000..80a947a8 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/11.png differ diff --git a/packages/standard_cards/image/anim/blade/12.png b/packages/standard_cards/image/anim/blade/12.png new file mode 100644 index 00000000..3d461d1d Binary files /dev/null and b/packages/standard_cards/image/anim/blade/12.png differ diff --git a/packages/standard_cards/image/anim/blade/13.png b/packages/standard_cards/image/anim/blade/13.png new file mode 100644 index 00000000..87bda52a Binary files /dev/null and b/packages/standard_cards/image/anim/blade/13.png differ diff --git a/packages/standard_cards/image/anim/blade/14.png b/packages/standard_cards/image/anim/blade/14.png new file mode 100644 index 00000000..34dfbc47 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/14.png differ diff --git a/packages/standard_cards/image/anim/blade/15.png b/packages/standard_cards/image/anim/blade/15.png new file mode 100644 index 00000000..34dfbc47 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/15.png differ diff --git a/packages/standard_cards/image/anim/blade/16.png b/packages/standard_cards/image/anim/blade/16.png new file mode 100644 index 00000000..34dfbc47 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/16.png differ diff --git a/packages/standard_cards/image/anim/blade/17.png b/packages/standard_cards/image/anim/blade/17.png new file mode 100644 index 00000000..34dfbc47 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/17.png differ diff --git a/packages/standard_cards/image/anim/blade/18.png b/packages/standard_cards/image/anim/blade/18.png new file mode 100644 index 00000000..34dfbc47 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/18.png differ diff --git a/packages/standard_cards/image/anim/blade/19.png b/packages/standard_cards/image/anim/blade/19.png new file mode 100644 index 00000000..34dfbc47 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/19.png differ diff --git a/packages/standard_cards/image/anim/blade/2.png b/packages/standard_cards/image/anim/blade/2.png new file mode 100644 index 00000000..6c459928 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/2.png differ diff --git a/packages/standard_cards/image/anim/blade/20.png b/packages/standard_cards/image/anim/blade/20.png new file mode 100644 index 00000000..46b02990 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/20.png differ diff --git a/packages/standard_cards/image/anim/blade/21.png b/packages/standard_cards/image/anim/blade/21.png new file mode 100644 index 00000000..9554e89f Binary files /dev/null and b/packages/standard_cards/image/anim/blade/21.png differ diff --git a/packages/standard_cards/image/anim/blade/22.png b/packages/standard_cards/image/anim/blade/22.png new file mode 100644 index 00000000..91743421 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/22.png differ diff --git a/packages/standard_cards/image/anim/blade/3.png b/packages/standard_cards/image/anim/blade/3.png new file mode 100644 index 00000000..21773ce4 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/3.png differ diff --git a/packages/standard_cards/image/anim/blade/4.png b/packages/standard_cards/image/anim/blade/4.png new file mode 100644 index 00000000..8e4eb836 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/4.png differ diff --git a/packages/standard_cards/image/anim/blade/5.png b/packages/standard_cards/image/anim/blade/5.png new file mode 100644 index 00000000..63ef5ecb Binary files /dev/null and b/packages/standard_cards/image/anim/blade/5.png differ diff --git a/packages/standard_cards/image/anim/blade/6.png b/packages/standard_cards/image/anim/blade/6.png new file mode 100644 index 00000000..6869e7c7 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/6.png differ diff --git a/packages/standard_cards/image/anim/blade/7.png b/packages/standard_cards/image/anim/blade/7.png new file mode 100644 index 00000000..96293024 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/7.png differ diff --git a/packages/standard_cards/image/anim/blade/8.png b/packages/standard_cards/image/anim/blade/8.png new file mode 100644 index 00000000..08fe1f24 Binary files /dev/null and b/packages/standard_cards/image/anim/blade/8.png differ diff --git a/packages/standard_cards/image/anim/blade/9.png b/packages/standard_cards/image/anim/blade/9.png new file mode 100644 index 00000000..f602c6ab Binary files /dev/null and b/packages/standard_cards/image/anim/blade/9.png differ diff --git a/packages/standard_cards/image/anim/crossbow/0.png b/packages/standard_cards/image/anim/crossbow/0.png new file mode 100644 index 00000000..daaefddb Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/0.png differ diff --git a/packages/standard_cards/image/anim/crossbow/1.png b/packages/standard_cards/image/anim/crossbow/1.png new file mode 100644 index 00000000..3b8a626d Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/1.png differ diff --git a/packages/standard_cards/image/anim/crossbow/10.png b/packages/standard_cards/image/anim/crossbow/10.png new file mode 100644 index 00000000..804014ab Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/10.png differ diff --git a/packages/standard_cards/image/anim/crossbow/11.png b/packages/standard_cards/image/anim/crossbow/11.png new file mode 100644 index 00000000..8dea7e31 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/11.png differ diff --git a/packages/standard_cards/image/anim/crossbow/12.png b/packages/standard_cards/image/anim/crossbow/12.png new file mode 100644 index 00000000..8c00e642 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/12.png differ diff --git a/packages/standard_cards/image/anim/crossbow/13.png b/packages/standard_cards/image/anim/crossbow/13.png new file mode 100644 index 00000000..48f8bce1 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/13.png differ diff --git a/packages/standard_cards/image/anim/crossbow/14.png b/packages/standard_cards/image/anim/crossbow/14.png new file mode 100644 index 00000000..6a259553 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/14.png differ diff --git a/packages/standard_cards/image/anim/crossbow/15.png b/packages/standard_cards/image/anim/crossbow/15.png new file mode 100644 index 00000000..c4aed955 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/15.png differ diff --git a/packages/standard_cards/image/anim/crossbow/16.png b/packages/standard_cards/image/anim/crossbow/16.png new file mode 100644 index 00000000..3d4ee085 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/16.png differ diff --git a/packages/standard_cards/image/anim/crossbow/17.png b/packages/standard_cards/image/anim/crossbow/17.png new file mode 100644 index 00000000..c4aed955 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/17.png differ diff --git a/packages/standard_cards/image/anim/crossbow/18.png b/packages/standard_cards/image/anim/crossbow/18.png new file mode 100644 index 00000000..3d4ee085 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/18.png differ diff --git a/packages/standard_cards/image/anim/crossbow/19.png b/packages/standard_cards/image/anim/crossbow/19.png new file mode 100644 index 00000000..c4aed955 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/19.png differ diff --git a/packages/standard_cards/image/anim/crossbow/2.png b/packages/standard_cards/image/anim/crossbow/2.png new file mode 100644 index 00000000..35f53f7f Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/2.png differ diff --git a/packages/standard_cards/image/anim/crossbow/20.png b/packages/standard_cards/image/anim/crossbow/20.png new file mode 100644 index 00000000..e3b5dcb3 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/20.png differ diff --git a/packages/standard_cards/image/anim/crossbow/21.png b/packages/standard_cards/image/anim/crossbow/21.png new file mode 100644 index 00000000..72d3a1a1 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/21.png differ diff --git a/packages/standard_cards/image/anim/crossbow/22.png b/packages/standard_cards/image/anim/crossbow/22.png new file mode 100644 index 00000000..ca8bce0f Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/22.png differ diff --git a/packages/standard_cards/image/anim/crossbow/23.png b/packages/standard_cards/image/anim/crossbow/23.png new file mode 100644 index 00000000..b5d9fe87 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/23.png differ diff --git a/packages/standard_cards/image/anim/crossbow/24.png b/packages/standard_cards/image/anim/crossbow/24.png new file mode 100644 index 00000000..6752dcd2 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/24.png differ diff --git a/packages/standard_cards/image/anim/crossbow/3.png b/packages/standard_cards/image/anim/crossbow/3.png new file mode 100644 index 00000000..67472dec Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/3.png differ diff --git a/packages/standard_cards/image/anim/crossbow/4.png b/packages/standard_cards/image/anim/crossbow/4.png new file mode 100644 index 00000000..bf15f9ce Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/4.png differ diff --git a/packages/standard_cards/image/anim/crossbow/5.png b/packages/standard_cards/image/anim/crossbow/5.png new file mode 100644 index 00000000..bd1120f7 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/5.png differ diff --git a/packages/standard_cards/image/anim/crossbow/6.png b/packages/standard_cards/image/anim/crossbow/6.png new file mode 100644 index 00000000..f4879eff Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/6.png differ diff --git a/packages/standard_cards/image/anim/crossbow/7.png b/packages/standard_cards/image/anim/crossbow/7.png new file mode 100644 index 00000000..0c54e011 Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/7.png differ diff --git a/packages/standard_cards/image/anim/crossbow/8.png b/packages/standard_cards/image/anim/crossbow/8.png new file mode 100644 index 00000000..e1d48ebd Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/8.png differ diff --git a/packages/standard_cards/image/anim/crossbow/9.png b/packages/standard_cards/image/anim/crossbow/9.png new file mode 100644 index 00000000..0f5d0fca Binary files /dev/null and b/packages/standard_cards/image/anim/crossbow/9.png differ diff --git a/packages/standard_cards/image/anim/double_swords/0.png b/packages/standard_cards/image/anim/double_swords/0.png new file mode 100644 index 00000000..de798592 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/0.png differ diff --git a/packages/standard_cards/image/anim/double_swords/1.png b/packages/standard_cards/image/anim/double_swords/1.png new file mode 100644 index 00000000..d52de750 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/1.png differ diff --git a/packages/standard_cards/image/anim/double_swords/10.png b/packages/standard_cards/image/anim/double_swords/10.png new file mode 100644 index 00000000..abe77a1f Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/10.png differ diff --git a/packages/standard_cards/image/anim/double_swords/11.png b/packages/standard_cards/image/anim/double_swords/11.png new file mode 100644 index 00000000..2ed1cc2e Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/11.png differ diff --git a/packages/standard_cards/image/anim/double_swords/12.png b/packages/standard_cards/image/anim/double_swords/12.png new file mode 100644 index 00000000..2ed1cc2e Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/12.png differ diff --git a/packages/standard_cards/image/anim/double_swords/13.png b/packages/standard_cards/image/anim/double_swords/13.png new file mode 100644 index 00000000..f0005f04 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/13.png differ diff --git a/packages/standard_cards/image/anim/double_swords/14.png b/packages/standard_cards/image/anim/double_swords/14.png new file mode 100644 index 00000000..f0005f04 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/14.png differ diff --git a/packages/standard_cards/image/anim/double_swords/15.png b/packages/standard_cards/image/anim/double_swords/15.png new file mode 100644 index 00000000..f0005f04 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/15.png differ diff --git a/packages/standard_cards/image/anim/double_swords/16.png b/packages/standard_cards/image/anim/double_swords/16.png new file mode 100644 index 00000000..90ae1131 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/16.png differ diff --git a/packages/standard_cards/image/anim/double_swords/17.png b/packages/standard_cards/image/anim/double_swords/17.png new file mode 100644 index 00000000..90ae1131 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/17.png differ diff --git a/packages/standard_cards/image/anim/double_swords/18.png b/packages/standard_cards/image/anim/double_swords/18.png new file mode 100644 index 00000000..91b4da5e Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/18.png differ diff --git a/packages/standard_cards/image/anim/double_swords/19.png b/packages/standard_cards/image/anim/double_swords/19.png new file mode 100644 index 00000000..0c9675b5 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/19.png differ diff --git a/packages/standard_cards/image/anim/double_swords/2.png b/packages/standard_cards/image/anim/double_swords/2.png new file mode 100644 index 00000000..d7a93315 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/2.png differ diff --git a/packages/standard_cards/image/anim/double_swords/20.png b/packages/standard_cards/image/anim/double_swords/20.png new file mode 100644 index 00000000..a92f7464 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/20.png differ diff --git a/packages/standard_cards/image/anim/double_swords/21.png b/packages/standard_cards/image/anim/double_swords/21.png new file mode 100644 index 00000000..c84a56a1 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/21.png differ diff --git a/packages/standard_cards/image/anim/double_swords/22.png b/packages/standard_cards/image/anim/double_swords/22.png new file mode 100644 index 00000000..90be4b01 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/22.png differ diff --git a/packages/standard_cards/image/anim/double_swords/23.png b/packages/standard_cards/image/anim/double_swords/23.png new file mode 100644 index 00000000..1be2376f Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/23.png differ diff --git a/packages/standard_cards/image/anim/double_swords/24.png b/packages/standard_cards/image/anim/double_swords/24.png new file mode 100644 index 00000000..4fc956d6 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/24.png differ diff --git a/packages/standard_cards/image/anim/double_swords/3.png b/packages/standard_cards/image/anim/double_swords/3.png new file mode 100644 index 00000000..cd1d7b5d Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/3.png differ diff --git a/packages/standard_cards/image/anim/double_swords/4.png b/packages/standard_cards/image/anim/double_swords/4.png new file mode 100644 index 00000000..cd1d7b5d Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/4.png differ diff --git a/packages/standard_cards/image/anim/double_swords/5.png b/packages/standard_cards/image/anim/double_swords/5.png new file mode 100644 index 00000000..37381cb8 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/5.png differ diff --git a/packages/standard_cards/image/anim/double_swords/6.png b/packages/standard_cards/image/anim/double_swords/6.png new file mode 100644 index 00000000..37381cb8 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/6.png differ diff --git a/packages/standard_cards/image/anim/double_swords/7.png b/packages/standard_cards/image/anim/double_swords/7.png new file mode 100644 index 00000000..37381cb8 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/7.png differ diff --git a/packages/standard_cards/image/anim/double_swords/8.png b/packages/standard_cards/image/anim/double_swords/8.png new file mode 100644 index 00000000..01fbec26 Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/8.png differ diff --git a/packages/standard_cards/image/anim/double_swords/9.png b/packages/standard_cards/image/anim/double_swords/9.png new file mode 100644 index 00000000..abe77a1f Binary files /dev/null and b/packages/standard_cards/image/anim/double_swords/9.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/0.png b/packages/standard_cards/image/anim/eight_diagram/0.png new file mode 100644 index 00000000..13519740 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/0.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/1.png b/packages/standard_cards/image/anim/eight_diagram/1.png new file mode 100644 index 00000000..23ddff76 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/1.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/10.png b/packages/standard_cards/image/anim/eight_diagram/10.png new file mode 100644 index 00000000..dfcfdb57 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/10.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/11.png b/packages/standard_cards/image/anim/eight_diagram/11.png new file mode 100644 index 00000000..6fbcb5ee Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/11.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/12.png b/packages/standard_cards/image/anim/eight_diagram/12.png new file mode 100644 index 00000000..a836461c Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/12.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/13.png b/packages/standard_cards/image/anim/eight_diagram/13.png new file mode 100644 index 00000000..02454719 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/13.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/14.png b/packages/standard_cards/image/anim/eight_diagram/14.png new file mode 100644 index 00000000..1ed00836 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/14.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/15.png b/packages/standard_cards/image/anim/eight_diagram/15.png new file mode 100644 index 00000000..ed904284 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/15.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/16.png b/packages/standard_cards/image/anim/eight_diagram/16.png new file mode 100644 index 00000000..ed5aa4f3 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/16.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/17.png b/packages/standard_cards/image/anim/eight_diagram/17.png new file mode 100644 index 00000000..4e509a9b Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/17.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/18.png b/packages/standard_cards/image/anim/eight_diagram/18.png new file mode 100644 index 00000000..5466dcbf Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/18.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/19.png b/packages/standard_cards/image/anim/eight_diagram/19.png new file mode 100644 index 00000000..adc8c390 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/19.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/2.png b/packages/standard_cards/image/anim/eight_diagram/2.png new file mode 100644 index 00000000..547a6ff7 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/2.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/20.png b/packages/standard_cards/image/anim/eight_diagram/20.png new file mode 100644 index 00000000..345776f7 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/20.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/21.png b/packages/standard_cards/image/anim/eight_diagram/21.png new file mode 100644 index 00000000..fd196e9e Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/21.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/22.png b/packages/standard_cards/image/anim/eight_diagram/22.png new file mode 100644 index 00000000..c422820d Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/22.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/23.png b/packages/standard_cards/image/anim/eight_diagram/23.png new file mode 100644 index 00000000..7a74d9b2 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/23.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/3.png b/packages/standard_cards/image/anim/eight_diagram/3.png new file mode 100644 index 00000000..cde398e9 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/3.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/4.png b/packages/standard_cards/image/anim/eight_diagram/4.png new file mode 100644 index 00000000..12e0f76b Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/4.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/5.png b/packages/standard_cards/image/anim/eight_diagram/5.png new file mode 100644 index 00000000..b22eefc8 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/5.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/6.png b/packages/standard_cards/image/anim/eight_diagram/6.png new file mode 100644 index 00000000..bd502913 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/6.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/7.png b/packages/standard_cards/image/anim/eight_diagram/7.png new file mode 100644 index 00000000..a134d980 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/7.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/8.png b/packages/standard_cards/image/anim/eight_diagram/8.png new file mode 100644 index 00000000..79f39495 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/8.png differ diff --git a/packages/standard_cards/image/anim/eight_diagram/9.png b/packages/standard_cards/image/anim/eight_diagram/9.png new file mode 100644 index 00000000..72282fb1 Binary files /dev/null and b/packages/standard_cards/image/anim/eight_diagram/9.png differ diff --git a/packages/standard_cards/image/anim/halberd/0.png b/packages/standard_cards/image/anim/halberd/0.png new file mode 100644 index 00000000..a10067ed Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/0.png differ diff --git a/packages/standard_cards/image/anim/halberd/1.png b/packages/standard_cards/image/anim/halberd/1.png new file mode 100644 index 00000000..f7ff4d94 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/1.png differ diff --git a/packages/standard_cards/image/anim/halberd/10.png b/packages/standard_cards/image/anim/halberd/10.png new file mode 100644 index 00000000..79546dae Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/10.png differ diff --git a/packages/standard_cards/image/anim/halberd/11.png b/packages/standard_cards/image/anim/halberd/11.png new file mode 100644 index 00000000..57d47889 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/11.png differ diff --git a/packages/standard_cards/image/anim/halberd/12.png b/packages/standard_cards/image/anim/halberd/12.png new file mode 100644 index 00000000..6a59ca8e Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/12.png differ diff --git a/packages/standard_cards/image/anim/halberd/13.png b/packages/standard_cards/image/anim/halberd/13.png new file mode 100644 index 00000000..cdb611c3 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/13.png differ diff --git a/packages/standard_cards/image/anim/halberd/14.png b/packages/standard_cards/image/anim/halberd/14.png new file mode 100644 index 00000000..121ebe80 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/14.png differ diff --git a/packages/standard_cards/image/anim/halberd/15.png b/packages/standard_cards/image/anim/halberd/15.png new file mode 100644 index 00000000..540fc750 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/15.png differ diff --git a/packages/standard_cards/image/anim/halberd/16.png b/packages/standard_cards/image/anim/halberd/16.png new file mode 100644 index 00000000..3e43800f Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/16.png differ diff --git a/packages/standard_cards/image/anim/halberd/17.png b/packages/standard_cards/image/anim/halberd/17.png new file mode 100644 index 00000000..9f2d2dcf Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/17.png differ diff --git a/packages/standard_cards/image/anim/halberd/18.png b/packages/standard_cards/image/anim/halberd/18.png new file mode 100644 index 00000000..c4664ba2 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/18.png differ diff --git a/packages/standard_cards/image/anim/halberd/19.png b/packages/standard_cards/image/anim/halberd/19.png new file mode 100644 index 00000000..c972c9e0 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/19.png differ diff --git a/packages/standard_cards/image/anim/halberd/2.png b/packages/standard_cards/image/anim/halberd/2.png new file mode 100644 index 00000000..f95cbe36 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/2.png differ diff --git a/packages/standard_cards/image/anim/halberd/20.png b/packages/standard_cards/image/anim/halberd/20.png new file mode 100644 index 00000000..d326250e Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/20.png differ diff --git a/packages/standard_cards/image/anim/halberd/21.png b/packages/standard_cards/image/anim/halberd/21.png new file mode 100644 index 00000000..7c481cce Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/21.png differ diff --git a/packages/standard_cards/image/anim/halberd/22.png b/packages/standard_cards/image/anim/halberd/22.png new file mode 100644 index 00000000..8561459f Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/22.png differ diff --git a/packages/standard_cards/image/anim/halberd/23.png b/packages/standard_cards/image/anim/halberd/23.png new file mode 100644 index 00000000..2eeac43b Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/23.png differ diff --git a/packages/standard_cards/image/anim/halberd/24.png b/packages/standard_cards/image/anim/halberd/24.png new file mode 100644 index 00000000..4610bae5 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/24.png differ diff --git a/packages/standard_cards/image/anim/halberd/3.png b/packages/standard_cards/image/anim/halberd/3.png new file mode 100644 index 00000000..50b5bfd7 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/3.png differ diff --git a/packages/standard_cards/image/anim/halberd/4.png b/packages/standard_cards/image/anim/halberd/4.png new file mode 100644 index 00000000..79df2f5c Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/4.png differ diff --git a/packages/standard_cards/image/anim/halberd/5.png b/packages/standard_cards/image/anim/halberd/5.png new file mode 100644 index 00000000..d6c81da6 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/5.png differ diff --git a/packages/standard_cards/image/anim/halberd/6.png b/packages/standard_cards/image/anim/halberd/6.png new file mode 100644 index 00000000..821837b5 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/6.png differ diff --git a/packages/standard_cards/image/anim/halberd/7.png b/packages/standard_cards/image/anim/halberd/7.png new file mode 100644 index 00000000..a74d4db3 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/7.png differ diff --git a/packages/standard_cards/image/anim/halberd/8.png b/packages/standard_cards/image/anim/halberd/8.png new file mode 100644 index 00000000..78f4fc42 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/8.png differ diff --git a/packages/standard_cards/image/anim/halberd/9.png b/packages/standard_cards/image/anim/halberd/9.png new file mode 100644 index 00000000..0ce565f9 Binary files /dev/null and b/packages/standard_cards/image/anim/halberd/9.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/0.png b/packages/standard_cards/image/anim/ice_sword/0.png new file mode 100644 index 00000000..c36e8710 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/0.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/1.png b/packages/standard_cards/image/anim/ice_sword/1.png new file mode 100644 index 00000000..00384796 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/1.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/10.png b/packages/standard_cards/image/anim/ice_sword/10.png new file mode 100644 index 00000000..38f14b68 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/10.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/11.png b/packages/standard_cards/image/anim/ice_sword/11.png new file mode 100644 index 00000000..60a0059c Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/11.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/12.png b/packages/standard_cards/image/anim/ice_sword/12.png new file mode 100644 index 00000000..60a0059c Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/12.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/13.png b/packages/standard_cards/image/anim/ice_sword/13.png new file mode 100644 index 00000000..7a2e72b1 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/13.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/14.png b/packages/standard_cards/image/anim/ice_sword/14.png new file mode 100644 index 00000000..de3d7808 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/14.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/15.png b/packages/standard_cards/image/anim/ice_sword/15.png new file mode 100644 index 00000000..8d378f06 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/15.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/16.png b/packages/standard_cards/image/anim/ice_sword/16.png new file mode 100644 index 00000000..39209323 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/16.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/17.png b/packages/standard_cards/image/anim/ice_sword/17.png new file mode 100644 index 00000000..1969a6c9 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/17.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/18.png b/packages/standard_cards/image/anim/ice_sword/18.png new file mode 100644 index 00000000..e735d928 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/18.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/19.png b/packages/standard_cards/image/anim/ice_sword/19.png new file mode 100644 index 00000000..e735d928 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/19.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/2.png b/packages/standard_cards/image/anim/ice_sword/2.png new file mode 100644 index 00000000..d130f6cb Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/2.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/20.png b/packages/standard_cards/image/anim/ice_sword/20.png new file mode 100644 index 00000000..e735d928 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/20.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/21.png b/packages/standard_cards/image/anim/ice_sword/21.png new file mode 100644 index 00000000..e735d928 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/21.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/22.png b/packages/standard_cards/image/anim/ice_sword/22.png new file mode 100644 index 00000000..e735d928 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/22.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/23.png b/packages/standard_cards/image/anim/ice_sword/23.png new file mode 100644 index 00000000..4a73fd7c Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/23.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/24.png b/packages/standard_cards/image/anim/ice_sword/24.png new file mode 100644 index 00000000..ea6c1132 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/24.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/3.png b/packages/standard_cards/image/anim/ice_sword/3.png new file mode 100644 index 00000000..a17e8d5a Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/3.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/4.png b/packages/standard_cards/image/anim/ice_sword/4.png new file mode 100644 index 00000000..3296a52d Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/4.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/5.png b/packages/standard_cards/image/anim/ice_sword/5.png new file mode 100644 index 00000000..cd0cbcd0 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/5.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/6.png b/packages/standard_cards/image/anim/ice_sword/6.png new file mode 100644 index 00000000..de5b5038 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/6.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/7.png b/packages/standard_cards/image/anim/ice_sword/7.png new file mode 100644 index 00000000..44695130 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/7.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/8.png b/packages/standard_cards/image/anim/ice_sword/8.png new file mode 100644 index 00000000..f3293e00 Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/8.png differ diff --git a/packages/standard_cards/image/anim/ice_sword/9.png b/packages/standard_cards/image/anim/ice_sword/9.png new file mode 100644 index 00000000..f864664b Binary files /dev/null and b/packages/standard_cards/image/anim/ice_sword/9.png differ diff --git a/image/anim/jink/0.png b/packages/standard_cards/image/anim/jink/0.png similarity index 94% rename from image/anim/jink/0.png rename to packages/standard_cards/image/anim/jink/0.png index bafb7760..293f6b15 100644 Binary files a/image/anim/jink/0.png and b/packages/standard_cards/image/anim/jink/0.png differ diff --git a/image/anim/jink/1.png b/packages/standard_cards/image/anim/jink/1.png similarity index 98% rename from image/anim/jink/1.png rename to packages/standard_cards/image/anim/jink/1.png index ada2c387..83871376 100644 Binary files a/image/anim/jink/1.png and b/packages/standard_cards/image/anim/jink/1.png differ diff --git a/image/anim/jink/10.png b/packages/standard_cards/image/anim/jink/10.png similarity index 99% rename from image/anim/jink/10.png rename to packages/standard_cards/image/anim/jink/10.png index 7a9048b3..dda18302 100644 Binary files a/image/anim/jink/10.png and b/packages/standard_cards/image/anim/jink/10.png differ diff --git a/image/anim/jink/11.png b/packages/standard_cards/image/anim/jink/11.png similarity index 99% rename from image/anim/jink/11.png rename to packages/standard_cards/image/anim/jink/11.png index c442245f..e937b35a 100644 Binary files a/image/anim/jink/11.png and b/packages/standard_cards/image/anim/jink/11.png differ diff --git a/image/anim/jink/12.png b/packages/standard_cards/image/anim/jink/12.png similarity index 99% rename from image/anim/jink/12.png rename to packages/standard_cards/image/anim/jink/12.png index 64c4637f..d5b162ab 100644 Binary files a/image/anim/jink/12.png and b/packages/standard_cards/image/anim/jink/12.png differ diff --git a/image/anim/jink/13.png b/packages/standard_cards/image/anim/jink/13.png similarity index 99% rename from image/anim/jink/13.png rename to packages/standard_cards/image/anim/jink/13.png index 07bf9db1..aed27255 100644 Binary files a/image/anim/jink/13.png and b/packages/standard_cards/image/anim/jink/13.png differ diff --git a/image/anim/jink/14.png b/packages/standard_cards/image/anim/jink/14.png similarity index 99% rename from image/anim/jink/14.png rename to packages/standard_cards/image/anim/jink/14.png index 3cbc3af7..71418d1e 100644 Binary files a/image/anim/jink/14.png and b/packages/standard_cards/image/anim/jink/14.png differ diff --git a/image/anim/jink/15.png b/packages/standard_cards/image/anim/jink/15.png similarity index 99% rename from image/anim/jink/15.png rename to packages/standard_cards/image/anim/jink/15.png index 3cbc3af7..71418d1e 100644 Binary files a/image/anim/jink/15.png and b/packages/standard_cards/image/anim/jink/15.png differ diff --git a/image/anim/jink/16.png b/packages/standard_cards/image/anim/jink/16.png similarity index 99% rename from image/anim/jink/16.png rename to packages/standard_cards/image/anim/jink/16.png index c6e5a01e..71418d1e 100644 Binary files a/image/anim/jink/16.png and b/packages/standard_cards/image/anim/jink/16.png differ diff --git a/image/anim/jink/17.png b/packages/standard_cards/image/anim/jink/17.png similarity index 99% rename from image/anim/jink/17.png rename to packages/standard_cards/image/anim/jink/17.png index c6e5a01e..71418d1e 100644 Binary files a/image/anim/jink/17.png and b/packages/standard_cards/image/anim/jink/17.png differ diff --git a/image/anim/jink/18.png b/packages/standard_cards/image/anim/jink/18.png similarity index 99% rename from image/anim/jink/18.png rename to packages/standard_cards/image/anim/jink/18.png index 3cbc3af7..71418d1e 100644 Binary files a/image/anim/jink/18.png and b/packages/standard_cards/image/anim/jink/18.png differ diff --git a/image/anim/jink/19.png b/packages/standard_cards/image/anim/jink/19.png similarity index 99% rename from image/anim/jink/19.png rename to packages/standard_cards/image/anim/jink/19.png index 3cbc3af7..71418d1e 100644 Binary files a/image/anim/jink/19.png and b/packages/standard_cards/image/anim/jink/19.png differ diff --git a/image/anim/jink/2.png b/packages/standard_cards/image/anim/jink/2.png similarity index 99% rename from image/anim/jink/2.png rename to packages/standard_cards/image/anim/jink/2.png index 3049ab05..6f8e2dd8 100644 Binary files a/image/anim/jink/2.png and b/packages/standard_cards/image/anim/jink/2.png differ diff --git a/image/anim/jink/20.png b/packages/standard_cards/image/anim/jink/20.png similarity index 99% rename from image/anim/jink/20.png rename to packages/standard_cards/image/anim/jink/20.png index 3cbc3af7..71418d1e 100644 Binary files a/image/anim/jink/20.png and b/packages/standard_cards/image/anim/jink/20.png differ diff --git a/image/anim/jink/21.png b/packages/standard_cards/image/anim/jink/21.png similarity index 99% rename from image/anim/jink/21.png rename to packages/standard_cards/image/anim/jink/21.png index d59dc694..b9786901 100644 Binary files a/image/anim/jink/21.png and b/packages/standard_cards/image/anim/jink/21.png differ diff --git a/image/anim/jink/22.png b/packages/standard_cards/image/anim/jink/22.png similarity index 98% rename from image/anim/jink/22.png rename to packages/standard_cards/image/anim/jink/22.png index 03cde037..bfdcbc35 100644 Binary files a/image/anim/jink/22.png and b/packages/standard_cards/image/anim/jink/22.png differ diff --git a/image/anim/jink/3.png b/packages/standard_cards/image/anim/jink/3.png similarity index 99% rename from image/anim/jink/3.png rename to packages/standard_cards/image/anim/jink/3.png index fc953854..33d92ed6 100644 Binary files a/image/anim/jink/3.png and b/packages/standard_cards/image/anim/jink/3.png differ diff --git a/image/anim/jink/4.png b/packages/standard_cards/image/anim/jink/4.png similarity index 99% rename from image/anim/jink/4.png rename to packages/standard_cards/image/anim/jink/4.png index c39153fb..91cba5f8 100644 Binary files a/image/anim/jink/4.png and b/packages/standard_cards/image/anim/jink/4.png differ diff --git a/image/anim/jink/5.png b/packages/standard_cards/image/anim/jink/5.png similarity index 99% rename from image/anim/jink/5.png rename to packages/standard_cards/image/anim/jink/5.png index 9db5c932..f12532b2 100644 Binary files a/image/anim/jink/5.png and b/packages/standard_cards/image/anim/jink/5.png differ diff --git a/image/anim/jink/6.png b/packages/standard_cards/image/anim/jink/6.png similarity index 99% rename from image/anim/jink/6.png rename to packages/standard_cards/image/anim/jink/6.png index 8da2c080..280bb72f 100644 Binary files a/image/anim/jink/6.png and b/packages/standard_cards/image/anim/jink/6.png differ diff --git a/image/anim/jink/7.png b/packages/standard_cards/image/anim/jink/7.png similarity index 99% rename from image/anim/jink/7.png rename to packages/standard_cards/image/anim/jink/7.png index a00fbbd6..4f879120 100644 Binary files a/image/anim/jink/7.png and b/packages/standard_cards/image/anim/jink/7.png differ diff --git a/image/anim/jink/8.png b/packages/standard_cards/image/anim/jink/8.png similarity index 99% rename from image/anim/jink/8.png rename to packages/standard_cards/image/anim/jink/8.png index d8f5ed1d..0eb570b3 100644 Binary files a/image/anim/jink/8.png and b/packages/standard_cards/image/anim/jink/8.png differ diff --git a/image/anim/jink/9.png b/packages/standard_cards/image/anim/jink/9.png similarity index 99% rename from image/anim/jink/9.png rename to packages/standard_cards/image/anim/jink/9.png index 095c51b2..0eb570b3 100644 Binary files a/image/anim/jink/9.png and b/packages/standard_cards/image/anim/jink/9.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/0.png b/packages/standard_cards/image/anim/kylin_bow/0.png new file mode 100644 index 00000000..bcfa6d72 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/0.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/1.png b/packages/standard_cards/image/anim/kylin_bow/1.png new file mode 100644 index 00000000..2eff854d Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/1.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/10.png b/packages/standard_cards/image/anim/kylin_bow/10.png new file mode 100644 index 00000000..def0ff8b Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/10.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/11.png b/packages/standard_cards/image/anim/kylin_bow/11.png new file mode 100644 index 00000000..0b6e6cc3 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/11.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/12.png b/packages/standard_cards/image/anim/kylin_bow/12.png new file mode 100644 index 00000000..a999a6fc Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/12.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/13.png b/packages/standard_cards/image/anim/kylin_bow/13.png new file mode 100644 index 00000000..11ff82fc Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/13.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/14.png b/packages/standard_cards/image/anim/kylin_bow/14.png new file mode 100644 index 00000000..4cc1774e Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/14.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/15.png b/packages/standard_cards/image/anim/kylin_bow/15.png new file mode 100644 index 00000000..d8a41cc2 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/15.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/16.png b/packages/standard_cards/image/anim/kylin_bow/16.png new file mode 100644 index 00000000..7fa60c19 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/16.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/17.png b/packages/standard_cards/image/anim/kylin_bow/17.png new file mode 100644 index 00000000..6d22beda Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/17.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/18.png b/packages/standard_cards/image/anim/kylin_bow/18.png new file mode 100644 index 00000000..bf6f52ed Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/18.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/19.png b/packages/standard_cards/image/anim/kylin_bow/19.png new file mode 100644 index 00000000..3385b035 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/19.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/2.png b/packages/standard_cards/image/anim/kylin_bow/2.png new file mode 100644 index 00000000..90557b4f Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/2.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/20.png b/packages/standard_cards/image/anim/kylin_bow/20.png new file mode 100644 index 00000000..e6919e37 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/20.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/21.png b/packages/standard_cards/image/anim/kylin_bow/21.png new file mode 100644 index 00000000..ef44ca2c Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/21.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/22.png b/packages/standard_cards/image/anim/kylin_bow/22.png new file mode 100644 index 00000000..ef44ca2c Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/22.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/23.png b/packages/standard_cards/image/anim/kylin_bow/23.png new file mode 100644 index 00000000..ef44ca2c Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/23.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/24.png b/packages/standard_cards/image/anim/kylin_bow/24.png new file mode 100644 index 00000000..04e7d92a Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/24.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/25.png b/packages/standard_cards/image/anim/kylin_bow/25.png new file mode 100644 index 00000000..744ba43a Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/25.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/3.png b/packages/standard_cards/image/anim/kylin_bow/3.png new file mode 100644 index 00000000..e0cbf975 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/3.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/4.png b/packages/standard_cards/image/anim/kylin_bow/4.png new file mode 100644 index 00000000..9197c07c Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/4.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/5.png b/packages/standard_cards/image/anim/kylin_bow/5.png new file mode 100644 index 00000000..e85d7cec Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/5.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/6.png b/packages/standard_cards/image/anim/kylin_bow/6.png new file mode 100644 index 00000000..2b890afa Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/6.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/7.png b/packages/standard_cards/image/anim/kylin_bow/7.png new file mode 100644 index 00000000..8575ac50 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/7.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/8.png b/packages/standard_cards/image/anim/kylin_bow/8.png new file mode 100644 index 00000000..ab73dee0 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/8.png differ diff --git a/packages/standard_cards/image/anim/kylin_bow/9.png b/packages/standard_cards/image/anim/kylin_bow/9.png new file mode 100644 index 00000000..275d9673 Binary files /dev/null and b/packages/standard_cards/image/anim/kylin_bow/9.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/0.png b/packages/standard_cards/image/anim/nioh_shield/0.png new file mode 100644 index 00000000..95925387 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/0.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/1.png b/packages/standard_cards/image/anim/nioh_shield/1.png new file mode 100644 index 00000000..2e1857b1 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/1.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/10.png b/packages/standard_cards/image/anim/nioh_shield/10.png new file mode 100644 index 00000000..61309fee Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/10.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/11.png b/packages/standard_cards/image/anim/nioh_shield/11.png new file mode 100644 index 00000000..e8638e91 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/11.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/12.png b/packages/standard_cards/image/anim/nioh_shield/12.png new file mode 100644 index 00000000..c4ee9354 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/12.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/13.png b/packages/standard_cards/image/anim/nioh_shield/13.png new file mode 100644 index 00000000..fae27723 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/13.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/14.png b/packages/standard_cards/image/anim/nioh_shield/14.png new file mode 100644 index 00000000..cca2f4d8 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/14.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/15.png b/packages/standard_cards/image/anim/nioh_shield/15.png new file mode 100644 index 00000000..66770bfd Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/15.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/16.png b/packages/standard_cards/image/anim/nioh_shield/16.png new file mode 100644 index 00000000..7e272659 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/16.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/17.png b/packages/standard_cards/image/anim/nioh_shield/17.png new file mode 100644 index 00000000..5b20501f Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/17.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/18.png b/packages/standard_cards/image/anim/nioh_shield/18.png new file mode 100644 index 00000000..143cfc7e Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/18.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/19.png b/packages/standard_cards/image/anim/nioh_shield/19.png new file mode 100644 index 00000000..e0ab81a6 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/19.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/2.png b/packages/standard_cards/image/anim/nioh_shield/2.png new file mode 100644 index 00000000..48b5ad5a Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/2.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/20.png b/packages/standard_cards/image/anim/nioh_shield/20.png new file mode 100644 index 00000000..827b026a Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/20.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/21.png b/packages/standard_cards/image/anim/nioh_shield/21.png new file mode 100644 index 00000000..f2e34e05 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/21.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/22.png b/packages/standard_cards/image/anim/nioh_shield/22.png new file mode 100644 index 00000000..e1b204d7 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/22.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/23.png b/packages/standard_cards/image/anim/nioh_shield/23.png new file mode 100644 index 00000000..d13a3793 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/23.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/3.png b/packages/standard_cards/image/anim/nioh_shield/3.png new file mode 100644 index 00000000..bf23e2c2 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/3.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/4.png b/packages/standard_cards/image/anim/nioh_shield/4.png new file mode 100644 index 00000000..783a7f1f Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/4.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/5.png b/packages/standard_cards/image/anim/nioh_shield/5.png new file mode 100644 index 00000000..90f38512 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/5.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/6.png b/packages/standard_cards/image/anim/nioh_shield/6.png new file mode 100644 index 00000000..89fb23d5 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/6.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/7.png b/packages/standard_cards/image/anim/nioh_shield/7.png new file mode 100644 index 00000000..6a20fb25 Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/7.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/8.png b/packages/standard_cards/image/anim/nioh_shield/8.png new file mode 100644 index 00000000..173226bc Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/8.png differ diff --git a/packages/standard_cards/image/anim/nioh_shield/9.png b/packages/standard_cards/image/anim/nioh_shield/9.png new file mode 100644 index 00000000..7fe27b5a Binary files /dev/null and b/packages/standard_cards/image/anim/nioh_shield/9.png differ diff --git a/image/anim/peach/0.png b/packages/standard_cards/image/anim/peach/0.png similarity index 99% rename from image/anim/peach/0.png rename to packages/standard_cards/image/anim/peach/0.png index 005e11d9..ca504686 100644 Binary files a/image/anim/peach/0.png and b/packages/standard_cards/image/anim/peach/0.png differ diff --git a/image/anim/peach/1.png b/packages/standard_cards/image/anim/peach/1.png similarity index 99% rename from image/anim/peach/1.png rename to packages/standard_cards/image/anim/peach/1.png index 7f9777ef..0c47adf8 100644 Binary files a/image/anim/peach/1.png and b/packages/standard_cards/image/anim/peach/1.png differ diff --git a/image/anim/peach/10.png b/packages/standard_cards/image/anim/peach/10.png similarity index 99% rename from image/anim/peach/10.png rename to packages/standard_cards/image/anim/peach/10.png index 3df6c4c4..83b99440 100644 Binary files a/image/anim/peach/10.png and b/packages/standard_cards/image/anim/peach/10.png differ diff --git a/image/anim/peach/11.png b/packages/standard_cards/image/anim/peach/11.png similarity index 99% rename from image/anim/peach/11.png rename to packages/standard_cards/image/anim/peach/11.png index cd0151ef..af3bd76f 100644 Binary files a/image/anim/peach/11.png and b/packages/standard_cards/image/anim/peach/11.png differ diff --git a/image/anim/peach/12.png b/packages/standard_cards/image/anim/peach/12.png similarity index 99% rename from image/anim/peach/12.png rename to packages/standard_cards/image/anim/peach/12.png index 0a5f826c..6a64fa8c 100644 Binary files a/image/anim/peach/12.png and b/packages/standard_cards/image/anim/peach/12.png differ diff --git a/image/anim/peach/13.png b/packages/standard_cards/image/anim/peach/13.png similarity index 99% rename from image/anim/peach/13.png rename to packages/standard_cards/image/anim/peach/13.png index b67e9156..1fa13299 100644 Binary files a/image/anim/peach/13.png and b/packages/standard_cards/image/anim/peach/13.png differ diff --git a/image/anim/peach/14.png b/packages/standard_cards/image/anim/peach/14.png similarity index 99% rename from image/anim/peach/14.png rename to packages/standard_cards/image/anim/peach/14.png index 89fb1497..2011405e 100644 Binary files a/image/anim/peach/14.png and b/packages/standard_cards/image/anim/peach/14.png differ diff --git a/image/anim/peach/15.png b/packages/standard_cards/image/anim/peach/15.png similarity index 98% rename from image/anim/peach/15.png rename to packages/standard_cards/image/anim/peach/15.png index 0c4d4202..a30bb664 100644 Binary files a/image/anim/peach/15.png and b/packages/standard_cards/image/anim/peach/15.png differ diff --git a/image/anim/peach/16.png b/packages/standard_cards/image/anim/peach/16.png similarity index 98% rename from image/anim/peach/16.png rename to packages/standard_cards/image/anim/peach/16.png index 0d0044d5..46774ecf 100644 Binary files a/image/anim/peach/16.png and b/packages/standard_cards/image/anim/peach/16.png differ diff --git a/image/anim/peach/2.png b/packages/standard_cards/image/anim/peach/2.png similarity index 99% rename from image/anim/peach/2.png rename to packages/standard_cards/image/anim/peach/2.png index a35cc9fa..15245fd6 100644 Binary files a/image/anim/peach/2.png and b/packages/standard_cards/image/anim/peach/2.png differ diff --git a/image/anim/peach/3.png b/packages/standard_cards/image/anim/peach/3.png similarity index 99% rename from image/anim/peach/3.png rename to packages/standard_cards/image/anim/peach/3.png index a418a5e2..2ce91af6 100644 Binary files a/image/anim/peach/3.png and b/packages/standard_cards/image/anim/peach/3.png differ diff --git a/image/anim/peach/4.png b/packages/standard_cards/image/anim/peach/4.png similarity index 99% rename from image/anim/peach/4.png rename to packages/standard_cards/image/anim/peach/4.png index dcb0e7e9..b5420ac9 100644 Binary files a/image/anim/peach/4.png and b/packages/standard_cards/image/anim/peach/4.png differ diff --git a/image/anim/peach/5.png b/packages/standard_cards/image/anim/peach/5.png similarity index 99% rename from image/anim/peach/5.png rename to packages/standard_cards/image/anim/peach/5.png index 96a81bb1..658a580d 100644 Binary files a/image/anim/peach/5.png and b/packages/standard_cards/image/anim/peach/5.png differ diff --git a/image/anim/peach/6.png b/packages/standard_cards/image/anim/peach/6.png similarity index 99% rename from image/anim/peach/6.png rename to packages/standard_cards/image/anim/peach/6.png index 64028ba0..eea4a0c1 100644 Binary files a/image/anim/peach/6.png and b/packages/standard_cards/image/anim/peach/6.png differ diff --git a/image/anim/peach/7.png b/packages/standard_cards/image/anim/peach/7.png similarity index 99% rename from image/anim/peach/7.png rename to packages/standard_cards/image/anim/peach/7.png index 259c8285..93a1231f 100644 Binary files a/image/anim/peach/7.png and b/packages/standard_cards/image/anim/peach/7.png differ diff --git a/image/anim/peach/8.png b/packages/standard_cards/image/anim/peach/8.png similarity index 99% rename from image/anim/peach/8.png rename to packages/standard_cards/image/anim/peach/8.png index 7b918694..8a680ab2 100644 Binary files a/image/anim/peach/8.png and b/packages/standard_cards/image/anim/peach/8.png differ diff --git a/image/anim/peach/9.png b/packages/standard_cards/image/anim/peach/9.png similarity index 99% rename from image/anim/peach/9.png rename to packages/standard_cards/image/anim/peach/9.png index da7c4107..6831be57 100644 Binary files a/image/anim/peach/9.png and b/packages/standard_cards/image/anim/peach/9.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/0.png b/packages/standard_cards/image/anim/qinggang_sword/0.png new file mode 100644 index 00000000..71ef296d Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/0.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/1.png b/packages/standard_cards/image/anim/qinggang_sword/1.png new file mode 100644 index 00000000..71ef296d Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/1.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/10.png b/packages/standard_cards/image/anim/qinggang_sword/10.png new file mode 100644 index 00000000..2de51ba3 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/10.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/11.png b/packages/standard_cards/image/anim/qinggang_sword/11.png new file mode 100644 index 00000000..2de51ba3 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/11.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/12.png b/packages/standard_cards/image/anim/qinggang_sword/12.png new file mode 100644 index 00000000..6de1de39 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/12.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/13.png b/packages/standard_cards/image/anim/qinggang_sword/13.png new file mode 100644 index 00000000..1c79dfcf Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/13.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/14.png b/packages/standard_cards/image/anim/qinggang_sword/14.png new file mode 100644 index 00000000..905c589b Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/14.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/15.png b/packages/standard_cards/image/anim/qinggang_sword/15.png new file mode 100644 index 00000000..fb44536a Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/15.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/16.png b/packages/standard_cards/image/anim/qinggang_sword/16.png new file mode 100644 index 00000000..21584d5b Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/16.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/17.png b/packages/standard_cards/image/anim/qinggang_sword/17.png new file mode 100644 index 00000000..fb44536a Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/17.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/18.png b/packages/standard_cards/image/anim/qinggang_sword/18.png new file mode 100644 index 00000000..21584d5b Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/18.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/19.png b/packages/standard_cards/image/anim/qinggang_sword/19.png new file mode 100644 index 00000000..21584d5b Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/19.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/2.png b/packages/standard_cards/image/anim/qinggang_sword/2.png new file mode 100644 index 00000000..58e8c153 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/2.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/20.png b/packages/standard_cards/image/anim/qinggang_sword/20.png new file mode 100644 index 00000000..732974e9 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/20.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/21.png b/packages/standard_cards/image/anim/qinggang_sword/21.png new file mode 100644 index 00000000..eeafe072 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/21.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/22.png b/packages/standard_cards/image/anim/qinggang_sword/22.png new file mode 100644 index 00000000..899b4e11 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/22.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/23.png b/packages/standard_cards/image/anim/qinggang_sword/23.png new file mode 100644 index 00000000..c2f0c06b Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/23.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/3.png b/packages/standard_cards/image/anim/qinggang_sword/3.png new file mode 100644 index 00000000..58e8c153 Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/3.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/4.png b/packages/standard_cards/image/anim/qinggang_sword/4.png new file mode 100644 index 00000000..257d088b Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/4.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/5.png b/packages/standard_cards/image/anim/qinggang_sword/5.png new file mode 100644 index 00000000..257d088b Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/5.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/6.png b/packages/standard_cards/image/anim/qinggang_sword/6.png new file mode 100644 index 00000000..3c542c0e Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/6.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/7.png b/packages/standard_cards/image/anim/qinggang_sword/7.png new file mode 100644 index 00000000..3c542c0e Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/7.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/8.png b/packages/standard_cards/image/anim/qinggang_sword/8.png new file mode 100644 index 00000000..07f370da Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/8.png differ diff --git a/packages/standard_cards/image/anim/qinggang_sword/9.png b/packages/standard_cards/image/anim/qinggang_sword/9.png new file mode 100644 index 00000000..00d2e26a Binary files /dev/null and b/packages/standard_cards/image/anim/qinggang_sword/9.png differ diff --git a/image/anim/slash/0.png b/packages/standard_cards/image/anim/slash/0.png similarity index 94% rename from image/anim/slash/0.png rename to packages/standard_cards/image/anim/slash/0.png index 0caa1c3f..57041bb2 100644 Binary files a/image/anim/slash/0.png and b/packages/standard_cards/image/anim/slash/0.png differ diff --git a/image/anim/slash/1.png b/packages/standard_cards/image/anim/slash/1.png similarity index 94% rename from image/anim/slash/1.png rename to packages/standard_cards/image/anim/slash/1.png index febb6239..57041bb2 100644 Binary files a/image/anim/slash/1.png and b/packages/standard_cards/image/anim/slash/1.png differ diff --git a/image/anim/slash/10.png b/packages/standard_cards/image/anim/slash/10.png similarity index 99% rename from image/anim/slash/10.png rename to packages/standard_cards/image/anim/slash/10.png index 8eb07366..710ac56b 100644 Binary files a/image/anim/slash/10.png and b/packages/standard_cards/image/anim/slash/10.png differ diff --git a/image/anim/slash/11.png b/packages/standard_cards/image/anim/slash/11.png similarity index 99% rename from image/anim/slash/11.png rename to packages/standard_cards/image/anim/slash/11.png index e7329d97..2a2ce7bc 100644 Binary files a/image/anim/slash/11.png and b/packages/standard_cards/image/anim/slash/11.png differ diff --git a/image/anim/slash/12.png b/packages/standard_cards/image/anim/slash/12.png similarity index 99% rename from image/anim/slash/12.png rename to packages/standard_cards/image/anim/slash/12.png index a11cd3f5..7514d57d 100644 Binary files a/image/anim/slash/12.png and b/packages/standard_cards/image/anim/slash/12.png differ diff --git a/image/anim/slash/13.png b/packages/standard_cards/image/anim/slash/13.png similarity index 99% rename from image/anim/slash/13.png rename to packages/standard_cards/image/anim/slash/13.png index 1ae51ba9..e154a2ae 100644 Binary files a/image/anim/slash/13.png and b/packages/standard_cards/image/anim/slash/13.png differ diff --git a/image/anim/slash/14.png b/packages/standard_cards/image/anim/slash/14.png similarity index 99% rename from image/anim/slash/14.png rename to packages/standard_cards/image/anim/slash/14.png index 75e559ea..96976af9 100644 Binary files a/image/anim/slash/14.png and b/packages/standard_cards/image/anim/slash/14.png differ diff --git a/image/anim/slash/15.png b/packages/standard_cards/image/anim/slash/15.png similarity index 99% rename from image/anim/slash/15.png rename to packages/standard_cards/image/anim/slash/15.png index c367a04f..96976af9 100644 Binary files a/image/anim/slash/15.png and b/packages/standard_cards/image/anim/slash/15.png differ diff --git a/image/anim/slash/16.png b/packages/standard_cards/image/anim/slash/16.png similarity index 99% rename from image/anim/slash/16.png rename to packages/standard_cards/image/anim/slash/16.png index 96c5dd1f..96976af9 100644 Binary files a/image/anim/slash/16.png and b/packages/standard_cards/image/anim/slash/16.png differ diff --git a/image/anim/slash/17.png b/packages/standard_cards/image/anim/slash/17.png similarity index 99% rename from image/anim/slash/17.png rename to packages/standard_cards/image/anim/slash/17.png index 96c5dd1f..96976af9 100644 Binary files a/image/anim/slash/17.png and b/packages/standard_cards/image/anim/slash/17.png differ diff --git a/image/anim/slash/18.png b/packages/standard_cards/image/anim/slash/18.png similarity index 99% rename from image/anim/slash/18.png rename to packages/standard_cards/image/anim/slash/18.png index 96c5dd1f..96976af9 100644 Binary files a/image/anim/slash/18.png and b/packages/standard_cards/image/anim/slash/18.png differ diff --git a/image/anim/slash/19.png b/packages/standard_cards/image/anim/slash/19.png similarity index 99% rename from image/anim/slash/19.png rename to packages/standard_cards/image/anim/slash/19.png index 96c5dd1f..96976af9 100644 Binary files a/image/anim/slash/19.png and b/packages/standard_cards/image/anim/slash/19.png differ diff --git a/image/anim/slash/2.png b/packages/standard_cards/image/anim/slash/2.png similarity index 94% rename from image/anim/slash/2.png rename to packages/standard_cards/image/anim/slash/2.png index febb6239..57041bb2 100644 Binary files a/image/anim/slash/2.png and b/packages/standard_cards/image/anim/slash/2.png differ diff --git a/image/anim/slash/20.png b/packages/standard_cards/image/anim/slash/20.png similarity index 99% rename from image/anim/slash/20.png rename to packages/standard_cards/image/anim/slash/20.png index 96c5dd1f..96976af9 100644 Binary files a/image/anim/slash/20.png and b/packages/standard_cards/image/anim/slash/20.png differ diff --git a/image/anim/slash/21.png b/packages/standard_cards/image/anim/slash/21.png similarity index 99% rename from image/anim/slash/21.png rename to packages/standard_cards/image/anim/slash/21.png index 96c5dd1f..96976af9 100644 Binary files a/image/anim/slash/21.png and b/packages/standard_cards/image/anim/slash/21.png differ diff --git a/image/anim/slash/22.png b/packages/standard_cards/image/anim/slash/22.png similarity index 99% rename from image/anim/slash/22.png rename to packages/standard_cards/image/anim/slash/22.png index 854e1cb8..e888a89e 100644 Binary files a/image/anim/slash/22.png and b/packages/standard_cards/image/anim/slash/22.png differ diff --git a/image/anim/slash/23.png b/packages/standard_cards/image/anim/slash/23.png similarity index 99% rename from image/anim/slash/23.png rename to packages/standard_cards/image/anim/slash/23.png index 44877036..d7444507 100644 Binary files a/image/anim/slash/23.png and b/packages/standard_cards/image/anim/slash/23.png differ diff --git a/image/anim/slash/3.png b/packages/standard_cards/image/anim/slash/3.png similarity index 99% rename from image/anim/slash/3.png rename to packages/standard_cards/image/anim/slash/3.png index 2eadc2bd..23954153 100644 Binary files a/image/anim/slash/3.png and b/packages/standard_cards/image/anim/slash/3.png differ diff --git a/image/anim/slash/4.png b/packages/standard_cards/image/anim/slash/4.png similarity index 99% rename from image/anim/slash/4.png rename to packages/standard_cards/image/anim/slash/4.png index 07061a3e..0ee1b9b7 100644 Binary files a/image/anim/slash/4.png and b/packages/standard_cards/image/anim/slash/4.png differ diff --git a/image/anim/slash/5.png b/packages/standard_cards/image/anim/slash/5.png similarity index 99% rename from image/anim/slash/5.png rename to packages/standard_cards/image/anim/slash/5.png index d5eb272f..b3c92033 100644 Binary files a/image/anim/slash/5.png and b/packages/standard_cards/image/anim/slash/5.png differ diff --git a/image/anim/slash/6.png b/packages/standard_cards/image/anim/slash/6.png similarity index 99% rename from image/anim/slash/6.png rename to packages/standard_cards/image/anim/slash/6.png index 36c5f5e9..52bc1f75 100644 Binary files a/image/anim/slash/6.png and b/packages/standard_cards/image/anim/slash/6.png differ diff --git a/image/anim/slash/7.png b/packages/standard_cards/image/anim/slash/7.png similarity index 99% rename from image/anim/slash/7.png rename to packages/standard_cards/image/anim/slash/7.png index 7b62a0ba..258978b7 100644 Binary files a/image/anim/slash/7.png and b/packages/standard_cards/image/anim/slash/7.png differ diff --git a/image/anim/slash/8.png b/packages/standard_cards/image/anim/slash/8.png similarity index 99% rename from image/anim/slash/8.png rename to packages/standard_cards/image/anim/slash/8.png index b987346e..3dbe1092 100644 Binary files a/image/anim/slash/8.png and b/packages/standard_cards/image/anim/slash/8.png differ diff --git a/image/anim/slash/9.png b/packages/standard_cards/image/anim/slash/9.png similarity index 99% rename from image/anim/slash/9.png rename to packages/standard_cards/image/anim/slash/9.png index c3db9deb..2cda38f5 100644 Binary files a/image/anim/slash/9.png and b/packages/standard_cards/image/anim/slash/9.png differ diff --git a/packages/standard_cards/image/anim/spear/0.png b/packages/standard_cards/image/anim/spear/0.png new file mode 100644 index 00000000..4c2a7f1e Binary files /dev/null and b/packages/standard_cards/image/anim/spear/0.png differ diff --git a/packages/standard_cards/image/anim/spear/1.png b/packages/standard_cards/image/anim/spear/1.png new file mode 100644 index 00000000..7a83189f Binary files /dev/null and b/packages/standard_cards/image/anim/spear/1.png differ diff --git a/packages/standard_cards/image/anim/spear/10.png b/packages/standard_cards/image/anim/spear/10.png new file mode 100644 index 00000000..79135d74 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/10.png differ diff --git a/packages/standard_cards/image/anim/spear/11.png b/packages/standard_cards/image/anim/spear/11.png new file mode 100644 index 00000000..8633f3ce Binary files /dev/null and b/packages/standard_cards/image/anim/spear/11.png differ diff --git a/packages/standard_cards/image/anim/spear/12.png b/packages/standard_cards/image/anim/spear/12.png new file mode 100644 index 00000000..eebfed95 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/12.png differ diff --git a/packages/standard_cards/image/anim/spear/13.png b/packages/standard_cards/image/anim/spear/13.png new file mode 100644 index 00000000..c7bbee42 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/13.png differ diff --git a/packages/standard_cards/image/anim/spear/14.png b/packages/standard_cards/image/anim/spear/14.png new file mode 100644 index 00000000..d211c213 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/14.png differ diff --git a/packages/standard_cards/image/anim/spear/15.png b/packages/standard_cards/image/anim/spear/15.png new file mode 100644 index 00000000..e0ebde09 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/15.png differ diff --git a/packages/standard_cards/image/anim/spear/16.png b/packages/standard_cards/image/anim/spear/16.png new file mode 100644 index 00000000..5bf7fe00 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/16.png differ diff --git a/packages/standard_cards/image/anim/spear/17.png b/packages/standard_cards/image/anim/spear/17.png new file mode 100644 index 00000000..66b60236 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/17.png differ diff --git a/packages/standard_cards/image/anim/spear/18.png b/packages/standard_cards/image/anim/spear/18.png new file mode 100644 index 00000000..b7c40f5a Binary files /dev/null and b/packages/standard_cards/image/anim/spear/18.png differ diff --git a/packages/standard_cards/image/anim/spear/19.png b/packages/standard_cards/image/anim/spear/19.png new file mode 100644 index 00000000..52025c39 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/19.png differ diff --git a/packages/standard_cards/image/anim/spear/2.png b/packages/standard_cards/image/anim/spear/2.png new file mode 100644 index 00000000..46ffac5e Binary files /dev/null and b/packages/standard_cards/image/anim/spear/2.png differ diff --git a/packages/standard_cards/image/anim/spear/20.png b/packages/standard_cards/image/anim/spear/20.png new file mode 100644 index 00000000..7465aece Binary files /dev/null and b/packages/standard_cards/image/anim/spear/20.png differ diff --git a/packages/standard_cards/image/anim/spear/21.png b/packages/standard_cards/image/anim/spear/21.png new file mode 100644 index 00000000..7465aece Binary files /dev/null and b/packages/standard_cards/image/anim/spear/21.png differ diff --git a/packages/standard_cards/image/anim/spear/22.png b/packages/standard_cards/image/anim/spear/22.png new file mode 100644 index 00000000..13c5399f Binary files /dev/null and b/packages/standard_cards/image/anim/spear/22.png differ diff --git a/packages/standard_cards/image/anim/spear/23.png b/packages/standard_cards/image/anim/spear/23.png new file mode 100644 index 00000000..9ee7c402 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/23.png differ diff --git a/packages/standard_cards/image/anim/spear/24.png b/packages/standard_cards/image/anim/spear/24.png new file mode 100644 index 00000000..afc7b863 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/24.png differ diff --git a/packages/standard_cards/image/anim/spear/3.png b/packages/standard_cards/image/anim/spear/3.png new file mode 100644 index 00000000..0368c7b0 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/3.png differ diff --git a/packages/standard_cards/image/anim/spear/4.png b/packages/standard_cards/image/anim/spear/4.png new file mode 100644 index 00000000..4ea403e6 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/4.png differ diff --git a/packages/standard_cards/image/anim/spear/5.png b/packages/standard_cards/image/anim/spear/5.png new file mode 100644 index 00000000..a2b3c52c Binary files /dev/null and b/packages/standard_cards/image/anim/spear/5.png differ diff --git a/packages/standard_cards/image/anim/spear/6.png b/packages/standard_cards/image/anim/spear/6.png new file mode 100644 index 00000000..ef4f550c Binary files /dev/null and b/packages/standard_cards/image/anim/spear/6.png differ diff --git a/packages/standard_cards/image/anim/spear/7.png b/packages/standard_cards/image/anim/spear/7.png new file mode 100644 index 00000000..4a1394af Binary files /dev/null and b/packages/standard_cards/image/anim/spear/7.png differ diff --git a/packages/standard_cards/image/anim/spear/8.png b/packages/standard_cards/image/anim/spear/8.png new file mode 100644 index 00000000..6ba57d08 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/8.png differ diff --git a/packages/standard_cards/image/anim/spear/9.png b/packages/standard_cards/image/anim/spear/9.png new file mode 100644 index 00000000..6ba57d08 Binary files /dev/null and b/packages/standard_cards/image/anim/spear/9.png differ diff --git a/packages/standard_cards/init.lua b/packages/standard_cards/init.lua index f4751935..f8315d4a 100644 --- a/packages/standard_cards/init.lua +++ b/packages/standard_cards/init.lua @@ -26,8 +26,8 @@ local slashSkill = fk.CreateActiveSkill{ can_use = function(self, player) return player:usedCardTimes("slash", Player.HistoryPhase) < self:getMaxUseTime(Self, Player.HistoryPhase) end, - target_filter = function(self, to_select, selected) - if #selected < self:getMaxTargetNum(Self) then + target_filter = function(self, to_select, selected, _, card) + if #selected < self:getMaxTargetNum(Self, card) then local player = Fk:currentRoom():getPlayerById(to_select) return Self ~= player and Self:inMyAttackRange(player) end @@ -722,6 +722,20 @@ extension:addCards({ indulgence:clone(Card.Heart, 6), }) +local crossbowAudio = fk.CreateTriggerSkill{ + name = "#crossbowAudio", + refresh_events = {fk.CardUsing}, + can_refresh = function(self, event, target, player, data) + return target == player and player:hasSkill(self.name) and + data.card.name == "slash" and + player:usedCardTimes("slash") > 1 + end, + on_refresh = function(self, event, target, player, data) + local room = player.room + room:broadcastPlaySound("./packages/standard_cards/audio/card/crossbow") + room:setEmotion(player, "./packages/standard_cards/image/anim/crossbow") + end, +} local crossbowSkill = fk.CreateTargetModSkill{ name = "#crossbow_skill", attached_equip = "crossbow", @@ -732,6 +746,7 @@ local crossbowSkill = fk.CreateTargetModSkill{ end end, } +crossbowSkill:addRelatedSkill(crossbowAudio) Fk:addSkill(crossbowSkill) local crossbow = fk.CreateWeapon{ @@ -764,81 +779,223 @@ extension:addCards({ qingGang, }) +local iceSwordSkill = fk.CreateTriggerSkill{ + name = "#ice_sword_skill", + attached_equip = "ice_sword", + events = {fk.DamageCaused}, + can_trigger = function(self, event, target, player, data) + return target == player and player:hasSkill(self.name) and + data.card and data.card.name == "slash" and not data.to:isNude() + end, + on_use = function(self, event, target, player, data) + local room = player.room + local to = data.to + for i = 1, 2 do + if to:isNude() then break end + local card = room:askForCardChosen(player, to, "he", self.name) + room:throwCard(card, self.name, to, player) + end + return true + end +} +Fk:addSkill(iceSwordSkill) + local iceSword = fk.CreateWeapon{ name = "ice_sword", suit = Card.Spade, number = 2, attack_range = 2, + equip_skill = iceSwordSkill, } Fk:loadTranslationTable{ ["ice_sword"] = "寒冰剑", + ["#ice_sword_skill"] = "寒冰剑", } extension:addCards({ iceSword, }) +local doubleSwordsSkill = fk.CreateTriggerSkill{ + name = "#double_swords_skill", + attached_equip = "double_swords", + events = {fk.TargetSpecified}, + can_trigger = function(self, event, target, player, data) + return target == player and player:hasSkill(self.name) and + data.card and data.card.name == "slash" and + (player.room:getPlayerById(data.to).gender ~= player.gender) + end, + on_use = function(self, event, target, player, data) + local room = player.room + local to = player.room:getPlayerById(data.to) + local result = room:askForDiscard(to, 1, 1, false, self.name, true) + if #result == 0 then + player:drawCards(1, self.name) + end + end, +} +Fk:addSkill(doubleSwordsSkill) local doubleSwords = fk.CreateWeapon{ name = "double_swords", suit = Card.Spade, number = 2, attack_range = 2, + equip_skill = doubleSwordsSkill, } Fk:loadTranslationTable{ ["double_swords"] = "雌雄双股剑", + ["#double_swords_skill"] = "雌雄双股剑", } extension:addCards({ doubleSwords, }) +local bladeSkill = fk.CreateTriggerSkill{ + name = "#blade_skill", + attached_equip = "blade", + events = {fk.CardUseFinished}, + can_trigger = function(self, event, target, player, data) + if not player:hasSkill(self.name) then return end + local use = data ---@type CardUseStruct + if use.card.name == "jink" and use.toCard and use.toCard.name == "slash" then + local effect = use.responseToEvent + return effect.from == player.id + end + end, + on_cost = function(self, event, target, player, data) + local room = player.room + local use = room:askForUseCard(player, "slash", nil, "#blade_slash:" .. target.id, + true, { must_targets = {target.id} }) + if use then + self.cost_data = use + return true + end + end, + on_use = function(self, event, target, player, data) + player.room:useCard(self.cost_data) + end, +} +Fk:addSkill(bladeSkill) local blade = fk.CreateWeapon{ name = "blade", suit = Card.Spade, number = 5, attack_range = 3, + equip_skill = bladeSkill, } Fk:loadTranslationTable{ ["blade"] = "青龙偃月刀", + ["#blade_skill"] = "青龙偃月刀", + ["#blade_slash"] = "你可以发动“青龙偃月刀”对 %src 再使用一张杀", } extension:addCards({ blade, }) +local spearSkill = fk.CreateViewAsSkill{ + name = "spear_skill", + attached_equip = "spear", + pattern = "slash", + card_filter = function(self, to_select, selected) + if #selected == 2 then return false end + return ClientInstance:getCardArea(to_select) ~= Player.Equip + end, + view_as = function(self, cards) + if #cards ~= 2 then + return nil + end + local c = Fk:cloneCard("slash") + c:addSubcards(cards) + return c + end, +} +Fk:addSkill(spearSkill) local spear = fk.CreateWeapon{ name = "spear", suit = Card.Spade, number = 12, attack_range = 3, + equip_skill = spearSkill, } Fk:loadTranslationTable{ ["spear"] = "丈八蛇矛", + ["spear_skill"] = "丈八矛", } extension:addCards({ spear, }) +local axeSkill = fk.CreateTriggerSkill{ + name = "#axe_skill", + attached_equip = "axe", + events = {fk.CardEffecting}, + can_trigger = function(self, event, target, player, data) + if not player:hasSkill(self.name) then return end + local effect = data ---@type CardEffectEvent + return effect.card.name == "jink" and effect.responseToEvent and + effect.responseToEvent.from == player.id and + effect.toCard.name == "slash" + end, + on_cost = function(self, event, target, player, data) + local room = player.room + local ret = room:askForDiscard(player, 2, 2, true, self.name, true) + if #ret > 0 then return true end + end, + on_use = function() return true end, +} +Fk:addSkill(axeSkill) local axe = fk.CreateWeapon{ name = "axe", suit = Card.Diamond, number = 5, attack_range = 3, + equip_skill = axeSkill, } Fk:loadTranslationTable{ ["axe"] = "贯石斧", + ["#axe_skill"] = "贯石斧", } extension:addCards({ axe, }) +local halberdAudio = fk.CreateTriggerSkill{ + name = "#halberdAudio", + refresh_events = {fk.CardUsing}, + can_refresh = function(self, event, target, player, data) + return target == player and player:hasSkill(self.name) and + data.card.name == "slash" and #TargetGroup:getRealTargets(data.tos) > 1 + end, + on_refresh = function(self, event, target, player, data) + local room = player.room + room:broadcastPlaySound("./packages/standard_cards/audio/card/halberd") + room:setEmotion(player, "./packages/standard_cards/image/anim/halberd") + end, +} +local halberdSkill = fk.CreateTargetModSkill{ + name = "#halberd_skill", + attached_equip = "halberd", + extra_target_func = function(self, player, skill, card) + p(card.id) + if player:hasSkill(self.name) and skill.name == "slash_skill" + and #player:getCardIds(Player.Hand) == 1 + and player:getCardIds(Player.Hand)[1] == card.id then + return 2 + end + end, +} +halberdSkill:addRelatedSkill(halberdAudio) +Fk:addSkill(halberdSkill) local halberd = fk.CreateWeapon{ name = "halberd", suit = Card.Diamond, number = 12, attack_range = 4, + equip_skill = halberdSkill, } Fk:loadTranslationTable{ ["halberd"] = "方天画戟", @@ -848,14 +1005,50 @@ extension:addCards({ halberd, }) +local kylinBowSkill = fk.CreateTriggerSkill{ + name = "#kylin_bow_skill", + attached_equip = "kylin_bow", + events = {fk.DamageCaused}, + can_trigger = function(self, event, target, player, data) + local ret = target == player and player:hasSkill(self.name) and + data.card and data.card.name == "slash" + if ret then + ---@type ServerPlayer + local to = data.to + return to:getEquipment(Card.SubtypeDefensiveRide) or + to:getEquipment(Card.SubtypeOffensiveRide) + end + end, + on_use = function(self, event, target, player, data) + local room = player.room + local to = data.to + local ride_tab = {} + if to:getEquipment(Card.SubtypeDefensiveRide) then + table.insert(ride_tab, "+1") + end + if to:getEquipment(Card.SubtypeOffensiveRide) then + table.insert(ride_tab, "-1") + end + if #ride_tab == 0 then return end + local choice = room:askForChoice(player, ride_tab, self.name) + if choice == "+1" then + room:throwCard(to:getEquipment(Card.SubtypeDefensiveRide), self.name, to, player) + else + room:throwCard(to:getEquipment(Card.SubtypeOffensiveRide), self.name, to, player) + end + end +} +Fk:addSkill(kylinBowSkill) local kylinBow = fk.CreateWeapon{ name = "kylin_bow", suit = Card.Heart, number = 5, attack_range = 5, + equip_skill = kylinBowSkill, } Fk:loadTranslationTable{ ["kylin_bow"] = "麒麟弓", + ["#kylin_bow_skill"] = "麒麟弓", } extension:addCards({ @@ -876,10 +1069,24 @@ extension:addCards({ eightDiagram:clone(Card.Club, 2), }) +local niohShieldSkill = fk.CreateTriggerSkill{ + name = "#nioh_shield_skill", + attached_equip = "nioh_shield", + frequency = Skill.Compulsory, + events = {fk.PreCardEffect}, + can_trigger = function(self, event, target, player, data) + local effect = data ---@type CardEffectEvent + return player.id == effect.to and player:hasSkill(self.name) and + effect.card.name == "slash" and effect.card.color == Card.Black + end, + on_use = function() return true end, +} +Fk:addSkill(niohShieldSkill) local niohShield = fk.CreateArmor{ name = "nioh_shield", suit = Card.Club, number = 2, + equip_skill = niohShieldSkill, } Fk:loadTranslationTable{ ["nioh_shield"] = "仁王盾", diff --git a/packages/test/init.lua b/packages/test/init.lua index d72867de..316b4196 100644 --- a/packages/test/init.lua +++ b/packages/test/init.lua @@ -45,6 +45,7 @@ local cheat = fk.CreateActiveSkill{ toGain = allCardMapper[cardName][math.random(1, #allCardMapper[cardName])] end + from:addToPile(self.name, toGain, true, self.name) room:obtainCard(effect.from, toGain, true, fk.ReasonPrey) end } @@ -57,9 +58,22 @@ local test_filter = fk.CreateFilterSkill{ return Fk:cloneCard("crossbow", card.suit, card.number) end, } -local test2 = General(extension, "mouxusheng", "wu", 4) -test2:addSkill(test_filter) +local test_active = fk.CreateActiveSkill{ + name = "test_active", + can_use = function(self, player) + return true + end, + on_use = function(self, room, effect) + --room:doSuperLightBox("packages/test/qml/Test.qml") + local from = room:getPlayerById(effect.from) + local result = room:askForCustomDialog(from, "simayi", "packages/test/qml/TestDialog.qml", "Hello, world. FROM LUA") + print(result) + end, +} +local test2 = General(extension, "mouxusheng", "wu", 4, 4, General.Female) +test2:addSkill("rende") test2:addSkill(cheat) +test2:addSkill(test_active) Fk:loadTranslationTable{ ["test"] = "测试", diff --git a/packages/test/qml/Test.qml b/packages/test/qml/Test.qml new file mode 100644 index 00000000..741a84e2 --- /dev/null +++ b/packages/test/qml/Test.qml @@ -0,0 +1,21 @@ +import QtQuick + +Item { + Text { + id: txt + anchors.centerIn: parent + text: "Hello, world!" + font.pixelSize: 64 + } + + PropertyAnimation { + target: txt + property: "opacity" + to: 0.3 + duration: 2000 + running: true + onFinished: { + roomScene.bigAnim.source = ""; + } + } +} diff --git a/packages/test/qml/TestDialog.qml b/packages/test/qml/TestDialog.qml new file mode 100644 index 00000000..62586577 --- /dev/null +++ b/packages/test/qml/TestDialog.qml @@ -0,0 +1,38 @@ +import QtQuick +import "../../../qml/Pages/RoomElement" +import "../../../qml/Pages" + +GraphicsBox { + property string custom_string: "" + + id: root + title.text: Backend.translate("Test") + width: Math.max(140, body.width + 20) + height: body.height + title.height + 20 + + Column { + id: body + x: 10 + y: title.height + 5 + spacing: 10 + + Text { + text: root.custom_string + color: "#E4D5A0" + } + + MetroButton { + text: Backend.translate("OKOK") + anchors.horizontalCenter: parent.horizontalCenter + + onClicked: { + close(); + ClientInstance.replyToServer("", "Hello from test dialog"); + } + } + } + + function loadData(data) { + custom_string = data; + } +} diff --git a/packages/test/test.fkp b/packages/test/test.fkp index cef6df72..b1918166 100644 --- a/packages/test/test.fkp +++ b/packages/test/test.fkp @@ -3,7 +3,7 @@ $ '伤摸' "你造成伤害后可以摸5张牌。" 触发技 时机:造成伤害后 - 效果:你摸5张牌 + 效果:你摸5张牌 你对‘伤害目标’造成3点伤害 以上 $ '苦肉' “你可以失去一点体力摸3张牌” diff --git a/qml/Logic.js b/qml/Logic.js index 77ac58fd..ed7366c9 100644 --- a/qml/Logic.js +++ b/qml/Logic.js @@ -13,6 +13,7 @@ function createClientPages() { } var callbacks = {}; +let sheduled_download = ""; callbacks["NetworkDelayTest"] = function(jsonData) { // jsonData: RSA pub key @@ -36,8 +37,15 @@ callbacks["ErrorMsg"] = function(jsonData) { console.log("ERROR: " + jsonData); toast.show(qsTr(jsonData), 5000); mainWindow.busy = false; + if (sheduled_download !== "") { + mainWindow.busy = true; + Pacman.loadSummary(sheduled_download, true); + sheduled_download = ""; + } } +callbacks["UpdatePackage"] = (jsonData) => sheduled_download = jsonData; + callbacks["UpdateBusyText"] = function(jsonData) { mainWindow.busyText = jsonData; } diff --git a/qml/Pages/Init.qml b/qml/Pages/Init.qml index 0d3bb86e..010eb7c2 100644 --- a/qml/Pages/Init.qml +++ b/qml/Pages/Init.qml @@ -90,6 +90,10 @@ Item { } } + function downloadComplete() { + toast.show(qsTr("updated packages for md5")); + } + Component.onCompleted: { config.loadConf(); server_addr.model = Object.keys(config.savedPassword); diff --git a/qml/Pages/Lobby.qml b/qml/Pages/Lobby.qml index 9df7b645..7cd28f01 100644 --- a/qml/Pages/Lobby.qml +++ b/qml/Pages/Lobby.qml @@ -121,6 +121,7 @@ Item { onClicked: { lobby_dialog.source = "LobbyElement/CreateRoom.qml"; lobby_drawer.open(); + config.observing = false; } } TileButton { diff --git a/qml/Pages/Room.qml b/qml/Pages/Room.qml index a80be8c5..98d5fb26 100644 --- a/qml/Pages/Room.qml +++ b/qml/Pages/Room.qml @@ -18,6 +18,7 @@ Item { property bool isStarted: false property alias popupBox: popupBox + property alias bigAnim: bigAnim property alias promptText: prompt.text property alias okCancel: okCancel property alias okButton: okButton @@ -387,6 +388,12 @@ Item { } } + Loader { + id: bigAnim + anchors.fill: parent + z: 999 + } + function activateSkill(skill_name, pressed) { if (pressed) { dashboard.startPending(skill_name); diff --git a/qml/Pages/RoomElement/Photo.qml b/qml/Pages/RoomElement/Photo.qml index b4e6f8bd..d9a3b02b 100644 --- a/qml/Pages/RoomElement/Photo.qml +++ b/qml/Pages/RoomElement/Photo.qml @@ -32,7 +32,7 @@ Item { property alias equipArea: equipAreaItem property alias markArea: markAreaItem property alias delayedTrickArea: delayedTrickAreaItem - property alias specialArea: handcardAreaItem + property alias specialArea: specialAreaItem property alias progressBar: progressBar property alias progressTip: progressTip.text @@ -90,7 +90,7 @@ Item { PixmapAnimation { id: animPlaying - source: "playing" + source: SkinBank.PIXANIM_DIR + "playing" anchors.centerIn: parent loop: true scale: 1.1 @@ -99,7 +99,7 @@ Item { PixmapAnimation { id: animSelected - source: "selected" + source: SkinBank.PIXANIM_DIR + "selected" anchors.centerIn: parent loop: true scale: 1.1 @@ -204,6 +204,41 @@ Item { y: 139 } + Item { + id: specialAreaItem + + x: 31 + y: 139 + + InvisibleCardArea { + id: specialContainer + // checkExisting: true + } + + function updatePileInfo(areaName) { + let data = JSON.parse(Backend.callLuaFunction("GetPile", [root.playerid, areaName])); + if (data.length === 0) { + root.markArea.removeMark(areaName); + } else { + root.markArea.setMark(areaName, data.length); + } + } + + function add(inputs, areaName) { + updatePileInfo(areaName); + specialContainer.add(inputs); + } + + function remove(inputs, areaName) { + updatePileInfo(areaName); + return specialContainer.remove(inputs); + } + + function updateCardPosition(a) { + specialContainer.updateCardPosition(a); + } + } + MarkArea { id: markAreaItem @@ -256,9 +291,12 @@ Item { MouseArea { anchors.fill: parent - onClicked: { - if (parent.state != "candidate" || !parent.selectable) + propagateComposedEvents: true + onClicked: (mouse) => { + if (parent.state != "candidate" || !parent.selectable) { + mouse.accepted = false; return; + } parent.selected = !parent.selected; } } @@ -358,7 +396,7 @@ Item { PixmapAnimation { id: animSelectable - source: "selectable" + source: SkinBank.PIXANIM_DIR + "selectable" anchors.centerIn: parent loop: true visible: root.state === "candidate" && selectable diff --git a/qml/Pages/RoomElement/PhotoElement/MarkArea.qml b/qml/Pages/RoomElement/PhotoElement/MarkArea.qml index fb4809c2..e15a1c94 100644 --- a/qml/Pages/RoomElement/PhotoElement/MarkArea.qml +++ b/qml/Pages/RoomElement/PhotoElement/MarkArea.qml @@ -39,10 +39,21 @@ Item { textFormat: Text.RichText } - // TODO: for pile - // MouseArea { - // anchors.fill: parent - // } + MouseArea { + anchors.fill: parent + onClicked: { + let data = JSON.parse(Backend.callLuaFunction("GetPile", [root.parent.playerid, mark_name])); + data = data.filter((e) => e !== -1); + if (data.length === 0) + return; + + // Just for using room's right drawer + roomScene.startCheat("RoomElement/ViewPile.qml", { + name: mark_name, + ids: data + }); + } + } } } } diff --git a/qml/Pages/RoomElement/PixmapAnimation.qml b/qml/Pages/RoomElement/PixmapAnimation.qml index 672742cf..e1da7c8a 100644 --- a/qml/Pages/RoomElement/PixmapAnimation.qml +++ b/qml/Pages/RoomElement/PixmapAnimation.qml @@ -18,7 +18,7 @@ Item { width: childrenRect.width height: childrenRect.height - property string folder: SkinBank.PIXANIM_DIR + source + property string folder: source property int fileModel Repeater { @@ -26,7 +26,7 @@ Item { model: fileModel Image { - source: SkinBank.PIXANIM_DIR + root.source + "/" + index + source: root.source + "/" + index visible: false onStatusChanged: { if (status == Image.Ready) { diff --git a/qml/Pages/RoomElement/SkillArea.qml b/qml/Pages/RoomElement/SkillArea.qml index 21efb4e0..2da05d48 100644 --- a/qml/Pages/RoomElement/SkillArea.qml +++ b/qml/Pages/RoomElement/SkillArea.qml @@ -80,14 +80,14 @@ Flickable { function loseSkill(skill_name) { for (let i = 0; i < active_skills.count; i++) { - let item = active_skills.at(i); - if (item.skill == skill_name) { + let item = active_skills.get(i); + if (item.orig_skill == skill_name) { active_skills.remove(i); } } for (let i = 0; i < not_active_skills.count; i++) { let item = not_active_skills.at(i); - if (item.skill == skill_name) { + if (item.orig_skill == skill_name) { not_active_skills.remove(i); } } diff --git a/qml/Pages/RoomElement/SkillInvokeAnimation.qml b/qml/Pages/RoomElement/SkillInvokeAnimation.qml index af7a6c1b..d9ffd1c6 100644 --- a/qml/Pages/RoomElement/SkillInvokeAnimation.qml +++ b/qml/Pages/RoomElement/SkillInvokeAnimation.qml @@ -1,4 +1,5 @@ import QtQuick +import "../skin-bank.js" as SkinBank Item { id: root @@ -9,7 +10,7 @@ Item { PixmapAnimation { id: typeAnim anchors.centerIn: parent - source: "skillInvoke/" + skill_type + source: SkinBank.PIXANIM_DIR + "skillInvoke/" + skill_type keepAtStop: true } diff --git a/qml/Pages/RoomElement/ViewPile.qml b/qml/Pages/RoomElement/ViewPile.qml new file mode 100644 index 00000000..d32884ee --- /dev/null +++ b/qml/Pages/RoomElement/ViewPile.qml @@ -0,0 +1,14 @@ +import QtQuick + +Item { + id: root + anchors.fill: parent + property var extra_data: ({}) + signal finish() + + // TODO: complete this ...... + Text { + anchors.fill: parent + text: JSON.stringify(extra_data) + } +} diff --git a/qml/Pages/RoomLogic.js b/qml/Pages/RoomLogic.js index d5cee4fb..d4ff18a5 100644 --- a/qml/Pages/RoomLogic.js +++ b/qml/Pages/RoomLogic.js @@ -172,9 +172,9 @@ function moveCards(moves) { let to = getAreaItem(move.toArea, move.to); if (!from || !to || from === to) continue; - let items = from.remove(move.ids); + let items = from.remove(move.ids, move.fromSpecialName); if (items.length > 0) - to.add(items); + to.add(items, move.specialName); to.updateCardPosition(true); } } @@ -189,7 +189,15 @@ function setEmotion(id, emotion, isCardId) { } if (!Backend.exists(path)) { - return; + // Try absolute path again + if (OS === "Win") { + // Windows: file:///C:/xxx/xxxx + path = (AppPath + "/" + emotion).replace("file:///", ""); + } else { + path = (AppPath + "/" + emotion).replace("file://", ""); + } + if (!Backend.exists(path)) + return; } if (!Backend.isDir(path)) { // TODO: set picture emotion @@ -220,7 +228,7 @@ function setEmotion(id, emotion, isCardId) { } } - let animation = component.createObject(photo, {source: emotion}); + let animation = component.createObject(photo, {source: path}); animation.anchors.centerIn = photo; if (isCardId) { animation.started.connect(() => photo.busy = true); @@ -814,8 +822,15 @@ callbacks["Animate"] = function(jsonData) { break; case "LightBox": break; - case "SuperLightBox": + case "SuperLightBox": { + let path = data.path; + let jsonData = data.data; + roomScene.bigAnim.source = AppPath + "/" + path; + if (jsonData && jsonData !== "") { + roomScene.bigAnim.item.loadData(jsonData); + } break; + } case "InvokeSkill": { let id = data.player; let component = Qt.createComponent("RoomElement/SkillInvokeAnimation.qml"); @@ -852,6 +867,7 @@ callbacks["LogEvent"] = function(jsonData) { let item = getPhotoOrDashboard(data.to); setEmotion(data.to, "damage"); item.tremble(); + data.damageType = data.damageType || "normal_damage"; Backend.playSound("./audio/system/" + data.damageType + (data.damageNum > 1 ? "2" : "")); break; } @@ -893,3 +909,14 @@ callbacks["GameOver"] = function(jsonData) { box.winner = jsonData; roomScene.isStarted = false; } + +callbacks["CustomDialog"] = (j) => { + let data = JSON.parse(j); + let path = data.path; + let dat = data.data; + roomScene.state = "replying"; + roomScene.popupBox.source = AppPath + "/" + path; + if (dat) { + roomScene.popupBox.item.loadData(dat); + } +} diff --git a/src/core/packman.cpp b/src/core/packman.cpp index 2a933df1..442a0d94 100644 --- a/src/core/packman.cpp +++ b/src/core/packman.cpp @@ -2,6 +2,7 @@ #include "util.h" #include "qmlbackend.h" #include "git2.h" +#include PackMan *Pacman; @@ -17,70 +18,55 @@ PackMan::~PackMan() { git_libgit2_shutdown(); sqlite3_close(db); } -/* -void PackMan::readConfig() { - QFile f("packages/packages.txt"); - if (!f.exists()) - return; - if (!f.open(QIODevice::ReadOnly)) { - qFatal("cannot open packages.txt. Quit now."); - qApp->exit(1); - } - - while (true) { - auto data = f.readLine(); - if (data.isEmpty()) - break; - auto data_list = data.split(' '); - pack_list << data_list[0]; - pack_url_list << data_list[1]; - hash_list << data_list[2]; - enabled_list << data_list[3].toInt(); - } - f.close(); +QString PackMan::getPackSummary() { + return SelectFromDb(db, "SELECT name, url, hash FROM packages WHERE enabled = 1;"); } -void PackMan::writeConfig() { - QFile f("packages/packages.txt"); - if (!f.open(QIODevice::ReadWrite | QIODevice::Truncate)) { - qFatal("Cannot open packages.txt for write. Quitting."); - } - - for (int i = 0; i < pack_list.length(); i++) { - QStringList l; - l << pack_list[i]; - l << pack_url_list[i]; - l << hash_list[i]; - l << QString::number(enabled_list[i]); - f.write(l.join(" ").toUtf8() + '\n'); - } - f.close(); -} - -void PackMan::loadConfString(const QString &conf) { - auto lines = conf.split('\n'); - foreach (QString s, lines) { - auto data_list = s.split(' '); - int idx = pack_list.indexOf(data_list[0]); - if (idx == -1) { - pack_list << data_list[0]; - pack_url_list << data_list[1]; - hash_list << data_list[2]; - enabled_list << data_list[3].toInt(); - } else { - pack_url_list[idx] = data_list[1]; - hash_list[idx] = data_list[2]; - enabled_list[idx] = data_list[3].toInt(); +void PackMan::loadSummary(const QString &jsonData, bool useThread) { + auto f = [=](){ + // First, disable all packages + foreach (auto e, SelectFromDatabase(db, "SELECT name FROM packages;")) { + disablePack(e.toObject()["name"].toString()); } + + // Then read conf from string + auto doc = QJsonDocument::fromJson(jsonData.toUtf8()); + auto arr = doc.array(); + foreach (auto e, arr) { + auto obj = e.toObject(); + auto name = obj["name"].toString(); + if (SelectFromDatabase(db, QString("SELECT name FROM packages WHERE name='%1';") + .arg(name)).isEmpty()) { + downloadNewPack(obj["url"].toString()); + } + ExecSQL(db, QString("UPDATE packages SET hash='%1' WHERE name='%2'") + .arg(obj["hash"].toString()).arg(name)); + enablePack(name); + updatePack(name); + } + }; + if (useThread) { + auto thread = QThread::create(f); + thread->start(); + connect(thread, &QThread::finished, [=](){ + thread->deleteLater(); + Backend->emitNotifyUI("DownloadComplete", ""); + }); + } else { + f(); } } -*/ + void PackMan::downloadNewPack(const QString &url, bool useThread) { auto threadFunc = [=](){ int error = clone(url); if (error < 0) return; - QString fileName = QUrl(url).fileName(); + auto u = url; + while (u.endsWith('/')) { + u.chop(1); + } + QString fileName = QUrl(u).fileName(); if (fileName.endsWith(".git")) fileName.chop(4); @@ -120,6 +106,11 @@ void PackMan::updatePack(const QString &pack) { WHERE name = '%1';").arg(pack)); if (result.isEmpty()) return; int error; + error = status(pack); + if (error != 0) { + qCritical("Workspace is dirty, or some error occured."); + return; + } error = pull(pack); if (error < 0) return; error = checkout(pack, result[0].toObject()["hash"].toString()); @@ -130,6 +121,11 @@ void PackMan::upgradePack(const QString &pack) { int error; error = checkout_branch(pack, "master"); if (error < 0) return; + error = status(pack); + if (error != 0) { + qCritical("Workspace is dirty, or some error occured."); + return; + } error = pull(pack); if (error < 0) return; ExecSQL(db, QString("UPDATE packages SET hash = '%1' WHERE name = '%2';").arg(head(pack)).arg(pack)); @@ -183,18 +179,20 @@ static int transfer_progress_cb(const git_indexer_progress *stats, void *payload return 0; } -int PackMan::clone(const QString &url) { +int PackMan::clone(const QString &u) { git_repository *repo = NULL; - const char *u = url.toUtf8().constData(); + auto url = u; + while (url.endsWith('/')) { + url.chop(1); + } QString fileName = QUrl(url).fileName(); if (fileName.endsWith(".git")) fileName.chop(4); fileName = "packages/" + fileName; - const char *path = fileName.toUtf8().constData(); git_clone_options opt = GIT_CLONE_OPTIONS_INIT; opt.fetch_opts.callbacks.transfer_progress = transfer_progress_cb; - int error = git_clone(&repo, u, path, &opt); + int error = git_clone(&repo, url.toUtf8(), fileName.toUtf8(), &opt); if (error < 0) { GIT_FAIL; QDir(fileName).removeRecursively(); @@ -202,8 +200,6 @@ int PackMan::clone(const QString &url) { } else { if (Backend == nullptr) printf("\n"); - else - qWarning("Completed."); } git_repository_free(repo); return error; @@ -213,28 +209,43 @@ int PackMan::pull(const QString &name) { git_repository *repo = NULL; int error; git_remote *remote = NULL; - const char *path = QString("packages/%1").arg(name).toUtf8().constData(); + auto path = QString("packages/%1").arg(name).toUtf8(); git_fetch_options opt = GIT_FETCH_OPTIONS_INIT; opt.callbacks.transfer_progress = transfer_progress_cb; + git_checkout_options opt2 = GIT_CHECKOUT_OPTIONS_INIT; + opt2.checkout_strategy = GIT_CHECKOUT_FORCE; + error = git_repository_open(&repo, path); if (error < 0) { GIT_FAIL; goto clean; } + + // first git fetch origin error = git_remote_lookup(&remote, repo, "origin"); if (error < 0) { GIT_FAIL; goto clean; } - error = git_remote_fetch(remote, NULL, &opt, "pull"); + error = git_remote_fetch(remote, NULL, &opt, NULL); + if (error < 0) { + GIT_FAIL; + goto clean; + } + + // then git checkout FETCH_HEAD + error = git_repository_set_head(repo, "FETCH_HEAD"); + if (error < 0) { + GIT_FAIL; + goto clean; + } + error = git_checkout_head(repo, &opt2); if (error < 0) { GIT_FAIL; goto clean; } else { if (Backend == nullptr) printf("\n"); - else - qWarning("Completed."); } clean: @@ -245,11 +256,12 @@ clean: int PackMan::checkout(const QString &name, const QString &hash) { git_repository *repo = NULL; - git_oid oid = {0}; int error; - git_commit *commit = NULL; - const char *path = QString("packages/%1").arg(name).toUtf8().constData(); - const char *sha = hash.toLatin1().constData(); + git_oid oid = {0}; + git_checkout_options opt = GIT_CHECKOUT_OPTIONS_INIT; + opt.checkout_strategy = GIT_CHECKOUT_FORCE; + auto path = QString("packages/%1").arg(name).toUtf8(); + auto sha = hash.toLatin1(); error = git_repository_open(&repo, path); if (error < 0) { GIT_FAIL; @@ -260,19 +272,18 @@ int PackMan::checkout(const QString &name, const QString &hash) { GIT_FAIL; goto clean; } - error = git_commit_lookup(&commit, repo, &oid); + error = git_repository_set_head_detached(repo, &oid); if (error < 0) { GIT_FAIL; goto clean; } - error = git_checkout_tree(repo, (git_object *)commit, NULL); + error = git_checkout_head(repo, &opt); if (error < 0) { GIT_FAIL; goto clean; } clean: - git_commit_free(commit); git_repository_free(repo); return error; } @@ -282,13 +293,13 @@ int PackMan::checkout_branch(const QString &name, const QString &branch) { git_oid oid = {0}; int error; git_object *obj = NULL; - const char *path = QString("packages/%1").arg(name).toUtf8().constData(); + auto path = QString("packages/%1").arg(name).toUtf8(); error = git_repository_open(&repo, path); if (error < 0) { GIT_FAIL; goto clean; } - error = git_revparse_single(&obj, repo, branch.toUtf8().constData()); + error = git_revparse_single(&obj, repo, branch.toUtf8()); if (error < 0) { GIT_FAIL; goto clean; @@ -311,7 +322,7 @@ int PackMan::status(const QString &name) { git_status_list *status_list; size_t i, maxi; const git_status_entry *s; - const char *path = QString("packages/%1").arg(name).toUtf8().constData(); + auto path = QString("packages/%1").arg(name).toUtf8(); error = git_repository_open(&repo, path); if (error < 0) { GIT_FAIL; @@ -340,7 +351,7 @@ QString PackMan::head(const QString &name) { git_repository *repo = NULL; int error; git_object *obj = NULL; - const char *path = QString("packages/%1").arg(name).toUtf8().constData(); + auto path = QString("packages/%1").arg(name).toUtf8(); error = git_repository_open(&repo, path); if (error < 0) { GIT_FAIL; diff --git a/src/core/packman.h b/src/core/packman.h index 11d650ef..b85f8573 100644 --- a/src/core/packman.h +++ b/src/core/packman.h @@ -6,11 +6,9 @@ class PackMan : public QObject { public: PackMan(QObject *parent = nullptr); ~PackMan(); -/* - void readConfig(); - void writeConfig(); - void loadConfString(const QString &conf); -*/ + + QString getPackSummary(); + Q_INVOKABLE void loadSummary(const QString &, bool useThread = false); Q_INVOKABLE void downloadNewPack(const QString &url, bool useThread = false); Q_INVOKABLE void enablePack(const QString &pack); Q_INVOKABLE void disablePack(const QString &pack); diff --git a/src/core/util.cpp b/src/core/util.cpp index 6631c995..c87b6c9b 100644 --- a/src/core/util.cpp +++ b/src/core/util.cpp @@ -153,7 +153,14 @@ RSA *InitServerRSA() { #endif static void writeFileMD5(QFile &dest, const QString &fname) { - QFile f(fname); + QString name = fname; + // If the is a corresponding fkp file, check fkp's MD5 instead. + if (name.endsWith(".lua")) { + name.chop(4); + name = name + ".fkp"; + if (!QFile::exists(name)) name = fname; + } + QFile f(name); if (!f.open(QIODevice::ReadOnly)) { return; } @@ -161,7 +168,7 @@ static void writeFileMD5(QFile &dest, const QString &fname) { auto data = f.readAll(); data.replace(QByteArray("\r\n"), QByteArray("\n")); auto hash = QCryptographicHash::hash(data, QCryptographicHash::Md5).toHex(); - dest.write(fname.toUtf8() + '=' + hash + ';'); + dest.write(name.toUtf8() + '=' + hash + ';'); } static void writeDirMD5(QFile &dest, const QString &dir, const QString &filter) { @@ -183,11 +190,13 @@ QString calcFileMD5() { // First, generate flist.txt // flist.txt is a file contains all md5sum for code files QFile flist("flist.txt"); - if (!flist.open(QIODevice::ReadWrite | QIODevice::Truncate)) { + if (!flist.open(QIODevice::WriteOnly | QIODevice::Truncate)) { qFatal("Cannot open flist.txt. Quitting."); } writeDirMD5(flist, "packages", "*.lua"); + writeDirMD5(flist, "packages", "*.qml"); + writeDirMD5(flist, "packages", "*.js"); writeDirMD5(flist, "lua", "*.lua"); writeDirMD5(flist, "qml", "*.qml"); writeDirMD5(flist, "qml", "*.js"); diff --git a/src/main.cpp b/src/main.cpp index 63326195..45ea74ac 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,9 +84,9 @@ void fkMsgHandler(QtMsgType type, const QMessageLogContext &context, const QStri break; case QtWarningMsg: fprintf(stderr, "[%s/WARNING] %s\n", threadName.constData(), localMsg.constData()); - if (Backend != nullptr) { - Backend->notifyUI("ErrorDialog", localMsg); - } + // if (Backend != nullptr) { + // Backend->notifyUI("ErrorDialog", localMsg); + // } break; case QtCriticalMsg: fprintf(stderr, "[%s/CRITICAL] %s\n", threadName.constData(), localMsg.constData()); diff --git a/src/server/room.cpp b/src/server/room.cpp index 44ae986b..34868e39 100644 --- a/src/server/room.cpp +++ b/src/server/room.cpp @@ -203,17 +203,18 @@ void Room::removePlayer(ServerPlayer *player) } emit playerRemoved(player); + if (isLobby()) return; + QJsonArray jsonData; jsonData << player->getId(); doBroadcastNotify(getPlayers(), "RemovePlayer", JsonArray2Bytes(jsonData)); - - if (isLobby()) return; } else { // TODO: if the player is died.. // change the socket and state to runned player ClientSocket *socket = player->getSocket(); player->setState(Player::Run); + player->removeSocket(); // and then create a new ServerPlayer for the runner ServerPlayer *runner = new ServerPlayer(this); @@ -228,7 +229,6 @@ void Room::removePlayer(ServerPlayer *player) server->addPlayer(runner); emit playerRemoved(runner); - player->abortRequest(); } if (isAbandoned() && !m_abandoned) { @@ -266,20 +266,20 @@ void Room::addObserver(ServerPlayer *player) { return; } observers.append(player); + server->lobby()->removePlayer(player); player->setRoom(this); pushRequest(QString("%1,observe").arg(player->getId())); } void Room::removeObserver(ServerPlayer *player) { observers.removeOne(player); - player->setRoom(server->lobby()); + server->lobby()->addPlayer(player); if (player->getState() == Player::Online) { QJsonArray arr; arr << player->getId(); arr << player->getScreenName(); arr << player->getAvatar(); player->doNotify("Setup", JsonArray2Bytes(arr)); - player->doNotify("EnterLobby", ""); } pushRequest(QString("%1,leave").arg(player->getId())); } @@ -334,6 +334,7 @@ void Room::gameOver() p->deleteLater(); } } + observers.clear(); players.clear(); owner = nullptr; } diff --git a/src/server/server.cpp b/src/server/server.cpp index 84cdd7aa..48067ea7 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -6,6 +6,7 @@ #include "serverplayer.h" #include "util.h" #include "parser.h" +#include "packman.h" Server *ServerInstance; @@ -187,6 +188,13 @@ void Server::processRequest(const QByteArray& msg) body << "ErrorMsg"; body << "MD5 check failed!"; client->send(JsonArray2Bytes(body)); + + body.removeLast(); + body.removeLast(); + body << "UpdatePackage"; + body << Pacman->getPackSummary(); + client->send(JsonArray2Bytes(body)); + client->disconnectFromHost(); return; } diff --git a/src/server/serverplayer.cpp b/src/server/serverplayer.cpp index 7d7c4363..6e61334d 100644 --- a/src/server/serverplayer.cpp +++ b/src/server/serverplayer.cpp @@ -48,6 +48,12 @@ ClientSocket *ServerPlayer::getSocket() const return socket; } +void ServerPlayer::removeSocket() { + // this->socket will be used by other ServerPlayer instance + // so do not delete it here + this->socket = nullptr; +} + Server *ServerPlayer::getServer() const { return server; diff --git a/src/server/serverplayer.h b/src/server/serverplayer.h index 80432d6b..58b8d33c 100644 --- a/src/server/serverplayer.h +++ b/src/server/serverplayer.h @@ -15,6 +15,7 @@ public: ~ServerPlayer(); void setSocket(ClientSocket *socket); + void removeSocket(); // For the running players ClientSocket *getSocket() const; Server *getServer() const;