master
Aevann1 2021-09-08 19:21:04 +02:00
parent 74fb1fc49e
commit 4926cb3bcd
1 changed files with 8 additions and 0 deletions

View File

@ -72,6 +72,14 @@ def shop(v):
award["owned_num"] = row['last_award_count'] award["owned_num"] = row['last_award_count']
owned.append(award) owned.append(award)
if v.patron:
for k, v in AWARDS:
if v.patron == 1: AWARDS[k]["price"] = AWARDS[k]["price"]*0.90
elif v.patron == 2: AWARDS[k]["price"] = AWARDS[k]["price"]*0.85
elif v.patron == 3: AWARDS[k]["price"] = AWARDS[k]["price"]*0.80
elif v.patron == 4: AWARDS[k]["price"] = AWARDS[k]["price"]*0.75
else: AWARDS[k]["price"] = AWARDS[k]["price"]*0.70
return render_template("shop.html", owned=owned, awards=list(AWARDS.values()), v=v) return render_template("shop.html", owned=owned, awards=list(AWARDS.values()), v=v)
@app.post("/buy/<award>") @app.post("/buy/<award>")