fix: recognize localized GAMERS skill conditions
Publish GitHub Pages output / publish (push) Successful in 47s
Publish GitHub Pages output / publish (push) Successful in 47s
This commit is contained in:
@@ -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}기생` };
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user