From ba46430a4e8179ae24b341ed1bdcd3adf3acead1 Mon Sep 17 00:00:00 2001 From: markojozsef Date: Sun, 11 Oct 2026 16:36:38 +0200 Subject: [PATCH] =?UTF-8?q?Ujra=C3=A9lszt=C5=91=20t=C3=A1rgy=20bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/battle_data.py | 10 +++++----- src/gamestates/battle.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/battle_data.py b/src/battle_data.py index b1f7bcb..42868ad 100644 --- a/src/battle_data.py +++ b/src/battle_data.py @@ -138,17 +138,17 @@ battles = [ "spells": [ [], # Locke [ # Terra - ["Fira", 0, ("Fira", move_fire, True)], - ["Blizzara", 0, ("Blizzara", move_ice, True)], + ["Fira", 0, ("Fira", move_fire, "ene")], + ["Blizzara", 0, ("Blizzara", move_ice, "ene")], ], [ # Celes - ["Fira", 0, ("Fira", move_fire, True)], - ["Blizzara", 0, ("Blizzara", move_ice, True)], + ["Fira", 0, ("Fira", move_fire, "ene")], + ["Blizzara", 0, ("Blizzara", move_ice, "ene")], ], [] # Cyan ], "inventory": [ - ["Phoenix Down",67, ("Phoenix Down", move_phoenix, False)] + ["Phoenix Down",67, ("Phoenix Down", move_phoenix, "all_rev")] ] } ] diff --git a/src/gamestates/battle.py b/src/gamestates/battle.py index 22ef8d2..65f0c5c 100644 --- a/src/gamestates/battle.py +++ b/src/gamestates/battle.py @@ -153,11 +153,11 @@ def open_target_menu(user, aparty, eparty, target_type, on_pick, back): global menu # No selection needed - if target_type == None: + if target_type == "self": on_pick([user]); close_menu(); return - pool = eparty if target_type else aparty - candidates = [c for c in pool if not c.ko] # drop the `not c.ko` for revive items + pool = eparty if target_type in ["ene", "ene_rev"] else aparty + candidates = [c for c in pool if not c.ko] if target_type not in ["ene_rev", "all_rev"] else pool if not candidates: return @@ -213,7 +213,7 @@ def menu_action(data): Damage(166, 0, 0, 0), StatusChange(0, 0, 0), battle_data.anim_default)) - open_target_menu(user, aparty, eparty, "enemy", queue_attack, + open_target_menu(user, aparty, eparty, "ene", queue_attack, lambda *a: open_menu((user, 0, aparty, eparty))) case "magic": open_spell_menu(user, aparty, eparty)