feat: refine builder skill chip flows
This commit is contained in:
@@ -207,7 +207,7 @@ describe('summarizeLoadout', () => {
|
||||
});
|
||||
expect(summary.equippedTalents).toEqual([
|
||||
expect.objectContaining({
|
||||
key: 'chips:chip-set',
|
||||
key: 'chips:chip-set:ability',
|
||||
tier: 1,
|
||||
abilityId: 'ability',
|
||||
description: 'Gain 25% Skill Damage.',
|
||||
@@ -217,6 +217,7 @@ describe('summarizeLoadout', () => {
|
||||
|
||||
it('keeps Skill Chip primaries ability-scoped while adding secondaries to Agent stats', () => {
|
||||
const draft = createDraft();
|
||||
draft.specialization.focusId = 'focus-1';
|
||||
draft.chips[0] = {
|
||||
setId: 'chip-set',
|
||||
quality: 'Superior',
|
||||
@@ -239,11 +240,24 @@ describe('summarizeLoadout', () => {
|
||||
{
|
||||
id: 'chip-set',
|
||||
name: 'Signal',
|
||||
specialization_ability_id: 'ability-1',
|
||||
specialization_ability_id: 'ability-2',
|
||||
compatibleAbilityIds: ['ability-2', 'ability-1'],
|
||||
twoPiece: null,
|
||||
talent: null,
|
||||
},
|
||||
],
|
||||
specializations: [
|
||||
{
|
||||
id: 'specialization-1',
|
||||
focuses: [
|
||||
{
|
||||
id: 'focus-1',
|
||||
abilities: [{ id: 'ability-1' }],
|
||||
nodes: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -272,6 +286,50 @@ describe('summarizeLoadout', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('ignores a shared Skill Chip after its ability link is removed', () => {
|
||||
const draft = createDraft();
|
||||
draft.specialization.focusId = 'focus-1';
|
||||
draft.chips[0] = {
|
||||
setId: 'chip-set',
|
||||
quality: 'Standard',
|
||||
primary: { statId: 'skill-duration', value: 12 },
|
||||
secondary: [],
|
||||
};
|
||||
|
||||
const summary = summarizeLoadout(
|
||||
draft,
|
||||
catalog({
|
||||
attributes: [
|
||||
attribute('skill-duration', 'Skill Duration', { unit: '%' }),
|
||||
],
|
||||
chipSets: [
|
||||
{
|
||||
id: 'chip-set',
|
||||
name: 'Signal',
|
||||
specialization_ability_id: 'ability-2',
|
||||
compatibleAbilityIds: ['ability-2'],
|
||||
twoPiece: null,
|
||||
talent: null,
|
||||
},
|
||||
],
|
||||
specializations: [
|
||||
{
|
||||
id: 'specialization-1',
|
||||
focuses: [
|
||||
{
|
||||
id: 'focus-1',
|
||||
abilities: [{ id: 'ability-1' }],
|
||||
nodes: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}),
|
||||
);
|
||||
|
||||
expect(summary.abilityStats).toEqual([]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[0, 10],
|
||||
[1, 20],
|
||||
|
||||
Reference in New Issue
Block a user