fix: recognize localized GAMERS skill conditions
Publish GitHub Pages output / publish (push) Successful in 47s

This commit is contained in:
2026-09-05 10:13:16 +09:00
parent 44ddf932e8
commit 94984b9387
3 changed files with 17 additions and 2 deletions
+6
View File
@@ -29,6 +29,12 @@ test('복수 소속 멤버는 표기된 각 기수에 모두 속한다', () => {
assert.equal(skillConditionSatisfied('1기생(이)가 1명 이상이면', [fubuki]), true);
});
test('한글 게이머즈 소속은 영문 GAMERS 조건과 일치한다', () => {
const okayu = { type: '해피', generation: 'hololive 게이머즈' };
assert.equal(skillTargetBelongsTo(okayu, 'GAMERS'), true);
assert.equal(skillConditionSatisfied('GAMERS(이)가 2명 이상이면', [okayu, okayu]), true);
});
test('ID 기수는 같은 번호의 JP 기수와 구분한다', () => {
for (const number of [1, 2, 3]) {
const member = { type: '퓨어', generation: `hololive ID ${number}기생` };
+2 -1
View File
@@ -8,13 +8,14 @@ export function plainSkillText(value: string): string {
}
function normalizedGroup(value: string): string {
return value
const normalized = value
.replace(/^hololive\s+/i, '')
.replace(/^(?:EN|DEV_IS)\s+/i, '')
.replace(/\(이\)가$/, '')
.replace(/\s*타입$/, '')
.trim()
.toLowerCase();
return normalized === '게이머즈' ? 'gamers' : normalized;
}
function memberBelongsTo(member: SkillConditionMember, group: string): boolean {