A simple package for game and anime gacha calculations
Project description
chai_gacha
A powerful and easy-to-use Python package for calculating gacha drop rates, soft pity mechanics, and currency planning for your favorite anime games.
Installation
You can install this package via pip:
pip install chai_gacha
Features and Usage
Here are the main functions available in this package:
1. Pity Rate Calculator
Calculate the exact probability of getting at least one rare item after N pulls.
import chai_gacha
# Calculate chance of getting an SSR (1% drop rate) in 50 pulls
chance = chai_gacha.calculate_pity_rate(0.01, 50)
print(f"Chance to get SSR: {chance}%")
2. Soft Pity Drop Rate
Check the exact drop rate at a specific pull, factoring in soft pity mechanics.
import chai_gacha
base_rate = 0.006 # 0.6% base rate
soft_pity = 74 # Soft pity starts at pull 74
hard_pity = 90 # Guaranteed at pull 90
current_pull = 75
# Calculate rate for pull number 75
rate = chai_gacha.calculate_current_pull_rate(current_pull, base_rate, soft_pity, hard_pity)
print(f"Drop rate at pull 75: {rate}%")
3. Currency Planner
Plan your premium currency for the upcoming banners.
import chai_gacha
my_gems = 10000
pull_cost = 160
hard_pity = 90
# Check how many pulls you can do
pulls = chai_gacha.convert_currency_to_pulls(my_gems, pull_cost)
# Calculate max gems needed if you lose the 50/50
max_gems_needed = chai_gacha.calculate_max_currency_needed(hard_pity, pull_cost, is_guaranteed_next=False)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chai_gacha-0.0.2.tar.gz.
File metadata
- Download URL: chai_gacha-0.0.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34d480ba377b175a0fa33b7aa188a3a88432d60b52e629b7c3870504c5eda825
|
|
| MD5 |
32077d4a14c4f299a94d3a2d0703fb48
|
|
| BLAKE2b-256 |
b303c638a4e1b45ca72bfc346d555ec89e91539ac6c014401dc59d8c4265c02f
|
File details
Details for the file chai_gacha-0.0.2-py3-none-any.whl.
File metadata
- Download URL: chai_gacha-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9ae6ed7239386e6f38ccb9b5e6c3583c80f58a27ee8f2c37dcf42c387cb61d7
|
|
| MD5 |
847eae33daa9617f9d1f5edd49b71747
|
|
| BLAKE2b-256 |
28596082c371ca7e08a7ba0a7dbbe0af414c1289f425c1122e586834cabaa369
|