1 Star 0 Fork 0

desthon / hsr

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Honkai: Star Rail Warp Simulator

License Repo Size CodeFactor Status Code Standard Trakteer

This project is similar to the Genshin Impact Wish Simulator, I use the same algorithm and most of the code here I copy from there.

Screenshots

Main Banner

Main Banner

Light Cone Banner

Inventory

Bank Data

Inventory

Phonograph

Switch banner

Switch Banner

Shop

Shop

For more preview, please visit the live version at https://hsr.wishsimulator.app


Features

  1. All banner types available ( Starter, Regular, Character and Light Cone Event )
  2. Pity System almost like the real game.
  3. Warp Details for each banner.
  4. Shop section, Serving Gacha Currencies, Top Up function and More,
  5. Bank Data to show all items ( Characters and Light Cones ) that obtained from gacha or purchasement
  6. Different banner type has different Gacha History
  7. Phonograph to select and play musics.
  8. Gacha Milestone Bonus, exchangable to Star Rail Pass at the Shop section.
  9. Shared Pity to the same banner type, User can continuously gacha on different patch without resetting pity.
  10. Pity Counter, User can track their current information of their pity
  11. Site Localization, So I hope this Wish Sim can reach more people even they aren't english speaker.
  12. Mobile Friendly, responsive layout both landscape and portrait orientation.
  13. Screenshot and download wish result as image localy.
  14. Link generator if user want to share their gacha result through internet.
  15. All data will be saved to LocalStorage and indexedDB.

Pity System

I don't know how HoyoVerse's algorithm is, so I tried to create mine as realistic as possible with the following points based on in-game wish details.

In order to get the same experience with the game when doing gacha, I tried to use the following formula for determining the gacha rates according to the current pity

baseRate + ((CurrentPity - HardPity) * additionalRate)

To get the number of additionalRate, I calculated 100% - baseRate and divide it by the difference between HardPity to MaxPity. Check here to see how I implemented it as code

Based on the formula above, it can be concluded that the probability table is as follows:

  1. Probability for 4★ item on Character Event Warp

    • 4★ item guaranteed at 10 roll and promoted 4★ item guaranteed at 20 roll.
    • Base rate to get 4★ item is 5.1%, guaranteed to get 4★ item at pity 10
    Pity 1 2 3 4 5 6 7 8 9 ≥10
    Rate 5.1% 5.1% 5.1% 5.1% 5.1% 5.1% 5.1% 5.1% 52.55% 100%
  2. Probability for 4★ item on Light Cone Event Warp

    • 4★ item guaranteed at 10 roll and promoted 4★ item guaranteed at 20 roll.
    • Base rate to get 4★ item is 6.6%, guaranteed to get 4★ item at pity 10
    Pity 1 2 3 4 5 6 7 8 9 ≥10
    Rate 6.6% 6.6% 6.6% 6.6% 6.6% 6.6% 6.6% 6.6% 53.30% 100%
  3. Light Cone Warp Probability

    • 5★ Item guaranteed at 80 roll and promoted 5★ item guaranteed at 160 roll.
    • Probability to get 5★ item is 0.8%, the rate starts to increase at pity 63 and then guaranteed at pity 80.
    Pity ≤62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 ≥80
    Rate 0.8% 6.31% 11.82% 17.33% 22.84% 28.35% 33.86% 39.38% 44.88% 50.40% 55.91% 61.42% 66.93% 72.44% 77.95% 83.47% 88.98% 94.49% 100%
  4. Character Event and Regular Warp Probability

    • 5★ Item guaranteed at 90 roll and promoted 5★ item guaranteed at 180 roll.
    • Probability to get 5★ item is 0.6%, the rate starts to increase at pity 74 and then guaranteed at pity 90.
    Pity ≤73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 ≥90
    Rate 0.6% 6.45% 12.3% 18.14% 23.99% 29.83% 35.68% 41.53% 47.38% 53.22% 59.07% 64.92% 70.76% 76.61% 82.46% 88.30% 94.15% 100%
  5. When you guaranteed for 5★ and 4★ item at the same time, your next pull priority is 5★ item and 4★ item will appear next at pity 11. For example: On Character Event Banner, you doesn't get 5★ item until pity 89 and your 4★ pity is 9, So your next pull will looks like screenshot below.

    double guaranteed

Development

This app build with Svelte-Kit based on Javascript programming language.

NodeJS 18.x is required!

Once you've cloned this project, install all dependencies with npm install (or pnpm install or yarn). Once all dependencies already installed, then you can start a development server or build for production:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

Before creating a production version of your app, install an adapter for your target environment, then run the command below. As default, this project use Static Adapter

npm run build

Contributing

I'm welcome to all contributors! Feel free to Open New Issue if you find any problem or just want to give any suggestions.

Notes :

The data and assets used for this Project are taken from Hoyo Wiki, HSR Fandom Wiki, Honey Impact, Project Yatta, Hakush and recorded from the game itself with several modification.
Important thing: This App is not affiliated with Hoyoverse, all assets used for this application belongs to HoYoVerse, so if you want to use assets from this repository, please keep in mind to credit them too.

MIT License Copyright (c) 2023 HSR.WishSImulator.App Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Svelte 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/desthon/hsr.git
git@gitee.com:desthon/hsr.git
desthon
hsr
hsr
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891