Test der lvl up mechanic (Folke und ich zusammen)
This commit is contained in:
@@ -1,17 +1,35 @@
|
||||
class coin_multiplier(): #Klasse, die das Upgrade darstellt, welches die anzahl des Bonusses beim Kopfwurf veraendert
|
||||
def __init__(self, multiplier:float, cost:int):
|
||||
multiplier = self.multiplier
|
||||
cost = self.cost
|
||||
self.multiplier = multiplier
|
||||
self.cost = cost
|
||||
|
||||
class flip_chance(): #Upgrade, welches die Chance auf kopf veraendert
|
||||
def __init__(self, chance: int, cost: int):
|
||||
chance = self.chance
|
||||
cost = self.cost
|
||||
def __init__(self, chance:int, cost:int):
|
||||
self.chance = chance
|
||||
self.cost = cost
|
||||
|
||||
class lucky_coin(): #Upgrade, welches festlegt wie hoch die Wahrscheinlichkeit auf einen LuckyCoin (Jackpot) ist
|
||||
def __init__(self, chance:float, cost:int):
|
||||
chance = self.lucky_chance
|
||||
cost = self.cost
|
||||
self.chance = chance
|
||||
self.cost = cost
|
||||
|
||||
|
||||
|
||||
base_lvl_coin_multiplier = coin_multiplier(0.5, 10)
|
||||
|
||||
def lvl_up():
|
||||
lvl_up = True
|
||||
|
||||
if lvl_up == True:
|
||||
base_lvl_coin_multiplier.cost *= 2.5
|
||||
base_lvl_coin_multiplier.multiplier *= 5
|
||||
print(base_lvl_coin_multiplier.cost)
|
||||
|
||||
lvl_up()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Alle Upgrades inklusive Werten und kosten von Level 1 bis 10
|
||||
coin_multiplier_lvl1 = coin_multiplier(0.5,0)
|
||||
|
||||
Reference in New Issue
Block a user