dsh-piggy 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +1348 -0
  2. package/LICENSE +32 -0
  3. package/README.md +322 -0
  4. package/THIRD-PARTY.md +31 -0
  5. package/assets/elder.svg +35 -0
  6. package/assets/pig-king-bathe.svg +38 -0
  7. package/assets/pig-king-eat.svg +45 -0
  8. package/assets/pig-king-pet.svg +45 -0
  9. package/assets/pig-king-play.svg +45 -0
  10. package/assets/pig-king-relaxed.svg +56 -0
  11. package/assets/pig-king-study.svg +45 -0
  12. package/assets/pig-king-trip.svg +45 -0
  13. package/assets/pig-king-work.svg +45 -0
  14. package/assets/pig-king.svg +56 -0
  15. package/assets/piglet.svg +30 -0
  16. package/client.js +3438 -0
  17. package/commands.js +252 -0
  18. package/cordis.patch.yml +15 -0
  19. package/core.js +11 -0
  20. package/data.js +10 -0
  21. package/index.js +68 -0
  22. package/package.json +72 -0
  23. package/packages/pet-core/package.json +21 -0
  24. package/packages/pet-core/src/core/activity.js +80 -0
  25. package/packages/pet-core/src/core/care.js +160 -0
  26. package/packages/pet-core/src/core/clock.js +122 -0
  27. package/packages/pet-core/src/core/constants.js +109 -0
  28. package/packages/pet-core/src/core/daily.js +204 -0
  29. package/packages/pet-core/src/core/diary.js +108 -0
  30. package/packages/pet-core/src/core/drops.js +82 -0
  31. package/packages/pet-core/src/core/effects.js +84 -0
  32. package/packages/pet-core/src/core/egg.js +120 -0
  33. package/packages/pet-core/src/core/evolution.js +90 -0
  34. package/packages/pet-core/src/core/growth.js +110 -0
  35. package/packages/pet-core/src/core/illness.js +235 -0
  36. package/packages/pet-core/src/core/interests.js +55 -0
  37. package/packages/pet-core/src/core/inventory.js +177 -0
  38. package/packages/pet-core/src/core/lines.js +157 -0
  39. package/packages/pet-core/src/core/migrate.js +226 -0
  40. package/packages/pet-core/src/core/profile.js +102 -0
  41. package/packages/pet-core/src/core/random.js +79 -0
  42. package/packages/pet-core/src/core/school.js +81 -0
  43. package/packages/pet-core/src/core/settlement.js +308 -0
  44. package/packages/pet-core/src/core/state.js +210 -0
  45. package/packages/pet-core/src/core/travel.js +58 -0
  46. package/packages/pet-core/src/core/upgrades.js +193 -0
  47. package/packages/pet-core/src/core/views.js +55 -0
  48. package/packages/pet-core/src/core/work.js +50 -0
  49. package/packages/pet-core/src/core.js +95 -0
  50. package/packages/pet-core/src/data/daily.js +121 -0
  51. package/packages/pet-core/src/data/drops.js +34 -0
  52. package/packages/pet-core/src/data/evolution.js +41 -0
  53. package/packages/pet-core/src/data/growth.js +72 -0
  54. package/packages/pet-core/src/data/illness.js +188 -0
  55. package/packages/pet-core/src/data/interests.js +39 -0
  56. package/packages/pet-core/src/data/jobs.js +150 -0
  57. package/packages/pet-core/src/data/life.js +88 -0
  58. package/packages/pet-core/src/data/lines.js +198 -0
  59. package/packages/pet-core/src/data/minutes.js +23 -0
  60. package/packages/pet-core/src/data/profile.js +60 -0
  61. package/packages/pet-core/src/data/school.js +99 -0
  62. package/packages/pet-core/src/data/shop.js +142 -0
  63. package/packages/pet-core/src/data/traits.js +42 -0
  64. package/packages/pet-core/src/data/travel.js +87 -0
  65. package/packages/pet-core/src/data.js +52 -0
  66. package/packages/pet-core/src/index.js +12 -0
  67. package/render.js +357 -0
  68. package/routes.js +201 -0
  69. package/scripts/build-client.mjs +100 -0
  70. package/scripts/typecheck.mjs +122 -0
  71. package/snapshot.js +368 -0
  72. package/src/client/art.js +29 -0
  73. package/src/client/constants.js +88 -0
  74. package/src/client/css-base.js +225 -0
  75. package/src/client/css-card.js +63 -0
  76. package/src/client/css-tabs.js +250 -0
  77. package/src/client/css-tiles.js +89 -0
  78. package/src/client/dom.js +33 -0
  79. package/src/client/effects.js +159 -0
  80. package/src/client/format.js +27 -0
  81. package/src/client/index.js +393 -0
  82. package/src/client/io.js +100 -0
  83. package/src/client/layout.js +103 -0
  84. package/src/client/normalize.js +352 -0
  85. package/src/client/panel.js +319 -0
  86. package/src/client/scene.js +113 -0
  87. package/src/client/storage.js +19 -0
  88. package/src/client/styles.js +13 -0
  89. package/src/client/tabs/bag.js +203 -0
  90. package/src/client/tabs/card.js +110 -0
  91. package/src/client/tabs/crown.js +59 -0
  92. package/src/client/tabs/dev.js +101 -0
  93. package/src/client/tabs/home.js +72 -0
  94. package/src/client/tabs/shop.js +78 -0
  95. package/src/client/tabs/status.js +223 -0
  96. package/src/client/tabs/study.js +128 -0
  97. package/src/client/tabs/travel.js +89 -0
  98. package/src/client/tabs/update.js +164 -0
  99. package/src/client/tabs/work.js +106 -0
  100. package/src/client/values.js +11 -0
  101. package/src/client/widgets.js +126 -0
  102. package/store/api.js +260 -0
  103. package/store/state-file.js +129 -0
  104. package/store.js +96 -0
package/LICENSE ADDED
@@ -0,0 +1,32 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-pig contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ ---
24
+
25
+ The game mechanics implemented here (attribute thresholds, the three illness
26
+ chains, the nine school subjects, job and item ideas) were derived from a
27
+ reverse-engineering effort of QQ 宠物 (怀旧服 v1.2.4) published at
28
+ https://github.com/xuemian168/qqpet_automation. Only numeric values, subject
29
+ and illness *names* were reused; no original code or artwork is included in
30
+ this package. The two sprite SVGs under assets/ are original vector redraws
31
+ supplied by the project author. QQ 宠物 is a trademark of Tencent; this project
32
+ is independent and unaffiliated, and is not authorised by Tencent.
package/README.md ADDED
@@ -0,0 +1,322 @@
1
+ <p align="center">
2
+ <img src="assets/piglet.svg" width="128" alt="dsh-piggy 的小猪">
3
+ </p>
4
+
5
+ <h1 align="center">dsh-piggy</h1>
6
+
7
+ <p align="center">一只住在 <a href="https://github.com/deepseek-ai/deepseek-harness">DeepSeek Harness</a> 里的猪 —— 吃你的真实工作长大,QQ 宠物式的养成。</p>
8
+
9
+ 它会长大、上学、打工、旅行、生病、闹脾气,也会跟你搭话。
10
+ 玩法照着经典的 QQ 宠物复刻,界面照着动森([animal-island-ui](https://github.com/guokaigdg/animal-island-ui))的风格做。
11
+
12
+ - **点就能玩** —— 九宫格主屏,每个功能是一个 App,不用敲命令
13
+ - **零 token** —— 不注册模型工具、不注入上下文,模型不知道它存在
14
+ - **零运行时 npm 依赖** —— 纯 JS;游戏规则在独立的共享库 `@dsh-piggy/core` 里,以后的独立版也用同一套
15
+
16
+ <p align="center">
17
+ <img src="docs/screenshots/readme-home.png" width="260" alt="主屏">
18
+ <img src="docs/screenshots/readme-card.png" width="260" alt="居民卡">
19
+ </p>
20
+
21
+ ---
22
+
23
+ ## 安装
24
+
25
+ ```sh
26
+ dsh plugin --profile web add /path/to/dsh-piggy
27
+ ```
28
+
29
+ 装完**重启 dsh**(宿主半边在启动时注册命令与路由),然后刷新页面。
30
+
31
+ ## 怎么玩
32
+
33
+ 平时是一只透明背景的小猪,浮在右下角,可以拖到任何地方。
34
+
35
+ | 操作 | 结果 |
36
+ |---|---|
37
+ | **右键猪** | 打开 / 收起面板 |
38
+ | **左键猪** | 摸摸它 |
39
+ | 拖动 | 换个地方待着(会记住) |
40
+
41
+ 一开始是个纸盒,拆开才有猪。打开面板就是**主屏**:顶上是名字、等级、金币,
42
+ 下面一格格 App,有事的格子左上角会挂个小标签(病了 → 商店,有课能上 → 学习……)。
43
+
44
+ | App | 里面有什么 |
45
+ |---|---|
46
+ | 📋 **状态** | 饱食 / 心情 / 清洁 / 健康四条、智力 / 魅力 / 武力三维、喂食洗澡玩耍摸摸。出门、生病、去世的横幅也只在这里 |
47
+ | 🪪 **居民卡** | 头像、生日星座、性格、口头禅、签名、收藏数。口头禅和签名可以改,猪说话时偶尔带上口头禅 |
48
+ | 👑 **加冕** | 长成后的形态(先有猪猪王,以后还会加):条件逐条打勾,齐了就能加冕 |
49
+ | 📚 **学习** | 小学 / 中学 / 大学 / 研究生,9 门课;另有兴趣班,上满 5 次拿证书 |
50
+ | 💼 **打工** | 按武力 / 魅力 / 智力分三类,几十种工作,要够等级、课时、证书才能干;点开看缺什么 |
51
+ | 🛒 **商店** | 食物、洗浴、玩具、药品、装扮、复活 —— 先选大类,再选商品 |
52
+ | 🧳 **旅行** | 郊游到出国,每趟带回一件纪念品 |
53
+ | 🎒 **背包** | 买来的东西、纪念品、日记 |
54
+
55
+ 所有 App 都是**先点大方块、再点小方块**,左上角「‹」一层层退回主屏。
56
+
57
+ <p align="center">
58
+ <img src="docs/screenshots/readme-status.png" width="200" alt="状态">
59
+ <img src="docs/screenshots/readme-study.png" width="200" alt="学习">
60
+ <img src="docs/screenshots/readme-work.png" width="200" alt="打工详情">
61
+ <img src="docs/screenshots/readme-crown.png" width="200" alt="加冕">
62
+ <img src="docs/screenshots/readme-shop.png" width="200" alt="商店">
63
+ </p>
64
+
65
+ ## 桌面版(开发中)
66
+
67
+ 不装 DSH 也能养:[`apps/desktop/`](apps/desktop/) 是一个 Electron 小程序,双击就有一只猪趴在屏幕右下角,
68
+ 玩法、界面和 DSH 里完全一样(用的是同一份代码)。
69
+
70
+ - 窗口铺满屏幕但只有猪、面板、气泡那几块接收点击,其余地方照常点桌面
71
+ - 存档和 DSH 里那只各养各的;托盘菜单「从 DSH 导入猪…」可以把那只接过来
72
+ - 托盘菜单还有:藏起来 / 开机自启 / 退出
73
+ - 桌面版没有「吃你的真实工作」,只靠时间慢慢长
74
+
75
+ ```sh
76
+ cd apps/desktop
77
+ npm install
78
+ npm start # 直接跑
79
+ npm run dist:linux # 打 AppImage(dist/)
80
+ npm run dist:win # 打 Windows 安装包
81
+ ```
82
+
83
+ Linux 上默认走 XWayland(Wayland 不让窗口给自己裁形状)。
84
+
85
+ **更新**:桌面版主屏多一个 🔄 更新 App ——
86
+
87
+ - 「更新到最新」一键换到 GitHub 上最新的版本;也可以在版本列表里挑一个换过去
88
+ - 换完猪重启一下(约 1 秒)就好;换之前自动备份存档,还能「回到上一个版本」
89
+ - 换的只是游戏本身(几百 KB 的游戏包,下载后校验 sha256),不用重装
90
+ - 太旧、读不了现在存档的版本是灰的;要更新安装包本身的版本会带你去下载页
91
+
92
+ <p align="center"><img src="docs/screenshots/desktop-update.png" width="300" alt="桌面版更新"></p>
93
+
94
+ **发版**:把根目录 `package.json` 的 version 改好,推一个同名标签(如 `v0.25.0`),
95
+ GitHub Actions([`.github/workflows/release.yml`](.github/workflows/release.yml))会跑测试、
96
+ 生成游戏包、打 Linux AppImage 和 Windows 安装包,一起挂到 Release 上。
97
+
98
+ ## 养成规则
99
+
100
+ > 具体数值以 [`packages/pet-core/src/data/`](packages/pet-core/src/data/) 与 [CHANGELOG](CHANGELOG.md) 为准,这里只讲规则。
101
+
102
+ - **成长**:吃你的真实工作长大(每天有上限,06:00 换天)。照顾得好长得快。
103
+ 等级封顶 60,Lv10 长成青年、Lv40 长成成年;没有老死,大约半年养到满级。
104
+ - **加冕**:长成后本事和阅历攒够了,可以在主屏的 👑 加冕 App 里加冕成猪猪王,换一身样子(不加收益,也可以不加冕)。以后会有更多形态。
105
+ - **照顾**:喂食、洗澡、玩耍都要花背包里的道具,点按钮会弹出背包让你挑;摸摸免费。
106
+ - **生病**:长期饿着、脏着会有几率生病。5 条病链,每条一期比一期重,
107
+ 得吃**对症**的药;吃错会加重。实在不会治可以花钱看医生。健康归零就走了。
108
+ - **死了**:用还魂丹救回来,等级、金币、收藏都在;或者领养一只新的。
109
+ - **外出**:打工、上课、旅行时猪不在家,照样消耗;随时能叫回来。
110
+ 回来时可能顺手带点东西。
111
+ - **日常**:每天签到,在线每小时一个礼物,日记记着它这些天干了什么。
112
+ - **说话**:猪会主动搭话、回应你的照顾,可以点选项回它。嫌吵就开免打扰;
113
+ 也可以让它换个称呼叫你。
114
+
115
+ **所有结算都按时间戳补算**,没有常驻定时器:关掉 DSH 期间猪照样在饿、
116
+ 工照样会打完,重开时一次结清并弹公告。随机事件用存档里的种子,重开不会刷出不同结果。
117
+
118
+ ## 存档
119
+
120
+ `$DSH_HOME/dsh-piggy/state.json` —— 原子写(临时文件 → fsync → rename)+ 节流。
121
+ 老版本存在 `$DSH_HOME/dsh-pig/` 的存档,第一次启动时会自动搬过来(旧目录改名保留,不删)。
122
+ 存档格式升级时逐级迁移,**升级前自动备份**为 `state.json.v<旧版本>-backup-<时间>`。
123
+
124
+ ## 配置
125
+
126
+ ```yaml
127
+ - id: dsh-piggy
128
+ name: dsh-piggy
129
+ config:
130
+ command: pig # 改斜杠命令名
131
+ statePath: /abs/path/to/state.json # 改存档位置
132
+ ```
133
+
134
+ ## 命令(不想点鼠标时才用)
135
+
136
+ ```
137
+ /pig 状态卡
138
+ /pig hatch | adopt 拆纸盒 / 领养新猪
139
+ /pig feed | bathe | play | pet 照顾
140
+ /pig study <科目> /pig interest <兴趣班> /pig work <工作> /pig trip <目的地>
141
+ /pig calloff 叫回来
142
+ /pig shop | buy <物品> | use <物品> | sell <纪念品> | wear <装扮>
143
+ /pig reply <序号> 回它的话
144
+ /pig weigh | name <名字> | about
145
+ ```
146
+
147
+ ## HTTP 接口
148
+
149
+ ```
150
+ GET /dsh-piggy/state 完整快照
151
+ POST /dsh-piggy/act 执行操作(操作表见 routes.js 的 OPERATIONS,命令与面板共用)
152
+ ```
153
+
154
+ 请求体上限 2 KB,状态响应**不含任务标题**。
155
+
156
+ > ⚠️ 插件通过 `ctx.webServer.register()` 注册的路由**不走主应用的鉴权围栏**
157
+ > (DSH 既有行为,其它插件同样如此)。服务只绑 `127.0.0.1`。
158
+
159
+ ## 视觉
160
+
161
+ 配色、圆角、边框、阴影照
162
+ [guokaigdg/animal-island-ui](https://github.com/guokaigdg/animal-island-ui) 的 design-system 实现:
163
+ 奶油羊皮纸底、暖棕文字和边框、薄荷青主按钮带 3D 底边、彩色圆角方块、点点纹理的居民卡。
164
+ token 声明在组件根节点而**不是 `:root`**,不污染宿主页面。
165
+
166
+ 数值与命名参考了两份公开资料 ——
167
+ [xuemian168/qqpet_automation](https://github.com/xuemian168/qqpet_automation)(逆向分析)
168
+ 与 [ice-cream-headache.github.io](https://github.com/ice-cream-headache/ice-cream-headache.github.io)(界面截图)。
169
+ **没有使用任何原版代码或美术资源**,详见 [THIRD-PARTY.md](THIRD-PARTY.md)。
170
+
171
+ ## 项目结构
172
+
173
+ ```text
174
+ dsh-piggy/
175
+ ├── package.json 插件清单与 build / typecheck / test 脚本
176
+ ├── cordis.patch.yml profile 配置层
177
+ ├── core.js / data.js 根目录再导出入口,兼容既有导入
178
+ ├── packages/pet-core/ 共享领域库 @dsh-piggy/core,纯 JavaScript、无 IO
179
+ │ └── src/ core/ 领域规则与 data/ 静态游戏表
180
+ ├── store.js / store/ 存档读写、原子写与节流
181
+ ├── index.js 宿主组装入口
182
+ ├── snapshot.js 面板快照
183
+ ├── commands.js /pig 命令
184
+ ├── routes.js HTTP 路由
185
+ ├── render.js 文案与 ASCII 立绘
186
+ ├── src/client/ 客户端源码:场景、交互、样式与 tabs/*
187
+ ├── client.js 生成的单文件客户端产物,随仓库提交
188
+ ├── scripts/
189
+ │ ├── build-client.mjs esbuild 打包入口
190
+ │ └── typecheck.mjs JavaScript 类型检查入口
191
+ ├── test/ 游戏逻辑、宿主、客户端、存档、构建与规范检查
192
+ ├── tools/ preview.html / art.html 等浏览器预览台
193
+ ├── assets/ SVG 立绘
194
+ ├── docs/ 设计、编码规范、美术需求与开发记录
195
+ ├── CHANGELOG.md 版本变更历史
196
+ ├── THIRD-PARTY.md 第三方致谢与许可
197
+ └── LICENSE MIT
198
+ ```
199
+
200
+ ## 从源码开发
201
+
202
+ 需要 **Node.js ≥20**(自带 npm)、Git 和浏览器。运行已提交的插件产物无需开发工具;
203
+ **构建源码和运行完整检查**需要 esbuild、TypeScript 与 Node 类型定义。
204
+ 仓库的 `package.json` 当前没有声明这些开发依赖,单独克隆时先在本地安装:
205
+
206
+ ```sh
207
+ git -c core.autocrlf=false clone https://github.com/CLICGGER-TYPES/dsh-piggy.git
208
+ cd dsh-piggy
209
+ npm install --no-save --package-lock=false esbuild@0.28.2 typescript@5.9.3 @types/node@20.19.43
210
+ npm run build
211
+ npm run typecheck
212
+ node --test
213
+ ```
214
+
215
+ 准备贡献时,先 Fork,再把 clone 的地址换成自己的 Fork。
216
+ `core.autocrlf=false` 让此次克隆保留仓库的 LF 换行;构建产物守卫逐字节比较
217
+ `client.js`,Windows 自动转换成 CRLF 会影响这个检查。
218
+ `--no-save --package-lock=false` 只安装本地工具,不修改依赖清单、不生成锁文件;
219
+ `node_modules/` 已被 Git 忽略。安装 esbuild 时 npm 会运行它的安装脚本,以准备当前平台的构建工具。
220
+
221
+ 上面的版本组合已经验证可构建和检查。这里固定 TypeScript 5.9.3:
222
+ 当前检查脚本没有显式指定 `strict`,而 [TypeScript 6.0 起默认启用 strict](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html#strict-is-now-true-by-default),
223
+ 直接安装新版会产生额外类型错误。升级检查工具应另行验证。
224
+
225
+ - **客户端**:修改 `src/client/`,运行 `npm run build`,提交生成的 `client.js`。
226
+ 不要直接编辑 `client.js`;DSH 加载它,`test/bundle.test.js` 检查它与源码一致。
227
+ - **游戏逻辑与数据**:修改 `packages/pet-core/src/core/` 或 `packages/pet-core/src/data/`;
228
+ 存档相关代码在 `store/`,新增存档结构还需在共享库 `core/upgrades.js` 追加迁移。
229
+ 领域层保持无 IO,时间必须由参数传入。
230
+ - **提交前**:运行 `npm run typecheck` 和 `node --test`。
231
+ UI 改动还要在真实浏览器中确认;约定见 [docs/CONVENTIONS.md](docs/CONVENTIONS.md)。
232
+
233
+ 提示 `esbuild not found` 或 `no tsc found` 时,确认已在仓库根目录执行工具安装命令。
234
+ 也可通过 `DSH_PIG_ESBUILD`、`DSH_PIG_TSC`、`DSH_PIG_TYPES` 指向已有工具;
235
+ 具体解析规则见 `scripts/`。
236
+
237
+ ## 看界面(不用连宿主)
238
+
239
+ 直接用浏览器打开 `tools/preview.html` 即可;仓库已包含 `client.js`,
240
+ 只看现有界面无需安装开发工具。修改客户端源码后,先重新构建再刷新预览页。
241
+
242
+ Linux:
243
+
244
+ ```sh
245
+ xdg-open tools/preview.html
246
+ ```
247
+
248
+ Windows 的操作见下一节。预览台伪造 `window.__ModuleLoader__` 和 `fetch`,
249
+ 不启动 DSH 就能看到主屏和各个 App。它使用示例快照:
250
+ **预览中的操作不会验证真实宿主的金币扣除、活动结算或存档读写**。
251
+
252
+ 浏览器开发者工具的 Console 中可以使用:
253
+
254
+ ```js
255
+ window.pigStub.setOpen(true) // 展开;false 收起
256
+ window.pigStub.tab('study') // 打开学习 App
257
+ window.pigStub.state() // 查看当前布局
258
+ window.dshPigDev.on() // 开启开发者面板;off() 关闭
259
+ ```
260
+
261
+ `tools/art.html` 可查看立绘,`tools/stages.html` 可查看生命周期形态示意。
262
+ 这些预览页使用示例数据,当前阶段与数值以 `packages/pet-core/src/data/` 和实际宿主快照为准。
263
+
264
+ > 假 DOM 没有 CSS 引擎。曾经出现过 JS 正确设置 `hidden = true`、测试通过,
265
+ > 浏览器却仍显示被隐藏元素的情况。**断言标志位证明不了元素不可见**,要在真实浏览器确认。
266
+
267
+ ## Windows 入门(PowerShell)
268
+
269
+ 先安装 Git 与 Node.js ≥20,重新打开 PowerShell,在希望保存项目的目录执行:
270
+
271
+ ```powershell
272
+ git --version
273
+ node --version
274
+ npm.cmd --version
275
+ git -c core.autocrlf=false clone https://github.com/CLICGGER-TYPES/dsh-piggy.git
276
+ Set-Location .\dsh-piggy
277
+ ```
278
+
279
+ `npm.cmd` 调用 npm 的 Windows 命令入口,避免 PowerShell 把 `npm` 解析成
280
+ `npm.ps1` 后因执行策略被拒绝;无需修改系统执行策略。
281
+ 如果已按上一节克隆,进入那个目录即可,不用重复 clone。
282
+
283
+ 只看界面,用默认浏览器打开:
284
+
285
+ ```powershell
286
+ Start-Process -FilePath (Resolve-Path .\tools\preview.html).Path
287
+ Start-Process -FilePath (Resolve-Path .\tools\art.html).Path
288
+ ```
289
+
290
+ 准备改源码时,在仓库根目录安装开发工具并检查:
291
+
292
+ ```powershell
293
+ npm.cmd install --no-save --package-lock=false esbuild@0.28.2 typescript@5.9.3 @types/node@20.19.43
294
+ npm.cmd run build
295
+ npm.cmd run typecheck
296
+ node --test
297
+ ```
298
+
299
+ 如果已安装 DSH CLI,且 `dsh` 在 PATH 中,可把本地仓库加入 **web profile**:
300
+
301
+ ```powershell
302
+ dsh plugin --profile web add (Resolve-Path .).Path
303
+ ```
304
+
305
+ 安装后重启对应的 DSH 宿主,再刷新页面。**web 与 desktop 是不同 profile**;
306
+ 这里的命令只针对 web,不代表 DSH Desktop 的安装步骤。
307
+ 源码改完、构建完成后也要重启真实宿主,才能重新组装客户端 bundle;
308
+ 开发者面板可以查看宿主快照中的构建版本。
309
+
310
+ ## 文档
311
+
312
+ - [CHANGELOG.md](CHANGELOG.md) —— 版本变更历史
313
+ - [docs/CONVENTIONS.md](docs/CONVENTIONS.md) —— 编码、验证与提交规范
314
+ - [docs/REFACTOR-PLAN.md](docs/REFACTOR-PLAN.md) —— 源码分层与构建说明
315
+ - [docs/DESIGN.md](docs/DESIGN.md) —— 为什么是这样:参考调研、数值映射、架构决策
316
+ - [docs/PROCESS.md](docs/PROCESS.md) —— 怎么变成这样:每一轮反馈、每个 bug、每条验证证据
317
+
318
+ ## 许可
319
+
320
+ MIT。数值与部分名称参考自公开的逆向资料,**未包含任何原版代码或美术资源**;
321
+ 立绘是作者提供的原创矢量图。QQ 宠物是腾讯的商标,本插件与其无任何关联、
322
+ 亦未获其授权。第三方致谢与许可见 [THIRD-PARTY.md](THIRD-PARTY.md)。
package/THIRD-PARTY.md ADDED
@@ -0,0 +1,31 @@
1
+ # 第三方致谢与许可
2
+
3
+ 本插件(`dsh-piggy`)的代码与美术以 MIT 发布。下面列出它参考、依赖或提及的第三方内容。
4
+ **没有复制任何第三方代码、文档或游戏原版素材** —— 用到的数值与名称属于事实性数据。
5
+
6
+ ## 设计参考资料
7
+
8
+ | 项目 | 许可 | 本插件用到了什么 |
9
+ |---|---|---|
10
+ | [xuemian168/qqpet_automation](https://github.com/xuemian168/qqpet_automation) | MIT(其原创部分) | 只参考**数值与名称**:属性阈值、三条疾病链的名称与分期、九门科目名、部分物品名。其源代码、数据文件结构与本项目不同,未复制 |
11
+ | [ice-cream-headache/ice-cream-headache.github.io](https://github.com/ice-cream-headache/ice-cream-headache.github.io) | MIT | 只参考**界面截图**(宠物在上、奶油色图标栏在下、带标签的属性条)。截图未随本包分发 |
12
+ | [guokaigdg/animal-island-ui](https://github.com/guokaigdg/animal-island-ui) | MIT | 只参考**设计 token**:颜色、圆角、缓动曲线。按其 `docs/design-system/css-variables.md` 的取值重写为纯 CSS |
13
+
14
+ ## 运行时依赖
15
+
16
+ | 内容 | 许可 | 说明 |
17
+ |---|---|---|
18
+ | Nunito / Noto Sans SC | SIL OFL 1.1 | 客户端在浏览器里按需从 Google Fonts 加载;加载失败自动退回系统字体。**字体文件不随本包分发** |
19
+
20
+ ## 美术
21
+
22
+ - `assets/piglet.svg`、`assets/elder.svg`:**原创矢量重绘**,由项目作者提供。
23
+ 造型取自通用的 🐖 emoji 形象(侧视、卷尾、圆耳),路径、配色与描边为本项目自绘,
24
+ 不是任何 emoji 素材集或游戏原版素材的路径拷贝。
25
+ - 界面里的其它图形一律用系统 emoji 字体渲染,不附带图形文件。
26
+
27
+ ## 商标
28
+
29
+ QQ 宠物 / QQ 是腾讯控股有限公司的商标。本插件与腾讯**无任何关联,亦未获其授权**;
30
+ 文档中提到该名称只为说明玩法与数值的参考来源。若权利人认为本仓库有不妥之处,
31
+ 请开 issue,作者会立即调整或下架。
@@ -0,0 +1,35 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="老年猪">
2
+ <title>老年猪</title>
3
+ <!-- 同一头猪,毛色淡下去。多了灰眉毛、皱纹、两撇小胡子和一撮白下巴。 -->
4
+ <g transform="translate(-7.17 -0.78) scale(0.1993)" stroke-linecap="round" stroke-linejoin="round">
5
+ <!-- 远侧后腿 -->
6
+ <path fill="#EA959C" d="M214 210C213 221 210 232 211 246C212 256 224 257 233 254C244 251 246 240 247 225L248 211Z"/>
7
+ <!-- 卷起来的尾巴 -->
8
+ <path d="M294 62C298 47 305 40 315 45C327 50 341 64 329 72C319 80 309 67 316 51C322 39 330 31 339 35"
9
+ fill="none" stroke="#F1C09D" stroke-width="11"/>
10
+ <!-- 身体、口鼻和三条可见的腿 -->
11
+ <path fill="#F1C09D" d="M110 70C155 46 192 37 231 41C259 43 279 48 298 64C320 83 332 105 332 128C333 146 326 163 319 180C312 197 309 223 308 241C308 254 301 260 289 260C277 260 270 255 269 244L267 230C266 222 261 219 253 220C231 227 213 235 192 240L191 282C191 292 185 298 173 298C159 298 152 293 152 284L151 248C140 248 131 247 123 245L122 271C121 282 116 287 104 287C93 287 88 283 87 273L84 232C63 224 52 210 48 192C42 170 48 148 62 126C69 115 75 106 80 94C87 79 96 68 110 70Z"/>
12
+ <!-- 耳朵底下的轮廓 -->
13
+ <path fill="#F1C09D" d="M63 107C64 97 75 81 84 68C90 58 102 58 108 66L115 87L90 113Z"/>
14
+ <!-- 松垮圆润的耳朵,颜色褪成灰玫瑰 -->
15
+ <path d="M97 65C88 63 83 75 78 82C71 91 65 101 64 106C68 116 86 109 93 98"
16
+ fill="none" stroke="#CF6C89" stroke-width="10"/>
17
+ <path d="M187 104C174 110 184 129 193 139C201 147 213 150 220 139C225 131 224 119 222 112"
18
+ fill="none" stroke="#CF6C89" stroke-width="11"/>
19
+ <!-- 眼睛:两道弧线,眯着 -->
20
+ <path d="M83 145Q91 137 99 146" fill="none" stroke="#373A32" stroke-width="6"/>
21
+ <path d="M156 160Q164 152 173 161" fill="none" stroke="#373A32" stroke-width="6"/>
22
+ <!-- 歪着的鼻子 -->
23
+ <path fill="#ED8B98" d="M108 165C91 161 78 166 74 175C68 186 74 200 90 207C106 214 125 214 135 204C143 196 140 183 129 174C123 170 116 167 108 165Z"/>
24
+ <path fill="#373A32" d="M92 175C87 174 84 178 85 185C85 191 89 196 94 195C99 194 101 188 99 182C98 178 96 175 92 175Z"/>
25
+ <path fill="#373A32" d="M115 180C110 178 107 183 107 189C106 195 109 200 114 200C119 200 122 195 122 189C122 184 119 180 115 180Z"/>
26
+ <!-- 花白的眉毛和脸上的小皱纹 -->
27
+ <path d="M79 131Q89 121 101 130M153 146Q163 138 175 147" fill="none" stroke="#ADADA5" stroke-width="7"/>
28
+ <path d="M116 120Q127 124 137 123M116 130Q125 133 133 132M73 151L69 154M178 166L183 170"
29
+ fill="none" stroke="#CA997E" stroke-width="3"/>
30
+ <!-- 两撇小胡子和一撮白下巴 -->
31
+ <path d="M107 207C98 203 96 213 84 212C88 220 98 223 107 216C114 225 127 226 134 219C120 220 119 208 107 207Z" fill="#F8F4E8"/>
32
+ <path d="M105 228Q116 233 128 230Q127 241 119 247L116 240L110 244Q107 236 105 228Z" fill="#F8F4E8"/>
33
+ <path d="M115 233L118 237" stroke="#D6D3C7" stroke-width="2"/>
34
+ </g>
35
+ </svg>
@@ -0,0 +1,38 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-labelledby="king-title king-desc">
2
+ <title id="king-title">猪猪王 · 洗澡</title>
3
+ <desc id="king-desc">猪猪王摘下披风和权杖,在薄荷色浴盆里闭眼享受泡泡浴,金冠仍戴在头上。透明背景。</desc>
4
+ <g id="character" transform="translate(5 6) scale(.86)"><g stroke-linecap="round" stroke-linejoin="round">
5
+ <g id="far-legs" fill="#FF9FA5">
6
+ <path d="M25 43C24 47 24 51 25 54C26 57 30 57 31 54L32 46Z"/>
7
+ <path d="M44 42L43 51C43 55 48 56 50 53L51 44Z"/>
8
+ </g>
9
+ <path id="tail" d="M53 26C56 21 61 23 60 27C59 31 55 29 57 25C58 23 59 22 61 22" fill="none" stroke="#FFD1AF" stroke-width="2.6"/>
10
+
11
+ <g id="pig-body">
12
+ <path fill="#FFD1AF" d="M24 19C31 15 40 18 44 24C49 30 48 39 44 44C42 47 39 49 37 50L37 56C37 60 30 61 29 56L29 50C26 50 23 49 20 47L16 51C13 54 10 51 12 48L16 40C12 37 10 33 12 28C14 23 19 21 24 19Z"/>
13
+ <path fill="#FFD1AF" d="M17 23C16 21 17 18 20 16C23 14 26 16 26 19L25 24Z"/>
14
+ <path d="M24 16C22 15 18 18 17.5 20C18 22 21 21 23 19.5" fill="none" stroke="#E95892" stroke-width="2.5"/>
15
+ <ellipse cx="20" cy="32.2" rx="7.3" ry="5.7" transform="rotate(17 20 32.2)" fill="#FF8195"/>
16
+ <path fill="#373A32" d="M17.3 29C16.1 28.7 15.3 30 15.3 31.5C15.2 33 15.8 34.2 16.9 34.1C18 34 18.5 32.6 18.4 31.2C18.4 30.1 18 29.2 17.3 29Z"/>
17
+ <path fill="#373A32" d="M22.8 30.8C21.6 30.5 20.7 31.7 20.7 33.3C20.6 34.7 21.2 35.9 22.3 35.8C23.4 35.7 24 34.3 23.9 32.9C23.9 31.8 23.5 31 22.8 30.8Z"/>
18
+ <path fill="#373A32" d="M18.5 24.4C18.2 24.1 17.5 24.2 17.4 24.8C17.3 26.5 20.6 27.6 22 27.2C22.8 27 22.8 26.1 22.1 25.9C20.7 25.8 19.4 25.7 18.5 24.4Z"/>
19
+ <path fill="#373A32" d="M29.1 27.2C28.8 26.9 28.2 27.1 28.2 27.7C28.4 29.4 31.6 30.6 33.2 30C33.9 29.8 33.8 28.9 33.2 28.9C31.9 28.9 30.3 28.4 29.1 27.2Z"/>
20
+ <ellipse cx="30.1" cy="35.5" rx="2.6" ry="1.5" transform="rotate(12 30.1 35.5)" fill="#FFAFAC" opacity=".72"/>
21
+ <path d="M37.2 21.4C34.5 21.2 34.4 23.7 35.4 26.2C36.5 29 39.6 30.1 41 27.5C42 25.7 41.7 23.7 41.1 22.8" fill="none" stroke="#E95892" stroke-width="2.9"/>
22
+ </g>
23
+ <g id="crown">
24
+ <path fill="#D7A42A" d="M26 11L28 13L31 7L34 13L38 8L39 14L43 12L40 20C35 21 29 19 26.8 17Z"/>
25
+ <path fill="#F2C64B" d="M25 8L28.2 13L31 6L33.3 12L37.4 7.8L37.5 14L42 10.5L39.2 18.3C34.7 19.4 28.5 17.7 26.7 15.7Z"/>
26
+ <path fill="#FFE18A" d="M26.7 15.7C31 17.5 35 18.3 39.2 17.6L38.8 19C34.4 19.5 30.2 18.6 27.1 17Z"/>
27
+ <circle cx="25" cy="8" r="1.1" fill="#F2C64B"/>
28
+ <circle cx="31" cy="6" r="1.3" fill="#F2C64B"/>
29
+ <circle cx="37.4" cy="7.8" r="1.1" fill="#F2C64B"/>
30
+ <circle cx="42" cy="10.5" r="1" fill="#F2C64B"/>
31
+ <ellipse cx="33.1" cy="15.7" rx="1.7" ry="2" transform="rotate(12 33.1 15.7)" fill="#19BFA5"/>
32
+ <ellipse cx="32.6" cy="15.1" rx=".5" ry=".7" fill="#8AE5CC"/>
33
+ <circle cx="28.5" cy="14" r=".8" fill="#E95892"/>
34
+ <circle cx="37.4" cy="16" r=".9" fill="#E95892"/>
35
+ </g>
36
+
37
+ </g></g><g id="tub"><path fill="#65BBA8" d="M9 42C17 39 49 39 56 42L53 55C45 60 21 60 13 55Z"/><path fill="#82D5BB" d="M10 44C22 46 42 46 55 44L52 53C41 57 23 57 14 53Z"/><path fill="#F2C64B" d="M8 42C17 38 49 38 57 42L57 44C49 47 16 47 8 44Z"/><path fill="#D7A42A" d="M18 55L23 57L22 60L17 60ZM43 57L48 55L49 60L44 60Z"/><ellipse cx="32" cy="42" rx="22" ry="3.3" fill="#DDF5E9"/></g><g id="bubbles" fill="#F8FBF0"><circle cx="18" cy="40" r="4"/><circle cx="24" cy="39" r="4.3"/><circle cx="30" cy="41" r="3.8"/><circle cx="40" cy="40" r="4.5"/><circle cx="47" cy="41" r="3.2"/><circle cx="17" cy="32" r="2.1"/><circle cx="49" cy="30" r="2.6"/><circle cx="52" cy="22" r="1.6"/><circle cx="45" cy="34" r="1.3"/></g>
38
+ </svg>
@@ -0,0 +1,45 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-labelledby="king-title king-desc">
2
+ <title id="king-title">猪猪王 · 喂食</title>
3
+ <desc id="king-desc">猪猪王收好权杖,低头享用金色食碗里的苹果,闭眼鼓起腮帮子。透明背景。</desc>
4
+ <g id="character" transform="translate(1 1) scale(.90) rotate(-13 43 26)"><g stroke-linecap="round" stroke-linejoin="round">
5
+ <g id="far-legs" fill="#FF9FA5">
6
+ <path d="M25 43C24 47 24 51 25 54C26 57 30 57 31 54L32 46Z"/>
7
+ <path d="M44 42L43 51C43 55 48 56 50 53L51 44Z"/>
8
+ </g>
9
+ <path id="tail" d="M53 26C56 21 61 23 60 27C59 31 55 29 57 25C58 23 59 22 61 22" fill="none" stroke="#FFD1AF" stroke-width="2.6"/>
10
+ <g id="cape">
11
+ <path fill="#ED3344" d="M33 16C43 13 53 17 57 26C61 35 60 44 59 55C53 60 42 61 36 57L35 37Z"/>
12
+ <path fill="#FF5260" d="M34 17C44 14 53 20 57 28C49 22 43 21 36 22Z"/>
13
+ <path fill="#C92536" d="M37 21C44 24 47 32 48 41C49 47 51 54 55 58C49 60 42 60 36 57L35 37Z"/>
14
+ <path fill="#AB2535" d="M37 24C39 34 39 46 40 59L36 57L35 37Z"/>
15
+ <path fill="#F8E7C9" d="M37 43C39 50 42 56 46 53C49 50 47 44 49 39C51 35 54 38 54 42C54 48 49 52 48 53C51 52 54 48 58 45L58 47C54 51 48 55 45 56C41 58 38 50 37 46ZM50 48C53 44 53 40 52 39C50 39 50 44 50 48Z" fill-rule="evenodd"/>
16
+ <path fill="#F8E7C9" d="M36.5 52C43 59 51 55 59.5 52L59.3 54C52 57 43 60 36.5 54Z"/>
17
+ </g>
18
+ <g id="pig-body">
19
+ <path fill="#FFD1AF" d="M24 19C31 15 40 18 44 24C49 30 48 39 44 44C42 47 39 49 37 50L37 56C37 60 30 61 29 56L29 50C26 50 23 49 20 47L16 51C13 54 10 51 12 48L16 40C12 37 10 33 12 28C14 23 19 21 24 19Z"/>
20
+ <path fill="#FFD1AF" d="M17 23C16 21 17 18 20 16C23 14 26 16 26 19L25 24Z"/>
21
+ <path d="M24 16C22 15 18 18 17.5 20C18 22 21 21 23 19.5" fill="none" stroke="#E95892" stroke-width="2.5"/>
22
+ <ellipse cx="20" cy="32.2" rx="7.3" ry="5.7" transform="rotate(17 20 32.2)" fill="#FF8195"/>
23
+ <path fill="#373A32" d="M17.3 29C16.1 28.7 15.3 30 15.3 31.5C15.2 33 15.8 34.2 16.9 34.1C18 34 18.5 32.6 18.4 31.2C18.4 30.1 18 29.2 17.3 29Z"/>
24
+ <path fill="#373A32" d="M22.8 30.8C21.6 30.5 20.7 31.7 20.7 33.3C20.6 34.7 21.2 35.9 22.3 35.8C23.4 35.7 24 34.3 23.9 32.9C23.9 31.8 23.5 31 22.8 30.8Z"/>
25
+ <path fill="#373A32" d="M18.5 24.4C18.2 24.1 17.5 24.2 17.4 24.8C17.3 26.5 20.6 27.6 22 27.2C22.8 27 22.8 26.1 22.1 25.9C20.7 25.8 19.4 25.7 18.5 24.4Z"/>
26
+ <path fill="#373A32" d="M29.1 27.2C28.8 26.9 28.2 27.1 28.2 27.7C28.4 29.4 31.6 30.6 33.2 30C33.9 29.8 33.8 28.9 33.2 28.9C31.9 28.9 30.3 28.4 29.1 27.2Z"/>
27
+ <ellipse cx="30.1" cy="35.5" rx="2.6" ry="1.5" transform="rotate(12 30.1 35.5)" fill="#FFAFAC" opacity=".72"/>
28
+ <path d="M37.2 21.4C34.5 21.2 34.4 23.7 35.4 26.2C36.5 29 39.6 30.1 41 27.5C42 25.7 41.7 23.7 41.1 22.8" fill="none" stroke="#E95892" stroke-width="2.9"/>
29
+ </g>
30
+ <g id="crown">
31
+ <path fill="#D7A42A" d="M26 11L28 13L31 7L34 13L38 8L39 14L43 12L40 20C35 21 29 19 26.8 17Z"/>
32
+ <path fill="#F2C64B" d="M25 8L28.2 13L31 6L33.3 12L37.4 7.8L37.5 14L42 10.5L39.2 18.3C34.7 19.4 28.5 17.7 26.7 15.7Z"/>
33
+ <path fill="#FFE18A" d="M26.7 15.7C31 17.5 35 18.3 39.2 17.6L38.8 19C34.4 19.5 30.2 18.6 27.1 17Z"/>
34
+ <circle cx="25" cy="8" r="1.1" fill="#F2C64B"/>
35
+ <circle cx="31" cy="6" r="1.3" fill="#F2C64B"/>
36
+ <circle cx="37.4" cy="7.8" r="1.1" fill="#F2C64B"/>
37
+ <circle cx="42" cy="10.5" r="1" fill="#F2C64B"/>
38
+ <ellipse cx="33.1" cy="15.7" rx="1.7" ry="2" transform="rotate(12 33.1 15.7)" fill="#19BFA5"/>
39
+ <ellipse cx="32.6" cy="15.1" rx=".5" ry=".7" fill="#8AE5CC"/>
40
+ <circle cx="28.5" cy="14" r=".8" fill="#E95892"/>
41
+ <circle cx="37.4" cy="16" r=".9" fill="#E95892"/>
42
+ </g>
43
+
44
+ </g></g><g id="meal"><path fill="#D7A42A" d="M13 43C16 41 29 41 34 43L32 51C27 54 17 54 15 50Z"/><path fill="#F2C64B" d="M13 43C17 41 29 41 34 43L33 45C28 47 17 47 13.5 45Z"/><ellipse cx="23.5" cy="43.4" rx="8.5" ry="2.3" fill="#FFFBE7"/><path fill="#ED6A75" d="M22 39C19 37 16 39 17 42C18 44 21 45 24 44C27 43 29 39 25 38C24 38 23 38 22 39Z"/><path fill="#82D5BB" d="M22 39C21 36 24 35 26 35C26 37 25 38 22 39Z"/><path fill="#E6B56E" d="M15 40L18 39L20 42L17 43Z"/><path fill="#E6B56E" d="M26 41L29 40L31 42L28 44Z"/></g>
45
+ </svg>
@@ -0,0 +1,45 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-labelledby="king-title king-desc">
2
+ <title id="king-title">猪猪王 · 摸摸</title>
3
+ <desc id="king-desc">猪猪王闭眼享受摸摸,身体轻轻压扁,耳朵放松,头顶飘出爱心。透明背景。</desc>
4
+ <g id="character" transform="translate(0 11) scale(1 .8)"><g stroke-linecap="round" stroke-linejoin="round">
5
+ <g id="far-legs" fill="#FF9FA5">
6
+ <path d="M25 43C24 47 24 51 25 54C26 57 30 57 31 54L32 46Z"/>
7
+ <path d="M44 42L43 51C43 55 48 56 50 53L51 44Z"/>
8
+ </g>
9
+ <path id="tail" d="M53 26C56 21 61 23 60 27C59 31 55 29 57 25C58 23 59 22 61 22" fill="none" stroke="#FFD1AF" stroke-width="2.6"/>
10
+ <g id="cape">
11
+ <path fill="#ED3344" d="M33 16C43 13 53 17 57 26C61 35 60 44 59 55C53 60 42 61 36 57L35 37Z"/>
12
+ <path fill="#FF5260" d="M34 17C44 14 53 20 57 28C49 22 43 21 36 22Z"/>
13
+ <path fill="#C92536" d="M37 21C44 24 47 32 48 41C49 47 51 54 55 58C49 60 42 60 36 57L35 37Z"/>
14
+ <path fill="#AB2535" d="M37 24C39 34 39 46 40 59L36 57L35 37Z"/>
15
+ <path fill="#F8E7C9" d="M37 43C39 50 42 56 46 53C49 50 47 44 49 39C51 35 54 38 54 42C54 48 49 52 48 53C51 52 54 48 58 45L58 47C54 51 48 55 45 56C41 58 38 50 37 46ZM50 48C53 44 53 40 52 39C50 39 50 44 50 48Z" fill-rule="evenodd"/>
16
+ <path fill="#F8E7C9" d="M36.5 52C43 59 51 55 59.5 52L59.3 54C52 57 43 60 36.5 54Z"/>
17
+ </g>
18
+ <g id="pig-body">
19
+ <path fill="#FFD1AF" d="M24 19C31 15 40 18 44 24C49 30 48 39 44 44C42 47 39 49 37 50L37 56C37 60 30 61 29 56L29 50C26 50 23 49 20 47L16 51C13 54 10 51 12 48L16 40C12 37 10 33 12 28C14 23 19 21 24 19Z"/>
20
+ <path fill="#FFD1AF" d="M17 23C16 21 17 18 20 16C23 14 26 16 26 19L25 24Z"/>
21
+ <path d="M24 16C22 15 18 18 17.5 20C18 22 21 21 23 19.5" fill="none" stroke="#E95892" stroke-width="2.5"/>
22
+ <ellipse cx="20" cy="32.2" rx="7.3" ry="5.7" transform="rotate(17 20 32.2)" fill="#FF8195"/>
23
+ <path fill="#373A32" d="M17.3 29C16.1 28.7 15.3 30 15.3 31.5C15.2 33 15.8 34.2 16.9 34.1C18 34 18.5 32.6 18.4 31.2C18.4 30.1 18 29.2 17.3 29Z"/>
24
+ <path fill="#373A32" d="M22.8 30.8C21.6 30.5 20.7 31.7 20.7 33.3C20.6 34.7 21.2 35.9 22.3 35.8C23.4 35.7 24 34.3 23.9 32.9C23.9 31.8 23.5 31 22.8 30.8Z"/>
25
+ <path fill="#373A32" d="M18.5 24.4C18.2 24.1 17.5 24.2 17.4 24.8C17.3 26.5 20.6 27.6 22 27.2C22.8 27 22.8 26.1 22.1 25.9C20.7 25.8 19.4 25.7 18.5 24.4Z"/>
26
+ <path fill="#373A32" d="M29.1 27.2C28.8 26.9 28.2 27.1 28.2 27.7C28.4 29.4 31.6 30.6 33.2 30C33.9 29.8 33.8 28.9 33.2 28.9C31.9 28.9 30.3 28.4 29.1 27.2Z"/>
27
+ <ellipse cx="30.1" cy="35.5" rx="2.6" ry="1.5" transform="rotate(12 30.1 35.5)" fill="#FFAFAC" opacity=".72"/>
28
+ <path d="M37.2 21.4C34.5 21.2 34.4 23.7 35.4 26.2C36.5 29 39.6 30.1 41 27.5C42 25.7 41.7 23.7 41.1 22.8" fill="none" stroke="#E95892" stroke-width="2.9"/>
29
+ </g>
30
+ <g id="crown">
31
+ <path fill="#D7A42A" d="M26 11L28 13L31 7L34 13L38 8L39 14L43 12L40 20C35 21 29 19 26.8 17Z"/>
32
+ <path fill="#F2C64B" d="M25 8L28.2 13L31 6L33.3 12L37.4 7.8L37.5 14L42 10.5L39.2 18.3C34.7 19.4 28.5 17.7 26.7 15.7Z"/>
33
+ <path fill="#FFE18A" d="M26.7 15.7C31 17.5 35 18.3 39.2 17.6L38.8 19C34.4 19.5 30.2 18.6 27.1 17Z"/>
34
+ <circle cx="25" cy="8" r="1.1" fill="#F2C64B"/>
35
+ <circle cx="31" cy="6" r="1.3" fill="#F2C64B"/>
36
+ <circle cx="37.4" cy="7.8" r="1.1" fill="#F2C64B"/>
37
+ <circle cx="42" cy="10.5" r="1" fill="#F2C64B"/>
38
+ <ellipse cx="33.1" cy="15.7" rx="1.7" ry="2" transform="rotate(12 33.1 15.7)" fill="#19BFA5"/>
39
+ <ellipse cx="32.6" cy="15.1" rx=".5" ry=".7" fill="#8AE5CC"/>
40
+ <circle cx="28.5" cy="14" r=".8" fill="#E95892"/>
41
+ <circle cx="37.4" cy="16" r=".9" fill="#E95892"/>
42
+ </g>
43
+
44
+ </g></g><g id="hearts" fill="#E95892"><path d="M43 10C40 7 35 10 38 14L43 19L48 14C51 10 46 7 43 10Z"/><path d="M53 6C51.5 4.5 49 6 50.5 8L53 10.5L55.5 8C57 6 54.5 4.5 53 6Z"/></g>
45
+ </svg>
@@ -0,0 +1,45 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-labelledby="king-title king-desc">
2
+ <title id="king-title">猪猪王 · 玩耍</title>
3
+ <desc id="king-desc">猪猪王开心地跃起,前蹄伸向薄荷色小皮球,红披风随着动作摆动。透明背景。</desc>
4
+ <g id="character" transform="translate(6 -2) scale(.86) rotate(8 32 32)"><g stroke-linecap="round" stroke-linejoin="round">
5
+ <g id="far-legs" fill="#FF9FA5">
6
+ <path d="M25 43C24 47 24 51 25 54C26 57 30 57 31 54L32 46Z"/>
7
+ <path d="M44 42L43 51C43 55 48 56 50 53L51 44Z"/>
8
+ </g>
9
+ <path id="tail" d="M53 26C56 21 61 23 60 27C59 31 55 29 57 25C58 23 59 22 61 22" fill="none" stroke="#FFD1AF" stroke-width="2.6"/>
10
+ <g id="cape">
11
+ <path fill="#ED3344" d="M33 16C43 13 53 17 57 26C61 35 60 44 59 55C53 60 42 61 36 57L35 37Z"/>
12
+ <path fill="#FF5260" d="M34 17C44 14 53 20 57 28C49 22 43 21 36 22Z"/>
13
+ <path fill="#C92536" d="M37 21C44 24 47 32 48 41C49 47 51 54 55 58C49 60 42 60 36 57L35 37Z"/>
14
+ <path fill="#AB2535" d="M37 24C39 34 39 46 40 59L36 57L35 37Z"/>
15
+ <path fill="#F8E7C9" d="M37 43C39 50 42 56 46 53C49 50 47 44 49 39C51 35 54 38 54 42C54 48 49 52 48 53C51 52 54 48 58 45L58 47C54 51 48 55 45 56C41 58 38 50 37 46ZM50 48C53 44 53 40 52 39C50 39 50 44 50 48Z" fill-rule="evenodd"/>
16
+ <path fill="#F8E7C9" d="M36.5 52C43 59 51 55 59.5 52L59.3 54C52 57 43 60 36.5 54Z"/>
17
+ </g>
18
+ <g id="pig-body">
19
+ <path fill="#FFD1AF" d="M24 19C31 15 40 18 44 24C49 30 48 39 44 44C42 47 39 49 37 50L37 56C37 60 30 61 29 56L29 50C26 50 23 49 20 47L16 51C13 54 10 51 12 48L16 40C12 37 10 33 12 28C14 23 19 21 24 19Z"/>
20
+ <path fill="#FFD1AF" d="M17 23C16 21 17 18 20 16C23 14 26 16 26 19L25 24Z"/>
21
+ <path d="M24 16C22 15 18 18 17.5 20C18 22 21 21 23 19.5" fill="none" stroke="#E95892" stroke-width="2.5"/>
22
+ <ellipse cx="20" cy="32.2" rx="7.3" ry="5.7" transform="rotate(17 20 32.2)" fill="#FF8195"/>
23
+ <path fill="#373A32" d="M17.3 29C16.1 28.7 15.3 30 15.3 31.5C15.2 33 15.8 34.2 16.9 34.1C18 34 18.5 32.6 18.4 31.2C18.4 30.1 18 29.2 17.3 29Z"/>
24
+ <path fill="#373A32" d="M22.8 30.8C21.6 30.5 20.7 31.7 20.7 33.3C20.6 34.7 21.2 35.9 22.3 35.8C23.4 35.7 24 34.3 23.9 32.9C23.9 31.8 23.5 31 22.8 30.8Z"/>
25
+ <path fill="#373A32" d="M18.5 24.4C18.2 24.1 17.5 24.2 17.4 24.8C17.3 26.5 20.6 27.6 22 27.2C22.8 27 22.8 26.1 22.1 25.9C20.7 25.8 19.4 25.7 18.5 24.4Z"/>
26
+ <path fill="#373A32" d="M29.1 27.2C28.8 26.9 28.2 27.1 28.2 27.7C28.4 29.4 31.6 30.6 33.2 30C33.9 29.8 33.8 28.9 33.2 28.9C31.9 28.9 30.3 28.4 29.1 27.2Z"/>
27
+ <ellipse cx="30.1" cy="35.5" rx="2.6" ry="1.5" transform="rotate(12 30.1 35.5)" fill="#FFAFAC" opacity=".72"/>
28
+ <path d="M37.2 21.4C34.5 21.2 34.4 23.7 35.4 26.2C36.5 29 39.6 30.1 41 27.5C42 25.7 41.7 23.7 41.1 22.8" fill="none" stroke="#E95892" stroke-width="2.9"/>
29
+ <path fill="#373A32" d="M25 38C27 40 30 40 32 39C31 43 27 44 25 38Z"/><path fill="#FF8195" d="M27 41C28 40.5 30 40.5 31 41C30 43 28 43 27 41Z"/></g>
30
+ <g id="crown">
31
+ <path fill="#D7A42A" d="M26 11L28 13L31 7L34 13L38 8L39 14L43 12L40 20C35 21 29 19 26.8 17Z"/>
32
+ <path fill="#F2C64B" d="M25 8L28.2 13L31 6L33.3 12L37.4 7.8L37.5 14L42 10.5L39.2 18.3C34.7 19.4 28.5 17.7 26.7 15.7Z"/>
33
+ <path fill="#FFE18A" d="M26.7 15.7C31 17.5 35 18.3 39.2 17.6L38.8 19C34.4 19.5 30.2 18.6 27.1 17Z"/>
34
+ <circle cx="25" cy="8" r="1.1" fill="#F2C64B"/>
35
+ <circle cx="31" cy="6" r="1.3" fill="#F2C64B"/>
36
+ <circle cx="37.4" cy="7.8" r="1.1" fill="#F2C64B"/>
37
+ <circle cx="42" cy="10.5" r="1" fill="#F2C64B"/>
38
+ <ellipse cx="33.1" cy="15.7" rx="1.7" ry="2" transform="rotate(12 33.1 15.7)" fill="#19BFA5"/>
39
+ <ellipse cx="32.6" cy="15.1" rx=".5" ry=".7" fill="#8AE5CC"/>
40
+ <circle cx="28.5" cy="14" r=".8" fill="#E95892"/>
41
+ <circle cx="37.4" cy="16" r=".9" fill="#E95892"/>
42
+ </g>
43
+
44
+ </g></g><g id="ball"><circle cx="13" cy="54" r="7" fill="#19C8B9"/><path fill="#B7EDE0" d="M8 49C10 47 13 47 15 48C12 51 10 55 10 60C8 59 6 56 6 54C6 52 7 50 8 49Z"/><path fill="#FFFBE7" d="M14 47.1C17 48 20 51 20 54C20 58 17 61 14 61C17 57 18 52 14 47.1Z"/></g>
45
+ </svg>