Skip to content

RarityCalculator

Namespace Nfty.Core.Stats in assembly Nfty.Core.

public static class RarityCalculator

Computes the odds a cookbook's weights imply. Distinct from the rarity written into a Set, which counts what was actually minted rather than what was intended.

Remarks

NOTHING HERE IS ROUNDED, AND IT USED TO BE. Every share came out of this class already rounded to two places, which is a DISPLAY decision taken in a data source — and it did real damage at the far end of the scale: a deep book's rare traits all collapsed onto exactly 0, so the ingredient pane could not tell them apart, sorted them arbitrarily (OrderBy is stable, so they kept whatever order they arrived in) and printed each of them as "0%" beside a trait no asset carries. The figures are exact here and RarityText decides what a surface prints, which is the same split SpaceText already makes for the DNA space.

Methods

Compute(LoadedCookBook)

public static RarityReport Compute(LoadedCookBook book);

Computes the odds.

Parameters

  • book (LoadedCookBook) - The book to analyze.

Returns. Per-recipe and per-variant odds.