How do i make when a boss finishes its attack it has a resting idle

Im trying to make a boss fight when the boss finishes the set of attacks the boss goes into a resting idle, i tried but the boss would do an idle for like a second.

Something like this?

function Fight()
    -- Code --
    return true
end
function Repose()
    -- Code --
end

Fight()
repeat wait() until Fight() == true
Repose()

I have the top part down so would I just have to do the repeat wait section?