mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-04-08 08:58:55 +08:00
change talent
This commit is contained in:
@@ -53,7 +53,8 @@ const data = {
|
||||
{"min":2001, "judge": "仙体", "grade": 3},
|
||||
],
|
||||
"AGE": [
|
||||
{"judge": "早夭", "grade": 0},
|
||||
{"judge": "胎死腹中", "grade": 0},
|
||||
{"min":1, "judge": "早夭", "grade": 0},
|
||||
{"min":10, "judge": "少年", "grade": 0},
|
||||
{"min":18, "judge": "盛年", "grade": 0},
|
||||
{"min":40, "judge": "中年", "grade": 0},
|
||||
|
||||
@@ -58,12 +58,12 @@ class Life {
|
||||
const result = this.#talent.do(talentId, this.#property);
|
||||
if(!result) continue;
|
||||
this.#triggerTalents.add(talentId);
|
||||
const { effect, name, desctiption, grade } = result;
|
||||
const { effect, name, description, grade } = result;
|
||||
contents.push({
|
||||
type: this.#property.TYPES.TLT,
|
||||
name,
|
||||
grade,
|
||||
desctiption,
|
||||
description,
|
||||
})
|
||||
if(!effect) continue;
|
||||
this.#property.effect(effect);
|
||||
|
||||
@@ -23,12 +23,20 @@ class Property {
|
||||
|
||||
this.#ageData = age;
|
||||
for(const a in age) {
|
||||
age[a].event = age[a].event?.split(',').map(v=>{
|
||||
let { event, talent } = age[a];
|
||||
if(!Array.isArray(event))
|
||||
event = event?.split(',') || [];
|
||||
|
||||
event = event.map(v=>{
|
||||
const value = v.split('*').map(n=>Number(n));
|
||||
if(value.length==1) value.push(1);
|
||||
return value;
|
||||
});
|
||||
age[a].talent = age[a].talent?.split(',').map(v=>Number(v));
|
||||
|
||||
if(!Array.isArray(talent))
|
||||
talent = talent?.split(',') || [];
|
||||
|
||||
talent = talent.map(v=>Number(v));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user