fix: apply both solo bonuses to FUWAMOCO songs
Publish GitHub Pages output / publish (push) Successful in 49s
Publish GitHub Pages output / publish (push) Successful in 49s
This commit is contained in:
@@ -75,10 +75,14 @@ function songBonusApplies(effect: BoardEffect, ownerId: string, song?: BoardEffe
|
||||
if (!effect.id) return false;
|
||||
const expectedType = effect.id.match(/music_singer_type-(all|group|solo)/)?.[1];
|
||||
if (expectedType === 'all') return true;
|
||||
if (!song || expectedType !== song.singerType) return false;
|
||||
if (!song) return false;
|
||||
const singers = song.singerCharacterIds ?? [];
|
||||
// FUWAMOCO-only songs count as solo songs for both sisters.
|
||||
const isFuwamoco = singers.length === 2 && singers.includes('chr-04016') && singers.includes('chr-04017');
|
||||
const singerType = isFuwamoco ? 'solo' : song.singerType;
|
||||
if (expectedType !== singerType) return false;
|
||||
if (effect.id.endsWith('-fuwamoko')) {
|
||||
return singers.length === 2 && singers.includes('chr-04016') && singers.includes('chr-04017');
|
||||
return isFuwamoco && singers.includes(ownerId);
|
||||
}
|
||||
return singers.includes(ownerId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user