Auswahl für Upgrades + Kaufsystem (mit Linus)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
from upgrades import coin_multiplier, lucky_coin, flip_chance
|
||||
from game import wealth, coin_flip(propability, wealth, coins_per_head, heads_amount, multiplier)
|
||||
|
||||
|
||||
base_lvl_coin_multiplier = coin_multiplier(0.5, 10)
|
||||
base_lvl_flip_chance = flip_chance(10, 0)
|
||||
@@ -32,23 +34,46 @@ def lvl_up_lucky_coin():
|
||||
print(f" LC Cost: {base_lvl_lucky_coin.cost}")
|
||||
print(f" LC Chance: {base_lvl_lucky_coin.chance}")
|
||||
|
||||
def homepage_upgrades():
|
||||
def homepage_upgrades(wealth):
|
||||
while True:
|
||||
answer = input(' Flip Chance: [1]\n Lucky Coin: [2]\n Multiplier: [3]')
|
||||
answer = input(' Flip Chance: [1]\n Lucky Coin: [2]\n Multiplier: [3]\n Zum Game: [4]')
|
||||
try:
|
||||
answer = int(answer)
|
||||
if answer == 1:
|
||||
lvl_up_flip_chance()
|
||||
break
|
||||
if wealth >= base_lvl_flip_chance.cost:
|
||||
lvl_up_flip_chance()
|
||||
wealth -= base_lvl_flip_chance.cost
|
||||
print('Erfolgreich geupgradet. Du hast',wealth, "Coins")
|
||||
break
|
||||
else:
|
||||
print('Du bist zu arm')
|
||||
|
||||
elif answer == 2:
|
||||
lvl_up_lucky_coin()
|
||||
break
|
||||
if wealth >= base_lvl_lucky_coin.cost:
|
||||
lvl_up_lucky_coin()
|
||||
wealth -= base_lvl_lucky_coin.cost
|
||||
print('Erfolgreich geupgradet. Du hast',wealth, "Coins")
|
||||
break
|
||||
else:
|
||||
print('Du bist zu arm')
|
||||
|
||||
elif answer == 3:
|
||||
lvl_up_multiplier()
|
||||
break
|
||||
elif answer not in (1, 2, 3):
|
||||
print('Bitte 1, 2 oder 3!')
|
||||
if wealth >= base_lvl_coin_multiplier.cost:
|
||||
lvl_up_multiplier()
|
||||
wealth -= base_lvl_coin_multiplier.cost
|
||||
print('Erfolgreich geupgradet. Du hast',wealth, "Coins")
|
||||
break
|
||||
else:
|
||||
print('Du bist zu arm')
|
||||
elif answer == 4:
|
||||
coin_flip(propability, wealth, coins_per_head, heads_amount, multiplier)
|
||||
|
||||
|
||||
|
||||
elif answer not in (1, 2, 3, 4):
|
||||
print('Bitte 1, 2, 3 oder 4!')
|
||||
|
||||
except ValueError:
|
||||
print('Nur Zahlen')
|
||||
|
||||
homepage_upgrades()
|
||||
homepage_upgrades(wealth)
|
||||
Reference in New Issue
Block a user