zenno: categorize tools

This commit is contained in:
2026-06-10 14:03:42 -04:00
parent dc78d51def
commit 75024c7c11
18 changed files with 119 additions and 42 deletions
+5 -6
View File
@@ -1,6 +1,3 @@
import { affinity, lookup } from './data/affinity';
import { uma, type Uma } from './data/uma';
/**
* A legacy, or parents and grandparents.
* Defined as an applicative over generic types to reduce the API surface.
@@ -41,9 +38,9 @@ export interface Veteran {
saddles: number[];
}
function findUma(umas: Uma[], u: number): Uma | null {
return umas.find((v) => v.chara_card_id === u) ?? null;
}
// function findUma(umas: Uma[], u: number): Uma | null {
// return umas.find((v) => v.chara_card_id === u) ?? null;
// }
/**
* Compute individual affinities for a legacy using the global region ruleset.
@@ -51,6 +48,7 @@ function findUma(umas: Uma[], u: number): Uma | null {
* @param legacy Legacy veterans
* @returns Individual affinities
*/
/*
export function globalAffinity(trainee: number, legacy: Legacy<Veteran>): Legacy<number> {
const t = findUma(uma.global, trainee)?.chara_id ?? 0;
const charas = mapLegacy(legacy, (u) => findUma(uma.global, u.uma)?.chara_id ?? 0);
@@ -70,3 +68,4 @@ export function globalAffinity(trainee: number, legacy: Legacy<Veteran>): Legacy
s22,
};
}
*/