mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-13 16:06:10 +08:00
Compare commits
11 Commits
b82da6c9a7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f12a147093 | ||
|
|
59a10587a7 | ||
|
|
dd5a003801 | ||
|
|
ddc87ebf40 | ||
|
|
23bcae0b74 | ||
|
|
e075dfc23d | ||
|
|
9088ab0eb1 | ||
|
|
39388c6eaf | ||
|
|
0ce9b0ed02 | ||
|
|
aee4fcf164 | ||
|
|
5c0fe56915 |
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal 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"
|
||||||
Binary file not shown.
Binary file not shown.
@@ -12,8 +12,8 @@
|
|||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"v-transform": "^2.1.1",
|
"v-transform": "^2.2.1",
|
||||||
"vite": "^6.2.5",
|
"vite": "^8.0.3",
|
||||||
"vitest": "^3.1.1"
|
"vitest": "^4.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1382
pnpm-lock.yaml
generated
1382
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -174,7 +174,7 @@ class Life {
|
|||||||
type: this.PropertyTypes.TLT,
|
type: this.PropertyTypes.TLT,
|
||||||
name,
|
name,
|
||||||
grade,
|
grade,
|
||||||
description,
|
description: this.format(description),
|
||||||
})
|
})
|
||||||
if(!effect) continue;
|
if(!effect) continue;
|
||||||
this.#property.effect(effect);
|
this.#property.effect(effect);
|
||||||
@@ -188,8 +188,8 @@ class Life {
|
|||||||
this.#property.effect(effect);
|
this.#property.effect(effect);
|
||||||
const content = {
|
const content = {
|
||||||
type: this.PropertyTypes.EVT,
|
type: this.PropertyTypes.EVT,
|
||||||
description,
|
description: this.format(description),
|
||||||
postEvent,
|
postEvent: postEvent && this.format(postEvent),
|
||||||
grade,
|
grade,
|
||||||
}
|
}
|
||||||
if(next) return [content, this.doEvent(next)].flat();
|
if(next) return [content, this.doEvent(next)].flat();
|
||||||
@@ -245,6 +245,23 @@ class Life {
|
|||||||
return util.getListValuesMap(types.flat(), key => this.#property.get(key));
|
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() {
|
get lastExtendTalent() {
|
||||||
return this.#property.get(this.PropertyTypes.EXT);
|
return this.#property.get(this.PropertyTypes.EXT);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,17 @@ class Talent {
|
|||||||
|
|
||||||
exclude(talents, excludeId) {
|
exclude(talents, excludeId) {
|
||||||
const { exclude } = this.get(excludeId);
|
const { exclude } = this.get(excludeId);
|
||||||
if(!exclude) return null;
|
|
||||||
for(const talent of talents) {
|
for(const talent of talents) {
|
||||||
for(const e of exclude) {
|
if(exclude) {
|
||||||
if(talent == e) return talent;
|
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;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user