From 74fb1fc49ea446bfefcfcae0a36123a10c363748 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 8 Sep 2021 19:15:53 +0200 Subject: [PATCH] fd --- files/routes/awards.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/files/routes/awards.py b/files/routes/awards.py index 84eca53f4..298988dd6 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -79,6 +79,13 @@ def shop(v): def buy(v, award): if award not in AWARDS: abort(400) price = AWARDS[award]["price"] + if v.patron: + if v.patron == 1: price = price*0.90 + elif v.patron == 2: price = price*0.85 + elif v.patron == 3: price = price*0.80 + elif v.patron == 4: price = price*0.75 + else: price = price*0.70 + if v.coins < price: return {"error": "Not enough coins."}, 400 v.coins -= price g.db.add(v)