diff --git a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt index 21ccfe2c7c..d51ae55ddb 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/bottombar/BattleTableHelpers.kt @@ -9,7 +9,6 @@ import com.badlogic.gdx.scenes.scene2d.Touchable import com.badlogic.gdx.scenes.scene2d.actions.Actions import com.badlogic.gdx.scenes.scene2d.actions.FloatAction import com.badlogic.gdx.scenes.scene2d.actions.RelativeTemporalAction -import com.badlogic.gdx.scenes.scene2d.actions.RepeatAction import com.badlogic.gdx.scenes.scene2d.actions.SequenceAction import com.badlogic.gdx.scenes.scene2d.actions.TemporalAction import com.badlogic.gdx.scenes.scene2d.ui.Image @@ -85,8 +84,10 @@ object BattleTableHelpers { var i = 1 while (ImageGetter.imageExists(attackAnimationLocation + i)) { val image = ImageGetter.getImage(attackAnimationLocation + i) + + val defenderParentGroup = defenderActors.first().parent addAction(Actions.run { - defenderActors.first().parent.addActor(image) + defenderParentGroup.addActor(image) }) addAction(Actions.delay(attackAnimationFrameDuration)) addAction(Actions.removeActor(image))