diff options
| author | LeightonGinty <57670831+LeightonGinty@users.noreply.github.com> | 2024-11-17 00:34:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-17 00:34:26 +0000 |
| commit | 1822ae0a07fb8d04099e429afa47f62dfbd17031 (patch) | |
| tree | b47c1140a2a914aa443bd89203d930c0728d566f | |
| parent | 63b690578b51d2058797b4db89502dbb49b15706 (diff) | |
Update alcogotchi.py
Add realistic units per drink selection
| -rw-r--r-- | alcogotchi-server/alcogotchi.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/alcogotchi-server/alcogotchi.py b/alcogotchi-server/alcogotchi.py index 4b2a1c1..6b2d273 100644 --- a/alcogotchi-server/alcogotchi.py +++ b/alcogotchi-server/alcogotchi.py @@ -12,6 +12,7 @@ class Alcogotchi: self.health = 100 self.alco_coin = 100 self.items = {} + self.beverages = {"beer": 2.5, "wine": 3, "whisky": 2, "lemonade": 0} def get_alcogotchi(self): return self.__dict__ @@ -30,7 +31,9 @@ class Alcogotchi: self.items[item] += 1 else: self.items[item] = 1 - def drink(self): + def drink(self, data): + drink_choice = data["drink"] + self.drunk += beverages[drink_choice] if self.last_drunkentime + 60 < time.time(): self.last_drunkentime = time.time() self.drunk += 10 |
