diff --git a/hra/logika.py b/hra/logika.py index b365e63..5503b9e 100644 --- a/hra/logika.py +++ b/hra/logika.py @@ -139,12 +139,14 @@ def banan(_: Doba, tym: Tym) -> None: tym.save() if tym.pocet_bananu == 1: print("ALERT: BANÁN!!!") + return (True,) elif tym.pocet_bananu == 1: tym.vi_o_mase = True tym.save() elif tym.pocet_bananu == 0: tym.ovesna_kase += 1 tym.save() + return (True,) get_posible_choices: list[Callable[[Doba, Tym], list[str]]] = [ diff --git a/hra/templates/hra/stanoviste/menza.html b/hra/templates/hra/stanoviste/menza.html index 95c9564..0eb55f4 100644 --- a/hra/templates/hra/stanoviste/menza.html +++ b/hra/templates/hra/stanoviste/menza.html @@ -6,7 +6,7 @@ Dobrou noc. 🌃 {% else %} {% if choice == "Poprosit o banán" %} - {% if tym.pocet_bananu == 1 and tym.ma_platnou_zadost_o_banan or tym.ma_platnou_zadost_o_vege %} + {% if zadosti|length > 0 %}
Na.
{% elif tym.pocet_bananu == 0 %}Na banán nemáte nárok! Tumáte ovesnou kaši.