星铁彩蛋图支持满天赋行迹触发

This commit is contained in:
Aluxes 2024-04-15 16:13:16 +08:00
parent 5a8b8081ed
commit 404b66e79a
No known key found for this signature in database
GPG Key ID: 6696152F9C003087
3 changed files with 28 additions and 5 deletions

View File

@ -110,7 +110,7 @@ export default class Avatar extends Base {
} }
get costumeSplash () { get costumeSplash () {
return ProfileAvatar.getCostumeSplash(this) return ProfileAvatar.getCostumeSplash(this, this.game)
} }
get hasDmg () { get hasDmg () {

View File

@ -52,7 +52,7 @@ const ProfileAvatar = {
return true return true
}, },
getCostumeSplash (profile) { getCostumeSplash (profile, game = 'gs') {
let { char, name } = profile let { char, name } = profile
if (!Cfg.get('costumeSplash', true)) { if (!Cfg.get('costumeSplash', true)) {
return char.getImgs(profile._costume).splash return char.getImgs(profile._costume).splash
@ -64,10 +64,33 @@ const ProfileAvatar = {
return this.char.getImgs(profile._costume).splash return this.char.getImgs(profile._costume).splash
} }
let nPath = `meta-gs/character/${name}` let nPath = `meta-${game}/character/${name}`
let isSuper = false let isSuper = false
let talent = profile.talent ? lodash.map(profile.talent, (ds) => ds.original).join('') : '' 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 isSuper = true
} }
if (isSuper) { if (isSuper) {

View File

@ -61,7 +61,7 @@ const CharImg = {
let ret = [] let ret = []
for (let type of ['webp', 'png']) { for (let type of ['webp', 'png']) {
if (fs.existsSync(`${rPath}/${imgPath}.${type}`)) { if (fs.existsSync(`${rPath}/${imgPath}.${type}`)) {
ret.push(imgPath + '.webp') ret.push(imgPath + `.${type}`)
} }
} }
if (fs.existsSync(`${rPath}/${imgPath}`)) { if (fs.existsSync(`${rPath}/${imgPath}`)) {