last potion value logic fix in scoundrel

This commit is contained in:
Luxferre
2026-06-08 20:05:38 +03:00
parent 2d48a70450
commit 7641516c76
+1 -1
View File
@@ -90,7 +90,7 @@ handle_potion() {
echo 'Already drank a potion here! Discarding...' echo 'Already drank a potion here! Discarding...'
else else
local -i val="$1" local -i val="$1"
((${#room[@]} == 1 && ${#deck[@]} == 0)) && last_potion_val=$val ((${#room[@]} == 0 && ${#deck[@]} == 0)) && last_potion_val=$val
((hp += val)) ((hp += val))
((hp > 20)) && hp=20 ((hp > 20)) && hp=20
drank=1 drank=1