Finish up upgrades menu and the upgrade implementations
This commit is contained in:
parent
934f8d6312
commit
2637c09810
1 changed files with 75 additions and 94 deletions
169
game.py
169
game.py
|
@ -20,7 +20,9 @@ def rreplace(s: str, old: str, new: str, occurrence: int) -> str:
|
||||||
|
|
||||||
cur.hide()
|
cur.hide()
|
||||||
clear()
|
clear()
|
||||||
print("Loading Loge City v 0.0.1...")
|
print(
|
||||||
|
"Loading Loge City v 0.0.16..."
|
||||||
|
) # Finally remebered to bump this... I think v16 is right?
|
||||||
sleep(1)
|
sleep(1)
|
||||||
flushPrint("Checking system compatibility...")
|
flushPrint("Checking system compatibility...")
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
@ -100,6 +102,7 @@ if uData["logins"] == 1:
|
||||||
else:
|
else:
|
||||||
print(f"Welcome back to Loge City {un}, we hope you are enjoying your stay.")
|
print(f"Welcome back to Loge City {un}, we hope you are enjoying your stay.")
|
||||||
sleep(2)
|
sleep(2)
|
||||||
|
# LTOP - jump point for me
|
||||||
while 1:
|
while 1:
|
||||||
studsAtTop = uData["studs"]
|
studsAtTop = uData["studs"]
|
||||||
go = menu(
|
go = menu(
|
||||||
|
@ -178,7 +181,10 @@ while 1:
|
||||||
Energy Tanks: {uData["energyTanks"]}
|
Energy Tanks: {uData["energyTanks"]}
|
||||||
Misc Scores:
|
Misc Scores:
|
||||||
Raccoon: {uData["racScore"]}
|
Raccoon: {uData["racScore"]}
|
||||||
Rich: {uData["richScore"]}"""
|
Rich: {uData["richScore"]}
|
||||||
|
Upgrades:
|
||||||
|
Luck: {uData["upgrades"].get("luck", 0)}%
|
||||||
|
Stud Multipiler: {uData["upgrades"].get("studX", 1)}x"""
|
||||||
)
|
)
|
||||||
if uData["debug"] or uData["permissionLevel"] >= 50:
|
if uData["debug"] or uData["permissionLevel"] >= 50:
|
||||||
print(
|
print(
|
||||||
|
@ -198,6 +204,8 @@ while 1:
|
||||||
betHigh = 0 if type(bet) != int else bet
|
betHigh = 0 if type(bet) != int else bet
|
||||||
winnings = 0
|
winnings = 0
|
||||||
betLow = -2 * bet if betHigh else 0
|
betLow = -2 * bet if betHigh else 0
|
||||||
|
if betLow:
|
||||||
|
betLow = min(betLow + (uData["upgrades"].get("luck") * 5), 0)
|
||||||
while betHigh:
|
while betHigh:
|
||||||
winnings = randint(betLow, betHigh)
|
winnings = randint(betLow, betHigh)
|
||||||
if multipleOf(winnings):
|
if multipleOf(winnings):
|
||||||
|
@ -210,13 +218,10 @@ while 1:
|
||||||
print("You won nothing. (You kept your bet though)")
|
print("You won nothing. (You kept your bet though)")
|
||||||
elif winnings == betLow:
|
elif winnings == betLow:
|
||||||
print("You lost your bet!")
|
print("You lost your bet!")
|
||||||
uData["studsLost"] += abs(winnings)
|
|
||||||
elif winnings >= 0:
|
elif winnings >= 0:
|
||||||
print(f"You won {winnings} studs!")
|
print(f"You won {winnings} studs!")
|
||||||
uData["studsGained"] += winnings
|
|
||||||
elif winnings <= 0:
|
elif winnings <= 0:
|
||||||
print(f"You lost {abs(winnings)} studs!")
|
print(f"You lost {abs(winnings)} studs!")
|
||||||
uData["studsLost"] += abs(winnings)
|
|
||||||
else:
|
else:
|
||||||
print("This should be impossible. Cue the panic attacks.")
|
print("This should be impossible. Cue the panic attacks.")
|
||||||
else:
|
else:
|
||||||
|
@ -224,13 +229,14 @@ while 1:
|
||||||
sleep(5)
|
sleep(5)
|
||||||
case 3:
|
case 3:
|
||||||
prices = {
|
prices = {
|
||||||
"studX": 2000000 * pow(10, uData["upgrades"].get("studX", 1) - 1),
|
"studX": 2000000
|
||||||
"houseL": 200 + pow(53 * uData[houseLevel], uData["houseLevel"]),
|
* pow(10, (uData["upgrades"].get("studX", 1) * 10) - 10),
|
||||||
|
"houseL": 199 + pow(53 * uData["houseLevel"], uData["houseLevel"]),
|
||||||
"luck": 500 * pow(10, uData["upgrades"].get("luck", 0) * 2),
|
"luck": 500 * pow(10, uData["upgrades"].get("luck", 0) * 2),
|
||||||
}
|
}
|
||||||
sel = menu(
|
sel = menu(
|
||||||
{
|
{
|
||||||
f"Stud multiplier {uData['upgrades'].get('studX', 1)}x -> {uData['upgrades'].get('studX', 1) + 1}x ({prices['studX']} studs)": "studX",
|
f"Stud multiplier {uData['upgrades'].get('studX', 1)}x -> {uData['upgrades'].get('studX', 1) + 0.1}x ({prices['studX']} studs)": "studX",
|
||||||
f"House level {uData['houseLevel']} -> {uData['houseLevel'] + 1} ({prices['houseL']} studs)": "houseL",
|
f"House level {uData['houseLevel']} -> {uData['houseLevel'] + 1} ({prices['houseL']} studs)": "houseL",
|
||||||
f"Luck (Affects betting) {uData['upgrades'].get('luck', 0)}% -> {uData['upgrades'].get('luck', 0) + 1}% ({prices['luck']} studs)": "luck",
|
f"Luck (Affects betting) {uData['upgrades'].get('luck', 0)}% -> {uData['upgrades'].get('luck', 0) + 1}% ({prices['luck']} studs)": "luck",
|
||||||
"Exit": "E",
|
"Exit": "E",
|
||||||
|
@ -239,30 +245,25 @@ while 1:
|
||||||
)
|
)
|
||||||
match sel:
|
match sel:
|
||||||
case "studX":
|
case "studX":
|
||||||
if uData["studs"] >= price[sel]:
|
if uData["studs"] >= prices[sel]:
|
||||||
uData["studs"] -= price[sel]
|
uData["studs"] -= prices[sel]
|
||||||
uData["studsLost"] += price[sel]
|
uData["upgrades"][sel] = uData["upgrades"].get(sel, 1) + 0.1
|
||||||
uData["upgrades"]["studX"] = (
|
|
||||||
uData["upgrades"].get("studX", 1) + 1
|
|
||||||
)
|
|
||||||
print(
|
print(
|
||||||
"You've upgraded your stud multipler to {uData['upgrades']['studX']}x!"
|
f"You've upgraded your stud multipler to {uData['upgrades'][sel]}x!"
|
||||||
)
|
)
|
||||||
case "houseL":
|
case "houseL":
|
||||||
if uData["studs"] >= price[sel]:
|
if uData["studs"] >= prices[sel]:
|
||||||
uData["studs"] -= price[sel]
|
uData["studs"] -= prices[sel]
|
||||||
uData["studsLost"] += price[sel]
|
|
||||||
uData["houseLevel"] += 1
|
uData["houseLevel"] += 1
|
||||||
print(
|
print(
|
||||||
"You've upgraded your house to level {uData['houseLevel']}!"
|
f"You've upgraded your house to level {uData['houseLevel']}!"
|
||||||
)
|
)
|
||||||
case "luck":
|
case "luck":
|
||||||
if uData["studs"] >= price[sel]:
|
if uData["studs"] >= prices[sel]:
|
||||||
uData["studs"] -= price[sel]
|
uData["studs"] -= prices[sel]
|
||||||
uData["studsLost"] += price[sel]
|
uData["upgrades"][sel] = uData["upgrades"].get(sel, 0) + 1
|
||||||
uData["upgrades"]["luck"] = uData["upgrades"].get("luck", 0) + 1
|
|
||||||
print(
|
print(
|
||||||
"You've upgraded your luck to {uData['upgrades']['luck']}%!"
|
f"You've upgraded your luck to {uData['upgrades'][sel]}%!"
|
||||||
)
|
)
|
||||||
case "E":
|
case "E":
|
||||||
pass
|
pass
|
||||||
|
@ -302,7 +303,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "bike" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "bike" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("bike")
|
uData["vehicles"].append("bike")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a bike!")
|
print("You purchased a bike!")
|
||||||
elif "bike" in uData["vehicles"]:
|
elif "bike" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a bike!")
|
print("Sorry, you already have a bike!")
|
||||||
|
@ -312,7 +312,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "4-wheeler" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "4-wheeler" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("4-wheeler")
|
uData["vehicles"].append("4-wheeler")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a 4-wheeler!")
|
print("You purchased a 4-wheeler!")
|
||||||
elif "4-wheeler" in uData["vehicles"]:
|
elif "4-wheeler" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a 4-wheeler!")
|
print("Sorry, you already have a 4-wheeler!")
|
||||||
|
@ -325,7 +324,6 @@ while 1:
|
||||||
):
|
):
|
||||||
uData["vehicles"].append("old rusty car")
|
uData["vehicles"].append("old rusty car")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased an old rusty car!")
|
print("You purchased an old rusty car!")
|
||||||
elif "old rusty car" in uData["vehicles"]:
|
elif "old rusty car" in uData["vehicles"]:
|
||||||
print("Sorry, you already have an old rusty car!")
|
print("Sorry, you already have an old rusty car!")
|
||||||
|
@ -335,7 +333,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "car" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "car" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("car")
|
uData["vehicles"].append("car")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a car!")
|
print("You purchased a car!")
|
||||||
elif "car" in uData["vehicles"]:
|
elif "car" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a car!")
|
print("Sorry, you already have a car!")
|
||||||
|
@ -345,7 +342,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "minivan" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "minivan" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("minivan")
|
uData["vehicles"].append("minivan")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a minivan!")
|
print("You purchased a minivan!")
|
||||||
elif "minivan" in uData["vehicles"]:
|
elif "minivan" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a minivan!")
|
print("Sorry, you already have a minivan!")
|
||||||
|
@ -355,7 +351,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "van" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "van" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("van")
|
uData["vehicles"].append("van")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a van!")
|
print("You purchased a van!")
|
||||||
elif "van" in uData["vehicles"]:
|
elif "van" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a van!")
|
print("Sorry, you already have a van!")
|
||||||
|
@ -365,7 +360,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "truck" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "truck" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("truck")
|
uData["vehicles"].append("truck")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a truck!")
|
print("You purchased a truck!")
|
||||||
elif "truck" in uData["vehicles"]:
|
elif "truck" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a truck!")
|
print("Sorry, you already have a truck!")
|
||||||
|
@ -375,7 +369,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "food truck" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "food truck" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("food truck")
|
uData["vehicles"].append("food truck")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a food truck!")
|
print("You purchased a food truck!")
|
||||||
elif "food truck" in uData["vehicles"]:
|
elif "food truck" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a food truck!")
|
print("Sorry, you already have a food truck!")
|
||||||
|
@ -385,7 +378,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "semi-truck" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "semi-truck" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("semi-truck")
|
uData["vehicles"].append("semi-truck")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a semi-truck!")
|
print("You purchased a semi-truck!")
|
||||||
elif "semi-truck" in uData["vehicles"]:
|
elif "semi-truck" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a semi-truck!")
|
print("Sorry, you already have a semi-truck!")
|
||||||
|
@ -395,7 +387,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "hover bike" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "hover bike" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("hover bike")
|
uData["vehicles"].append("hover bike")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a hover bike!")
|
print("You purchased a hover bike!")
|
||||||
elif "hover bike" in uData["vehicles"]:
|
elif "hover bike" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a hover bike!")
|
print("Sorry, you already have a hover bike!")
|
||||||
|
@ -405,7 +396,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "hover car" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "hover car" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("hover car")
|
uData["vehicles"].append("hover car")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a hover car!")
|
print("You purchased a hover car!")
|
||||||
elif "hover car" in uData["vehicles"]:
|
elif "hover car" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a hover car!")
|
print("Sorry, you already have a hover car!")
|
||||||
|
@ -415,7 +405,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "hover truck" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "hover truck" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("hover truck")
|
uData["vehicles"].append("hover truck")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a hover truck!")
|
print("You purchased a hover truck!")
|
||||||
elif "hover truck" in uData["vehicles"]:
|
elif "hover truck" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a hover truck!")
|
print("Sorry, you already have a hover truck!")
|
||||||
|
@ -428,7 +417,6 @@ while 1:
|
||||||
):
|
):
|
||||||
uData["vehicles"].append("hover semi-truck")
|
uData["vehicles"].append("hover semi-truck")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a hover semi-truck!")
|
print("You purchased a hover semi-truck!")
|
||||||
elif "hover semi-truck" in uData["vehicles"]:
|
elif "hover semi-truck" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a hover semi-truck!")
|
print("Sorry, you already have a hover semi-truck!")
|
||||||
|
@ -438,7 +426,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "pod racer" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "pod racer" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("pod racer")
|
uData["vehicles"].append("pod racer")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a pod racer!")
|
print("You purchased a pod racer!")
|
||||||
elif "pod racer" in uData["vehicles"]:
|
elif "pod racer" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a pod racer!")
|
print("Sorry, you already have a pod racer!")
|
||||||
|
@ -448,7 +435,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "rocketship" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "rocketship" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("rocketship")
|
uData["vehicles"].append("rocketship")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a rocketship!")
|
print("You purchased a rocketship!")
|
||||||
elif "rocketship" in uData["vehicles"]:
|
elif "rocketship" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a rocketship!")
|
print("Sorry, you already have a rocketship!")
|
||||||
|
@ -458,7 +444,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "spaceship" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "spaceship" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("spaceship")
|
uData["vehicles"].append("spaceship")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a spaceship!")
|
print("You purchased a spaceship!")
|
||||||
elif "spaceship" in uData["vehicles"]:
|
elif "spaceship" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a spaceship!")
|
print("Sorry, you already have a spaceship!")
|
||||||
|
@ -471,7 +456,6 @@ while 1:
|
||||||
):
|
):
|
||||||
uData["vehicles"].append("spaceship with a hyperdrive")
|
uData["vehicles"].append("spaceship with a hyperdrive")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a spaceship with a hyperdrive!")
|
print("You purchased a spaceship with a hyperdrive!")
|
||||||
elif "spaceship with a hyperdrive" in uData["vehicles"]:
|
elif "spaceship with a hyperdrive" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a spaceship with a hyperdrive!")
|
print("Sorry, you already have a spaceship with a hyperdrive!")
|
||||||
|
@ -481,7 +465,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "yacht" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "yacht" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("yacht")
|
uData["vehicles"].append("yacht")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a yacht!")
|
print("You purchased a yacht!")
|
||||||
elif "yacht" in uData["vehicles"]:
|
elif "yacht" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a yacht!")
|
print("Sorry, you already have a yacht!")
|
||||||
|
@ -491,7 +474,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "space yacht" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "space yacht" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("space yacht")
|
uData["vehicles"].append("space yacht")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a space yacht!")
|
print("You purchased a space yacht!")
|
||||||
elif "space yacht" in uData["vehicles"]:
|
elif "space yacht" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a space yacht!")
|
print("Sorry, you already have a space yacht!")
|
||||||
|
@ -501,7 +483,6 @@ while 1:
|
||||||
if sel <= uData["studs"] and "teleporter" not in uData["vehicles"]:
|
if sel <= uData["studs"] and "teleporter" not in uData["vehicles"]:
|
||||||
uData["vehicles"].append("teleporter")
|
uData["vehicles"].append("teleporter")
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
print("You purchased a teleporter!")
|
print("You purchased a teleporter!")
|
||||||
elif "teleporter" in uData["vehicles"]:
|
elif "teleporter" in uData["vehicles"]:
|
||||||
print("Sorry, you already have a teleporter!")
|
print("Sorry, you already have a teleporter!")
|
||||||
|
@ -536,7 +517,6 @@ while 1:
|
||||||
case 250:
|
case 250:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 1
|
uData["richScore"] += 1
|
||||||
if "gold bar" in uData["rare"]:
|
if "gold bar" in uData["rare"]:
|
||||||
uData["rare"]["gold bar"] += 1
|
uData["rare"]["gold bar"] += 1
|
||||||
|
@ -548,7 +528,6 @@ while 1:
|
||||||
case 500:
|
case 500:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 2
|
uData["richScore"] += 2
|
||||||
if "golden cup" in uData["rare"]:
|
if "golden cup" in uData["rare"]:
|
||||||
uData["rare"]["golden cup"] += 1
|
uData["rare"]["golden cup"] += 1
|
||||||
|
@ -560,7 +539,6 @@ while 1:
|
||||||
case 1000:
|
case 1000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 5
|
uData["richScore"] += 5
|
||||||
if "golden plate" in uData["rare"]:
|
if "golden plate" in uData["rare"]:
|
||||||
uData["rare"]["golden plate"] += 1
|
uData["rare"]["golden plate"] += 1
|
||||||
|
@ -572,7 +550,6 @@ while 1:
|
||||||
case 5000:
|
case 5000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 10
|
uData["richScore"] += 10
|
||||||
if "golden table" in uData["rare"]:
|
if "golden table" in uData["rare"]:
|
||||||
uData["rare"]["golden table"] += 1
|
uData["rare"]["golden table"] += 1
|
||||||
|
@ -584,7 +561,6 @@ while 1:
|
||||||
case 250000:
|
case 250000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 20
|
uData["richScore"] += 20
|
||||||
if "crystal" in uData["rare"]:
|
if "crystal" in uData["rare"]:
|
||||||
uData["rare"]["crystal"] += 1
|
uData["rare"]["crystal"] += 1
|
||||||
|
@ -596,7 +572,6 @@ while 1:
|
||||||
case 500000:
|
case 500000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 25
|
uData["richScore"] += 25
|
||||||
if "crystal cup" in uData["rare"]:
|
if "crystal cup" in uData["rare"]:
|
||||||
uData["rare"]["crystal cup"] += 1
|
uData["rare"]["crystal cup"] += 1
|
||||||
|
@ -608,7 +583,6 @@ while 1:
|
||||||
case 1000000:
|
case 1000000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 50
|
uData["richScore"] += 50
|
||||||
if "crystal plate" in uData["rare"]:
|
if "crystal plate" in uData["rare"]:
|
||||||
uData["rare"]["crystal plate"] += 1
|
uData["rare"]["crystal plate"] += 1
|
||||||
|
@ -620,7 +594,6 @@ while 1:
|
||||||
case 5000000:
|
case 5000000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 75
|
uData["richScore"] += 75
|
||||||
if "crystal table" in uData["rare"]:
|
if "crystal table" in uData["rare"]:
|
||||||
uData["rare"]["crystal table"] += 1
|
uData["rare"]["crystal table"] += 1
|
||||||
|
@ -632,7 +605,6 @@ while 1:
|
||||||
case 10000000:
|
case 10000000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 100
|
uData["richScore"] += 100
|
||||||
if "double studded 1x1 plate" in uData["rare"]:
|
if "double studded 1x1 plate" in uData["rare"]:
|
||||||
uData["rare"]["double studded 1x1 plate"] += 1
|
uData["rare"]["double studded 1x1 plate"] += 1
|
||||||
|
@ -644,7 +616,6 @@ while 1:
|
||||||
case 50000000:
|
case 50000000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 125
|
uData["richScore"] += 125
|
||||||
if "double studded 2x2 plate" in uData["rare"]:
|
if "double studded 2x2 plate" in uData["rare"]:
|
||||||
uData["rare"]["double studded 2x2 plate"] += 1
|
uData["rare"]["double studded 2x2 plate"] += 1
|
||||||
|
@ -656,7 +627,6 @@ while 1:
|
||||||
case 100000000:
|
case 100000000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 150
|
uData["richScore"] += 150
|
||||||
if "hinge joint" in uData["rare"]:
|
if "hinge joint" in uData["rare"]:
|
||||||
uData["rare"]["hinge joint"] += 1
|
uData["rare"]["hinge joint"] += 1
|
||||||
|
@ -668,7 +638,6 @@ while 1:
|
||||||
case 500000000:
|
case 500000000:
|
||||||
if sel <= uData["studs"]:
|
if sel <= uData["studs"]:
|
||||||
uData["studs"] -= sel
|
uData["studs"] -= sel
|
||||||
uData["studsLost"] += sel
|
|
||||||
uData["richScore"] += 200
|
uData["richScore"] += 200
|
||||||
if "vault door" in uData["rare"]:
|
if "vault door" in uData["rare"]:
|
||||||
uData["rare"]["vault door"] += 1
|
uData["rare"]["vault door"] += 1
|
||||||
|
@ -705,7 +674,6 @@ while 1:
|
||||||
case 1:
|
case 1:
|
||||||
if price1 <= uData["studs"]:
|
if price1 <= uData["studs"]:
|
||||||
uData["studs"] -= price1
|
uData["studs"] -= price1
|
||||||
uData["studsLost"] += price1
|
|
||||||
uData["energyTanks"] += 1
|
uData["energyTanks"] += 1
|
||||||
print("You bought a single energy tank!")
|
print("You bought a single energy tank!")
|
||||||
else:
|
else:
|
||||||
|
@ -714,7 +682,6 @@ while 1:
|
||||||
case 5:
|
case 5:
|
||||||
if price5 <= uData["studs"]:
|
if price5 <= uData["studs"]:
|
||||||
uData["studs"] -= price5
|
uData["studs"] -= price5
|
||||||
uData["studsLost"] += price5
|
|
||||||
uData["energyTanks"] += 5
|
uData["energyTanks"] += 5
|
||||||
print("You bought 5 energy tanks!")
|
print("You bought 5 energy tanks!")
|
||||||
else:
|
else:
|
||||||
|
@ -723,7 +690,6 @@ while 1:
|
||||||
case 10:
|
case 10:
|
||||||
if price10 <= uData["studs"]:
|
if price10 <= uData["studs"]:
|
||||||
uData["studs"] -= price10
|
uData["studs"] -= price10
|
||||||
uData["studsLost"] += price10
|
|
||||||
uData["energyTanks"] += 10
|
uData["energyTanks"] += 10
|
||||||
print("You bought 10 energy tanks!")
|
print("You bought 10 energy tanks!")
|
||||||
else:
|
else:
|
||||||
|
@ -755,7 +721,15 @@ while 1:
|
||||||
},
|
},
|
||||||
"What would you like to order?",
|
"What would you like to order?",
|
||||||
)
|
)
|
||||||
thing, price, message, weird = ("Nothing", 0, "You bought nothing", True)
|
# Bugfix: rich and raccoon would always go up even if you failed to buy the item
|
||||||
|
thing, price, message, weird, rich, rac = (
|
||||||
|
"Nothing",
|
||||||
|
0,
|
||||||
|
"You bought nothing",
|
||||||
|
True,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
)
|
||||||
match sel:
|
match sel:
|
||||||
case 1:
|
case 1:
|
||||||
thing, price, message, weird = ("a pizza", 5, "delicious!", False)
|
thing, price, message, weird = ("a pizza", 5, "delicious!", False)
|
||||||
|
@ -781,7 +755,7 @@ while 1:
|
||||||
thing = "a can of blueberry"
|
thing = "a can of blueberry"
|
||||||
case 9:
|
case 9:
|
||||||
thing = "a can of rain water"
|
thing = "a can of rain water"
|
||||||
price, message, weird = (
|
price, message, Weird = (
|
||||||
10,
|
10,
|
||||||
"tastes just like you remember it!",
|
"tastes just like you remember it!",
|
||||||
False,
|
False,
|
||||||
|
@ -801,7 +775,8 @@ while 1:
|
||||||
False,
|
False,
|
||||||
)
|
)
|
||||||
case 5:
|
case 5:
|
||||||
thing, price, message, weird = (
|
# Bugfix here down: Don't redundantly set `weird` to `True` again
|
||||||
|
thing, price, message, rac = (
|
||||||
" trash",
|
" trash",
|
||||||
200,
|
200,
|
||||||
(
|
(
|
||||||
|
@ -809,58 +784,51 @@ while 1:
|
||||||
if uData["racScore"] < 10
|
if uData["racScore"] < 10
|
||||||
else "You eagerly consume the trash pile! (+1 raccoon score)"
|
else "You eagerly consume the trash pile! (+1 raccoon score)"
|
||||||
),
|
),
|
||||||
True,
|
1,
|
||||||
)
|
)
|
||||||
uData["racScore"] += 1
|
|
||||||
case 6:
|
case 6:
|
||||||
thing, price, message, weird = (
|
thing, price, message = (
|
||||||
" money",
|
" money",
|
||||||
500,
|
500,
|
||||||
"You literally just eat money. Disgusting.",
|
"You literally just eat money. Disgusting.",
|
||||||
True,
|
|
||||||
)
|
)
|
||||||
case 7:
|
case 7:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich = (
|
||||||
'a "tip"',
|
'a "tip"',
|
||||||
1000,
|
1000,
|
||||||
'You just give the cashier 1000 studs as a "tip". (+1 rich)',
|
'You just give the cashier 1000 studs as a "tip". (+1 rich)',
|
||||||
True,
|
1,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 1
|
|
||||||
case 8:
|
case 8:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich = (
|
||||||
"a golden pizza",
|
"a golden pizza",
|
||||||
5000,
|
5000,
|
||||||
"You add the golden pizza to your home. You can't eat it after all. (+1 rich)",
|
"You add the golden pizza to your home. You can't eat it after all. (+1 rich)",
|
||||||
True,
|
1,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 1
|
|
||||||
case 9:
|
case 9:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich = (
|
||||||
"liquid gold",
|
"liquid gold",
|
||||||
10000,
|
10000,
|
||||||
"You chug the liquid gold. You are in severe pain for at least 20 minutes. (+2 rich)",
|
"You chug the liquid gold. You are in severe pain for at least 20 minutes. (+2 rich)",
|
||||||
True,
|
2,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 2
|
|
||||||
case 10:
|
case 10:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich = (
|
||||||
"golden tacos",
|
"golden tacos",
|
||||||
20000,
|
20000,
|
||||||
"You add the golden tacos to your home. The box was too poor for them. (+5 rich)",
|
"You add the golden tacos to your home. The box was too poor for them. (+5 rich)",
|
||||||
True,
|
5,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 5
|
|
||||||
case 11:
|
case 11:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich = (
|
||||||
"golden doughnuts",
|
"golden doughnuts",
|
||||||
50000,
|
50000,
|
||||||
"You add the golden doughtnuts to your home. Very sophisticated! (+15 rich)",
|
"You add the golden doughtnuts to your home. Very sophisticated! (+15 rich)",
|
||||||
True,
|
15,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 15
|
|
||||||
case 12:
|
case 12:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich, rac = (
|
||||||
"golden trash",
|
"golden trash",
|
||||||
200000,
|
200000,
|
||||||
(
|
(
|
||||||
|
@ -868,26 +836,23 @@ while 1:
|
||||||
if uData["racScore"] < 20
|
if uData["racScore"] < 20
|
||||||
else "You eagerly consume the golden trash pile! (+20 rich, +5 raccoon)"
|
else "You eagerly consume the golden trash pile! (+20 rich, +5 raccoon)"
|
||||||
),
|
),
|
||||||
True,
|
20,
|
||||||
|
5,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 20
|
|
||||||
uData["racScore"] += 5
|
|
||||||
case 13:
|
case 13:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich = (
|
||||||
"5 cubic meters of gold",
|
"5 cubic meters of gold",
|
||||||
500000,
|
500000,
|
||||||
"You EAT 5 cubic meters of gold. I don't even know how you managed that. (+25 rich)",
|
"You EAT 5 cubic meters of gold. I don't even know how you managed that. (+25 rich)",
|
||||||
True,
|
25,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 25
|
|
||||||
case 14:
|
case 14:
|
||||||
thing, price, message, weird = (
|
thing, price, message, rich = (
|
||||||
'a hefty "tip"',
|
'a hefty "tip"',
|
||||||
1000000,
|
1000000,
|
||||||
'You "tip" the cashier a million studs. That\'s just not a tip man. (+30 rich)',
|
'You "tip" the cashier a million studs. That\'s just not a tip man. (+30 rich)',
|
||||||
True,
|
30,
|
||||||
)
|
)
|
||||||
uData["richScore"] += 30 # Bugfix: Missing rich score increment
|
|
||||||
case "E":
|
case "E":
|
||||||
pass
|
pass
|
||||||
case _:
|
case _:
|
||||||
|
@ -895,7 +860,8 @@ while 1:
|
||||||
sleep(5)
|
sleep(5)
|
||||||
if price > 0 and price <= uData["studs"]:
|
if price > 0 and price <= uData["studs"]:
|
||||||
uData["studs"] -= price
|
uData["studs"] -= price
|
||||||
uData["studsLost"] += price
|
uData["richScore"] += rich
|
||||||
|
uData["racScore"] += rac
|
||||||
if not weird:
|
if not weird:
|
||||||
print(
|
print(
|
||||||
f"You {'eat' if sel!=2 else 'drink'} your {thing[2:]}... {message}"
|
f"You {'eat' if sel!=2 else 'drink'} your {thing[2:]}... {message}"
|
||||||
|
@ -993,10 +959,25 @@ while 1:
|
||||||
)
|
)
|
||||||
sleep(60)
|
sleep(60)
|
||||||
clear()
|
clear()
|
||||||
|
# Apply stud multipliers to any earned money after the everything else runs
|
||||||
|
newStuds = studsAtTop - uData["studs"]
|
||||||
|
if newStuds > 0:
|
||||||
|
uData["studs"] += newStuds * uData["upgrades"].get("studX", 1)
|
||||||
|
# If we're gonna have weird stud multipliers, we've gotta round those back to standard increments, and normal rounding isn't enough, since I want the studs to be locked to increments of 5.
|
||||||
if uData["studs"] % 1:
|
if uData["studs"] % 1:
|
||||||
uData["studs"] = round(uData["studs"])
|
uData["studs"] = round(uData["studs"])
|
||||||
while uData["studs"] % 5:
|
if uData["studs"] % 5:
|
||||||
uData["studs"] -= 1
|
if (uData["studs"] + (uData["studs"] % 5)) < (
|
||||||
|
uData["studs"] + (5 - (uData["studs"] % 5))
|
||||||
|
):
|
||||||
|
uData["studs"] -= uData["studs"] % 5
|
||||||
|
else:
|
||||||
|
uData["studs"] += 5 - (uData["studs"] % 5)
|
||||||
|
studsDiff = studsAtTop - uData["studs"]
|
||||||
|
if studsAtTop > 0:
|
||||||
|
uData["studsGained"] += studsDiff
|
||||||
|
else: # Yes, this could be caused if studsDiff is 0. However that's not a concern since it'll just subtract 0.
|
||||||
|
uData["studsLost"] -= studsDiff
|
||||||
if uData["studs"] > uData["highestStuds"]:
|
if uData["studs"] > uData["highestStuds"]:
|
||||||
uData["highestStuds"] = uData["studs"]
|
uData["highestStuds"] = uData["studs"]
|
||||||
db.set(
|
db.set(
|
||||||
|
|
Loading…
Reference in a new issue