Log inGet started
World

Calculated Odds: Hit Chance and Damage Preview Kit

Branchmain
Branchesmain
Commit4a8911532d

README.md

odds

The pure odds math of forecastKit: Odds.compute(spec) turns an attack (aim, defense, cover, range, flank, height, extra modifiers, damage, armor, crits, graze band, target HP, heal/guaranteed) into a preview with the hit chance, a labelled breakdown of every modifier, crit chance, graze chance, damage, crit damage and graze damage after armor, exact kill chance and expected damage. Odds.resolve(preview, seed) rolls it with an integer hash RNG so the same preview and seed give the same result on every machine, always inside what the preview showed: a hit, a crit, a graze (a roll just above the hit chance, for reduced damage) or a miss. Odds.seed(...) builds a shared seed, Odds.rng(seed) is the raw stream.

No engine calls: safe on a server, in tests, or in any module. Called by game logic and by forecastKit.preview. Full field table in the package README.