mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-10 09:05:48 +02:00
Work on rob
This commit is contained in:
parent
d46a31a7be
commit
a21eb51e6d
7 changed files with 203 additions and 8 deletions
|
|
@ -1,6 +1,14 @@
|
|||
import math
|
||||
|
||||
__all__ = ["capacity_upgrade_price", "interest_upgrade_price", "rob_upgrade_price"]
|
||||
__all__ = [
|
||||
"capacity_upgrade_price",
|
||||
"interest_upgrade_price",
|
||||
"rob_upgrade_price",
|
||||
"jail_chance",
|
||||
"jail_time",
|
||||
"rob_amount",
|
||||
"rob_chance",
|
||||
]
|
||||
|
||||
|
||||
def interest_upgrade_price(level: int) -> int:
|
||||
|
|
@ -25,3 +33,34 @@ def rob_upgrade_price(level: int) -> int:
|
|||
growth_rate = 1.9
|
||||
|
||||
return math.floor(base_cost * (growth_rate**level))
|
||||
|
||||
|
||||
def jail_chance(level: int) -> float:
|
||||
"""Calculate the chance that you'll end up in jail"""
|
||||
base_chance = 0.35
|
||||
growth_rate = 1.15
|
||||
|
||||
return max(0.0, base_chance - (growth_rate**level))
|
||||
|
||||
|
||||
def jail_time(level: int) -> int:
|
||||
"""Calculate the time in hours you'll have to spend in jail"""
|
||||
base_hours = 2
|
||||
growth_rate = 1.27
|
||||
|
||||
return math.floor(base_hours + growth_rate**level)
|
||||
|
||||
|
||||
def rob_amount(level: int) -> int:
|
||||
"""Calculate the maximum amount of Didier Dinks that you can rob"""
|
||||
base_amount = 250
|
||||
growth_rate = 1.4
|
||||
|
||||
return math.floor(base_amount * (growth_rate**level))
|
||||
|
||||
|
||||
def rob_chance(level: int) -> float:
|
||||
"""Calculate the chances of a robbing attempt being successful"""
|
||||
base_chance = 0.25
|
||||
|
||||
return base_chance + 2.1 * level
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue