13 Commits

Author SHA1 Message Date
Vick Scarlet
dd5a003801 update: dependencies 2026-01-26 18:21:44 +08:00
Vick Scarlet
ddc87ebf40 update: dependencies 2026-01-26 17:50:24 +08:00
dependabot[bot]
23bcae0b74 Bump js-yaml in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 15:14:19 +08:00
dependabot[bot]
e075dfc23d Bump vite in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 6.3.6 to 6.4.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@6.4.1/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.4.1
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 15:09:16 +08:00
Vick Scarlet
9088ab0eb1 add: support template prop 2026-01-26 14:47:35 +08:00
dependabot[bot]
39388c6eaf Bump the npm_and_yarn group across 1 directory with 2 updates
Bumps the npm_and_yarn group with 2 updates in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) and [brace-expansion](https://github.com/juliangruber/brace-expansion).


Updates `vite` from 6.2.5 to 6.3.6
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite)

Updates `brace-expansion` from 2.0.1 to 2.0.2
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 6.3.6
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: brace-expansion
  dependency-version: 2.0.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-24 17:46:20 +08:00
神戸小鳥
0ce9b0ed02 Add Dependabot configuration for updates
Configured Dependabot for version updates with a weekly schedule.
2025-09-24 17:45:01 +08:00
Vick Scarlet
aee4fcf164 fix: 修复冲突天赋漏填出错 2025-05-17 21:27:01 +08:00
Vick Scarlet
5c0fe56915 fix: 修复冲突天赋漏填出错 2025-05-17 21:17:21 +08:00
Vick Scarlet
b82da6c9a7 delete: unuse 2025-04-06 20:38:54 +08:00
su226
b1ffae9eaf fix: wrong data 2025-04-06 19:39:05 +08:00
Vick Scarlet
fee986432d update: use min lib 2025-04-05 18:37:04 +08:00
Vick Scarlet
25fc74398a update: readme 2025-04-05 18:26:55 +08:00
15 changed files with 585 additions and 695 deletions

11
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View File

@@ -1,3 +0,0 @@
{
"esversion": 9
}

View File

@@ -14,38 +14,22 @@
<summary><strong>网页版</strong></summary>
<br />
1. 下载项目代码。
```bash
# 1. 下载项目代码
git clone https://github.com/VickScarlet/lifeRestart.git my-project
# 2. 进入目录安装依赖
cd my-project
```
2. 进入目录安装依赖。
```bash
pnpm install
```
或者
# 3. 转换XLSX表
pnpm xlsx2json
```bash
npm install
```
3. 启动本地服务器。
```bash
# 4. 启动本地开发服务器
pnpm dev
```
或者
```bash
npm run dev
```
4. 启动完成后会自动打开浏览器访问 [http://localhost:5173](http://localhost:5173)。
启动完成后打开浏览器访问 [http://localhost:5173](http://localhost:5173)。
</details>

View File

@@ -14,38 +14,23 @@ English | [简体中文](./README-zh_CN.md)
<summary><strong>Web Version</strong></summary>
<br />
1. Clone project code.
```bash
# 1. Clone project code.
git clone git@github.com:VickScarlet/lifeRestart.git my-project
cd my-project
```
2. Installation dependence.
```bash
# 2. Installation dependence.
pnpm install
```
Or
# 3. Transform XLSX
pnpm xlsx2json
```bash
npm install
```
3. Start local server.
```bash
# 4. Start local dev server.
pnpm dev
```
Or
```bash
npm run dev
```
4. After the startup is complete, open a browser and visit [http://localhost:5173](http://localhost:5173).
After the startup is complete, open a browser and visit [http://localhost:5173](http://localhost:5173).
</details>
<details>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -17,55 +17,19 @@
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<font-face font-family="方正像素12" src="fonts/方正像素12.ttf"/>
<title>Life Restart</title>
<!--以下引用了常用类库,如果不使用,可以删除-->
<!--核心包,封装了显示对象渲染,事件,时间管理,时间轴动画,缓动,消息交互,socket本地存储鼠标触摸声音加载颜色滤镜位图字体等-->
<!--
<script type="text/javascript" src="libs/laya/laya.core.js"></script>
<!--提供了微信小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.wxmini.js"></script> -->
<!--提供了百度小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.bdmini.js"></script> -->
<!--提供了小米小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.xmmini.js"></script> -->
<!--提供了OPPO小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.quickgamemini.js"></script> -->
<!--提供了bilibili小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.bilimini.js"></script> -->
<!--提供了Alipay小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.Alipaymini.js"></script> -->
<!--提供了qq小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.qqmini.js"></script> -->
<!--提供了字节跳动小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.ttmini.js"></script> -->
<!--提供了华为快游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.hwmini.js"></script> -->
<!--提供了淘宝商家应用的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.tbmini.js"></script> -->
<!--提供了淘宝小部件的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.tbplugin.js"></script> -->
<!--封装了webgl渲染管线如果使用webgl渲染可以在初始化时调用Laya.init(1000,800,laya.webgl.WebGL);-->
<script type="text/javascript" src="libs/laya/laya.webgl.js"></script>
<!--提供了VIVO小游戏的适配-->
<!-- <script type="text/javascript" src="libs/laya/laya.vvmini.js"></script> -->
<!--是动画模块包含了swf动画骨骼动画等-->
<!-- <script type="text/javascript" src="libs/laya/laya.ani.js"></script> -->
<!--包含更多webgl滤镜比如外发光阴影模糊以及更多-->
<script type="text/javascript" src="libs/laya/laya.filter.js"></script>
<!--封装了html动态排版功能-->
<script type="text/javascript" src="libs/laya/laya.html.js"></script>
<!--粒子类库-->
<script type="text/javascript" src="libs/laya/laya.particle.js"></script>
<!--提供tileMap解析支持-->
<!-- <script type="text/javascript" src="libs/laya/laya.tiledmap.js"></script> -->
<!--提供了制作UI的各种组件实现-->
<script type="text/javascript" src="libs/laya/laya.ui.js"></script>
<!-- 提供LayaAir3d接口 -->
<!-- <script type="text/javascript" src="libs/laya/laya.d3.js"></script> -->
<!-- 物理引擎matter.js -->
<!--自定义的js(src文件夹下)文件自动添加到下面jsfile模块标签里面里js的顺序可以手动修改修改后保留修改的顺序新增加的js会默认依次追加到标签里-->
<!--删除标签ide不会自动添加js文件请谨慎操作-->
-->
<script type="text/javascript" src="libs/laya/min/laya.core.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.webgl.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.filter.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.particle.min.js"></script>
<script type="text/javascript" src="libs/laya/min/laya.ui.min.js"></script>
<script type="module" src="src/index.js"></script>
</head>
<body style="background:black"></body>

View File

@@ -1,12 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=759670
// for the documentation about the jsconfig.json format
"compilerOptions": {
"target": "es5"
},
"exclude": [
"node_modules",
"public",
"view"
]
// See http://go.microsoft.com/fwlink/?LinkId=759670
// for the documentation about the jsconfig.json format
"compilerOptions": {
"module": "esnext",
"target": "es6",
},
"include":["src", "repl", "vite.config.js"],
"exclude": ["node_modules", "public", "view"]
}

View File

@@ -12,8 +12,8 @@
"test": "vitest"
},
"devDependencies": {
"v-transform": "^2.1.1",
"vite": "^6.2.5",
"vitest": "^3.1.1"
"v-transform": "^2.2.0",
"vite": "^7.3.1",
"vitest": "^4.0.18"
}
}

1098
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -174,7 +174,7 @@ class Life {
type: this.PropertyTypes.TLT,
name,
grade,
description,
description: this.format(description),
})
if(!effect) continue;
this.#property.effect(effect);
@@ -188,8 +188,8 @@ class Life {
this.#property.effect(effect);
const content = {
type: this.PropertyTypes.EVT,
description,
postEvent,
description: this.format(description),
postEvent: postEvent && this.format(postEvent),
grade,
}
if(next) return [content, this.doEvent(next)].flat();
@@ -245,6 +245,23 @@ class Life {
return util.getListValuesMap(types.flat(), key => this.#property.get(key));
}
format(discription) {
return discription.replaceAll(/\{\s*[0-9a-zA-Z_-]+\s*?\}/g, (match) => this.#format(match));
}
#format(key) {
switch (key.slice(1, -1).trim().toLowerCase()) {
case 'currentyear': return new Date().getFullYear()
case 'age': return this.#property.get(this.PropertyTypes.AGE)
case 'charm': return this.#property.get(this.PropertyTypes.CHR)
case 'intelligence': return this.#property.get(this.PropertyTypes.INT)
case 'strength': return this.#property.get(this.PropertyTypes.STR)
case 'money': return this.#property.get(this.PropertyTypes.MNY)
case 'spirit': return this.#property.get(this.PropertyTypes.SPR)
default: return key
}
}
get lastExtendTalent() {
return this.#property.get(this.PropertyTypes.EXT);
}

View File

@@ -68,10 +68,17 @@ class Talent {
exclude(talents, excludeId) {
const { exclude } = this.get(excludeId);
if(!exclude) return null;
for(const talent of talents) {
for(const e of exclude) {
if(talent == e) return talent;
if(exclude) {
for(const e of exclude) {
if(talent == e) return talent;
}
}
const excludeReverse = this.get(talent).exclude;
if(excludeReverse) {
for (const e of excludeReverse) {
if (excludeId == e) return talent
}
}
}
return null;