Recall sent pokemon at the end of the battle
This commit is contained in:
parent
250976d170
commit
31c3e232f2
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue