forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
8a98797fcf
commit
11934a3979
44 files changed
+3183
-329
No files matched your search
@@ -0,0 +1,9 @@
|
||||
/** A run id selects one stable boss for saves and every member of a shared party. */
|
||||
export function seededBossIndex(seed: string, candidateCount: number): number {
|
||||
let hash = 0x811c9dc5;
|
||||
for (let index = 0; index < seed.length; index += 1) {
|
||||
hash ^= seed.charCodeAt(index);
|
||||
hash = Math.imul(hash, 0x01000193);
|
||||
}
|
||||
return (hash >>> 0) % candidateCount;
|
||||
}
|
||||
Reference in new issue
Block a user