feat: 角色命座

This commit is contained in:
bietiaop 2025-03-01 20:25:03 +08:00
parent 5830178362
commit 73715f015f
12 changed files with 324 additions and 14 deletions

View file

@ -208,6 +208,13 @@ const helpData = [
needSK: false,
commands: ['角色名+天赋[+等级]'],
},
{
title: '角色意象影画图鉴',
desc: '查看角色命座图鉴',
needCK: false,
needSK: false,
commands: ['角色名+命座', '角色名+意象', '角色名+影画'],
},
],
},
{

View file

@ -43,10 +43,15 @@ export class Wiki extends ZZZPlugin {
reg: `${rulePrefix}(.*)天赋(.*)$`,
fnc: 'skills',
},
{
reg: `${rulePrefix}(.*)(意象影画|意象|影画|命座)$`,
fnc: 'cinema',
},
],
});
}
async skills() {
logger.debug('skills');
const reg = new RegExp(`${rulePrefix}(.*)天赋(.*)$`);
const charname = this.e.msg.match(reg)[4];
if (!charname) return false;
@ -94,4 +99,20 @@ export class Wiki extends ZZZPlugin {
};
await this.render('skills/index.html', finalData);
}
async cinema() {
const reg = new RegExp(`${rulePrefix}(.*)(意象影画|意象|影画|命座)$`);
const charname = this.e.msg.match(reg)[4];
if (!charname) return false;
const charData = await getHakushCharacterData(charname);
const cinemaData = charData?.Talent;
if (!cinemaData) {
await this.reply(`未找到${charname}的数据`);
return false;
}
await charData.get_assets();
const finalData = {
charData,
};
await this.render('cinema/index.html', finalData);
}
}