mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +08:00
fix: 显伤 & 零碎文档
This commit is contained in:
parent
0084dafaf0
commit
2a6a1d6cfe
@ -41,7 +41,8 @@ export default defineConfig({
|
||||
},
|
||||
{ text: '设置系统', link: '/guide/setting' },
|
||||
{ text: '存储系统', link: '/guide/storage' },
|
||||
{ text: '按键系统', link: '/guide/hotkey' }
|
||||
{ text: '按键系统', link: '/guide/hotkey' },
|
||||
{ text: '零碎功能', link: '/guide/misc' }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -8,6 +8,8 @@ lang: zh-CN
|
||||
|
||||
本指南建立在你已经大致了解 js 的基础语法的基础上。如果还不了解可以尝试对指南内容进行模仿,或者查看[人类塔解析](https://h5mota.com/bbs/thread/?tid=1018&p=1)
|
||||
|
||||
如果你有能力直接使用源码版样板进行创作,也可以直接 fork 或 clone 2.A 样板[存储库](https://github.com/unanmed/HumanBreak/tree/template-v2.A)。2.A 样板使用了 vite 作为了构建工具,同时使用了 ts, vue, less 等作为了开发语言。
|
||||
|
||||
## 注意事项
|
||||
|
||||
对于新样板,由于拥有了近乎完整的类型标注,因此更推荐使用 `VS Code` 进行代码编写,这样你可以获取到完整的类型标注,而由于类型标注的复杂性,样板编辑器完全无法部署,因此样板编辑器不会有任何新版的类型标注。
|
||||
|
31
docs/guide/misc.md
Normal file
31
docs/guide/misc.md
Normal file
@ -0,0 +1,31 @@
|
||||
# 零碎功能介绍
|
||||
|
||||
新样板中包含了很多零碎功能,这些功能比较细微,不适合单独开一个页面进行讲解,因此这里把这些零碎功能全部放到了这个页面
|
||||
|
||||
## html解析
|
||||
|
||||
有很多地方可以填写 html 字符串来实现解析 html:
|
||||
|
||||
1. 道具、装备描述:
|
||||
|
||||
以 `!!html`开头,后面紧跟着 html 字符串即可实现将这些内容解析为 html,例如:
|
||||
|
||||
```text
|
||||
!!html<span style="color: red">这是一段红色的字</span>
|
||||
```
|
||||
|
||||
2. 虚拟按键:
|
||||
|
||||
注册虚拟按键时,按键的显示名称可以填写 html。例如 Win 键就是这么写的:
|
||||
|
||||
```html
|
||||
<span style='font-size: 130%; display: flex; justify-content: center; align-items: center'>
|
||||
<svg style="width: 1em; height: 1em" viewbox="64 64 896 896" fill="currentColor">
|
||||
<path d="M523.8 191.4v288.9h382V128.1zm0 642.2l382 62.2v-352h-382zM120.1 480.2H443V201.9l-322.9 53.5zm0 290.4L443 823.2V543.8H120.1z" />
|
||||
</svg>
|
||||
</span>
|
||||
```
|
||||
|
||||
3. 设置:
|
||||
|
||||
设置的说明也可以使用 html
|
@ -258,7 +258,7 @@ export class EnemyCollection implements RangeCollection<DamageEnemy> {
|
||||
if (!dam || objs[id]?.event.noPass) continue;
|
||||
|
||||
// 地图伤害
|
||||
if (dam.damage !== 0) {
|
||||
if (dam.damage !== 0 && !dam.ambush) {
|
||||
const damage = core.formatBigNumber(dam.damage, true);
|
||||
const color = dam.damage < 0 ? '#6eff6a' : '#fa3';
|
||||
core.status.damage.extraData.push({
|
||||
@ -280,7 +280,7 @@ export class EnemyCollection implements RangeCollection<DamageEnemy> {
|
||||
});
|
||||
}
|
||||
|
||||
if (dam.repulse) {
|
||||
if (dam.repulse && dam.damage <= 0) {
|
||||
core.status.damage.extraData.push({
|
||||
text: '阻',
|
||||
px: 32 * x + 16,
|
||||
|
Loading…
Reference in New Issue
Block a user