diff --git a/models/Avatar.js b/models/Avatar.js index 23453adc..bbf73e74 100644 --- a/models/Avatar.js +++ b/models/Avatar.js @@ -110,7 +110,7 @@ export default class Avatar extends Base { } get costumeSplash () { - return ProfileAvatar.getCostumeSplash(this) + return ProfileAvatar.getCostumeSplash(this, this.game) } get hasDmg () { diff --git a/models/avatar/ProfileAvatar.js b/models/avatar/ProfileAvatar.js index 3d51d844..9f05eec8 100644 --- a/models/avatar/ProfileAvatar.js +++ b/models/avatar/ProfileAvatar.js @@ -52,7 +52,7 @@ const ProfileAvatar = { return true }, - getCostumeSplash (profile) { + getCostumeSplash (profile, game = 'gs') { let { char, name } = profile if (!Cfg.get('costumeSplash', true)) { return char.getImgs(profile._costume).splash @@ -64,10 +64,33 @@ const ProfileAvatar = { return this.char.getImgs(profile._costume).splash } - let nPath = `meta-gs/character/${name}` + let nPath = `meta-${game}/character/${name}` let isSuper = false let talent = profile.talent ? lodash.map(profile.talent, (ds) => ds.original).join('') : '' - if (profile.cons === 6 || ['ACE', 'MAX'].includes(profile.artis?.markClass) || talent === '101010') { + let isGs = game === 'gs' + if (isGs && ( + profile.cons === 6 || + ['ACE', 'MAX'].includes(profile.artis?.markClass) || + talent === '101010' + )) { + isSuper = true + } + + let treeSet = ['101', '102', '103', '201', '202', '203', '204', '205', '206', '207', '208', '209', '210'] + let treeSuper = false + if (!isGs && profile.trees) { + treeSuper = true + lodash.forEach(profile.trees, (tree, idx) => { + if (!tree.includes(treeSet[idx])) { + treeSuper = false + } + }) + } + if (!isGs && ( + profile.cons === 6 || + ['ACE', 'MAX'].includes(profile.artis?.markClass) || + (talent === '6101010' && treeSuper) + )) { isSuper = true } if (isSuper) { diff --git a/models/character/CharImg.js b/models/character/CharImg.js index 2a7b7a85..8be0cc7c 100644 --- a/models/character/CharImg.js +++ b/models/character/CharImg.js @@ -61,7 +61,7 @@ const CharImg = { let ret = [] for (let type of ['webp', 'png']) { if (fs.existsSync(`${rPath}/${imgPath}.${type}`)) { - ret.push(imgPath + '.webp') + ret.push(imgPath + `.${type}`) } } if (fs.existsSync(`${rPath}/${imgPath}`)) {