fix: rank performance passive targets by awakened base performance
Publish GitHub Pages output / publish (push) Canceled after 42s
Publish GitHub Pages output / publish (push) Canceled after 42s
This commit is contained in:
@@ -149,7 +149,7 @@ test('조건부 기수 패시브는 복수 소속 멤버도 대상으로 삼는
|
||||
assert.equal(result.passiveTotal, 20);
|
||||
});
|
||||
|
||||
test('지정 인원 능력치 패시브는 해당 능력치가 아닌 전체 파라미터 합계 상위 멤버에게 적용한다', () => {
|
||||
test('지정 인원 퍼포먼스 패시브는 전체 파라미터가 아닌 기본 퍼포먼스 상위 멤버에게 적용한다', () => {
|
||||
const source = {
|
||||
...card('source', '퓨어 타입 2명의 퍼포먼스가 10% UP'),
|
||||
type: '해피'
|
||||
@@ -173,5 +173,46 @@ test('지정 인원 능력치 패시브는 해당 능력치가 아닌 전체 파
|
||||
{ card: card('other', ''), awakening: 0 }
|
||||
]);
|
||||
|
||||
assert.equal(result.passiveTotal, 25);
|
||||
assert.equal(result.passiveTotal, 35);
|
||||
});
|
||||
|
||||
test('2026-09-30 실측 편성은 보드 보정 전 개화 반영 퍼포먼스로 대상을 선정한다', () => {
|
||||
const catalog = JSON.parse(readFileSync(new URL('../data/cards-summary.json', import.meta.url), 'utf8')) as {
|
||||
cards: (UnitPowerCard & { details: { costume: { name: string; description: string } } })[];
|
||||
};
|
||||
const findCard = (id: string) => {
|
||||
const found = catalog.cards.find((entry) => entry.id === id);
|
||||
assert.ok(found, id);
|
||||
return found;
|
||||
};
|
||||
// Effective board stats only; no account backup is retained in this fixture.
|
||||
const commonIds = [
|
||||
'card-00006-5-uniq-0007-00', 'card-00007-5-uniq-0008-00',
|
||||
'card-00032-5-uniq-0026-00', 'card-03005-5-uniq-0084-00'
|
||||
];
|
||||
const commonFlats = [[5460, 5863, 6076], [5572, 5772, 6235], [5572, 5772, 6195], [5592, 5792, 6005]];
|
||||
for (const scenario of [
|
||||
{ id: 'card-03009-5-uniq-0041-00', awakening: 4, flat: [5492, 5692, 6205],
|
||||
expected: { overallPower: 401743, baseParameterTotal: 117966, potentialTotal: 11805,
|
||||
passiveTotal: 47017, outfitTotal: 71524, boardTotal: 123637, memoryTotal: 8442, memberPowerUpTotal: 21352 } },
|
||||
// Flare outranks Fubuki before board bonuses, but trails her after bonuses.
|
||||
{ id: 'card-00021-5-uniq-0017-00', awakening: 2, flat: [4295, 4495, 4873],
|
||||
expected: { overallPower: 393801, baseParameterTotal: 117817, potentialTotal: 11790,
|
||||
passiveTotal: 42530, outfitTotal: 72445, boardTotal: 119865, memoryTotal: 8432, memberPowerUpTotal: 20922 } }
|
||||
]) {
|
||||
const ids = [...commonIds, scenario.id];
|
||||
const awakenings = [5, 4, 5, 5, scenario.awakening];
|
||||
const flats = [...commonFlats, scenario.flat];
|
||||
const members = ids.map((id, index) => ({ card: findCard(id), awakening: awakenings[index] }));
|
||||
const board = {
|
||||
flatByCardId: Object.fromEntries(ids.map((id, index) => [id, {
|
||||
performance: flats[index][0], technique: flats[index][1], sense: flats[index][2]
|
||||
}])),
|
||||
rateByCardId: Object.fromEntries(ids.map((id) => [id, { performance: 28, technique: 28, sense: 28 }]))
|
||||
};
|
||||
for (const order of [members, [...members].reverse()]) {
|
||||
assert.deepEqual(calculateUnitPower(order, findCard('card-04012-5-uniq-0051-00').details.costume, board, 65, 5.74),
|
||||
{ ...scenario.expected, outfitScoreSupportPercent: 0 }, scenario.id);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user