Missing from _ready():
anim_player.connect("animation_finished", self, "_on_AnimationPlayer_animation_finished")
I believe the following hookup is missing from Battler as well, or you may have done it in a lesson and I overlooked it. I noticed that the battlers were not taking turns, and that the code was getting hung yielding to the animation_finished signals, which I wasn't firing due to missing the signal hookups.
(in the _ready() function of Battler.gd):
battler_anim.connect("animation_finished", self, "_on_BattlerAnim_animation_finished")
It's not missing, but I think it's easy to miss the first instruction due to the lack of a screenshot. In the lesson, we connect the signals via the editor's signals tab.
From the lesson:
In the 2D workspace, connect each animation player nodes’
animation_finishedsignal to BattlerAnim. I connected them both to the same callback function,
And, for the battler:
We should also connect the
animation_finishedsignal to the battler so we can make it available to the action, that will rely on it.