ker0olos / fable

Fable is a free, open-source gacha bot — a powerful Mudae alternative
https://fable.deno.dev/invite
MIT License
33 stars 24 forks source link

fix(gacha): all media should have the same odds #389

Closed ker0olos closed 5 months ago

ker0olos commented 5 months ago

When search-index was added and made to handle gacha, it incidentally broke the way the pool was previously setup, it was reverted to favor the media with more characters.

This PR fixes this issue by RNG selecting a media first then a character from it.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 40.00000% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 80.60%. Comparing base (a7d4b41) to head (42f1f4c).

Files Patch % Lines
src/tower.ts 0.00% 9 Missing :warning:
src/gacha.ts 72.72% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #389 +/- ## ======================================= Coverage 80.59% 80.60% ======================================= Files 45 45 Lines 12416 12419 +3 Branches 1417 1418 +1 ======================================= + Hits 10007 10010 +3 Misses 2384 2384 Partials 25 25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.