forked from phenom/healer-man
Release Healer Man 0.1.46
This commit is contained in:
1 parent
f82daf1c13
commit
9ff574ac0b
73 files changed
+33486
-174
No files matched your search
@@ -42,6 +42,14 @@ export function randomTestingBoss(bosses: readonly TestableBoss[], random: () =>
|
||||
return bosses[index];
|
||||
}
|
||||
|
||||
export function anotherRandomTestingBoss(
|
||||
bosses: readonly TestableBoss[],
|
||||
currentKey: string,
|
||||
random: () => number = Math.random,
|
||||
): TestableBoss | null {
|
||||
return randomTestingBoss(bosses.filter((boss) => boss.key !== currentKey), random);
|
||||
}
|
||||
|
||||
function references(value: unknown, ids: ReadonlySet<string>): boolean {
|
||||
if (typeof value === "string") return ids.has(value);
|
||||
if (Array.isArray(value)) return value.some((entry) => references(entry, ids));
|
||||
|
||||
Reference in new issue
Block a user