Files
blitzkit/src/hooks/useAppliedEquipments.ts
T

12 lines
357 B
TypeScript
Raw Normal View History

2024-04-23 09:57:59 -05:00
import { EquipmentPreset } from '../core/blitzkit/equipmentDefinitions';
2024-02-22 16:41:42 -06:00
import { EquipmentMatrix } from '../stores/duel';
2024-01-21 22:11:01 -06:00
export function useAppliedEquipments(
matrix: EquipmentMatrix,
preset: EquipmentPreset,
) {
const flatMatrix = matrix.flat();
2024-02-22 16:41:42 -06:00
return preset
.flat()
.map((options, index) => options[flatMatrix[index] == 1 ? 1 : 0]);
2024-01-21 22:11:01 -06:00
}