From 31c3e232f27e660b27ee73df75eaf24d2c5b0ae9 Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Sat, 17 Oct 2026 23:28:08 +0200 Subject: [PATCH] Recall sent pokemon at the end of the battle --- game/battle/battle_launcher.gd | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/game/battle/battle_launcher.gd b/game/battle/battle_launcher.gd index 89338de..30448a5 100644 --- a/game/battle/battle_launcher.gd +++ b/game/battle/battle_launcher.gd @@ -86,12 +86,11 @@ func start_encounter(encounter : BattleEncounter, enemy_pos : Vector3, sent : Se await presenter.cleanup() ui.queue_free() - #retour au monde - for node in hidden: - if is_instance_valid(node): node.visible = true + #retour au monde : tous les pokemon sortis rentrent dans leur balle ; l'adversaire du monde reapparait for node in get_tree().get_nodes_in_group(SentPokemon.GROUP): - if node is SentPokemon and node.pokemon != null and node.pokemon.is_fainted(): - node.recall() #un pokemon K.O. est rappele + if node is SentPokemon: node.recall() + for node in hidden: + if is_instance_valid(node) and !(node is SentPokemon): node.visible = true if world_actor != null and is_instance_valid(world_actor): if outcome == Battle.Outcome.PLAYER_WON and encounter.remove_world_actor_on_win: