Files
Whiskerbound/systems/items.py
2026-04-20 19:32:50 -04:00

33 lines
1.1 KiB
Python

import data.cat
import systems.world
import systems.ui as ui
def item_menu(cat: data.cat.Cat, item):
match item:
case "Food":
match ui.select("Please choose an option", [f"Feed your cat", "Back"]):
case "Feed your cat":
systems.world.feed(cat)
case "Back":
pass
case "Medicine":
match ui.select(
"Please choose an option", [f"Give your cat the medicine", "Back"]
):
case "Give your cat the medicine":
if cat.inventory.get("Medicine", False):
cat.sick = False
cat.fullness = 25.0
cat.inventory["Medicine"] -= 1
print(
f"{cat.name} eats the medicine. {cat.name} is feeling better! They still are hungry though."
)
else:
print("You don't have any medicine!")
case "Back":
pass
case _:
pass