game.expandSkills过滤group中不存在lib.skill的技能

This commit is contained in:
mengxinzxz 2024-02-15 00:54:54 +08:00
parent 2d814d0341
commit fd8bf5e159
1 changed files with 4 additions and 2 deletions

View File

@ -8428,8 +8428,10 @@ export class Game extends Uninstantable {
return skills.addArray(skills.reduce((previousValue, currentValue) => {
const info = get.info(currentValue);
if (info) {
if (Array.isArray(info.group)) previousValue.push(...info.group);
else if (info.group) previousValue.push(info.group);
if (info.group) {
const adds = Array.isArray(info.group) ? info.group : [info.group];
previousValue.push(adds.filter(i => lib.skill[i]));
}
}
else console.log(currentValue);
return previousValue;