From 0c40574e4beee5b8062ba5d1fcc4e94de49b3e0a Mon Sep 17 00:00:00 2001 From: Shadow15510 Date: Sun, 17 Apr 2022 22:43:36 +0200 Subject: [PATCH] Minor fix --- idk/idk_lib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idk/idk_lib.py b/idk/idk_lib.py index 8923107..e702cbe 100644 --- a/idk/idk_lib.py +++ b/idk/idk_lib.py @@ -147,7 +147,7 @@ def fight(stat, opponent_stat, opponent_name): print("{0}. {1} {2}".format(count + 1, spells[spell_id], spells_level[level - 1])) count += 1 spell_choice = get_input() - if spell_choice < 0 or spell_choice > 3: spell_choice = 0 + if spell_choice < 0 or spell_choice > len(stat[7]): spell_choice = 0 spell_choice -= 1 spell_id, level = stat[7][spell_choice][0], stat[7][spell_choice][1] @@ -358,7 +358,7 @@ def spell(data, stat): print(" ============ ") spell_choice = get_input() - if not (1 <= spell_choice <= 3) or spell_choice > len(stat[7]): spell_choice = 0 + if not (1 <= spell_choice <= len(stat[7])): spell_choice = 0 if spell_choice: spell_choice -= 1 spell_id, level = stat[7][spell_choice][0], stat[7][spell_choice][1]