I know I'm likely missing some steps (since I can't find pokepop's full official list of steps) but
declare attack
effects before commencing attack (confusion, smokescreen, etc.)
damage calculation
other effects on attacking pokemon
effects on defending pokemon
place damage
do any other effects
check for KOs, take prizes and replace pokemon
end of turn
in the case of shaymin vs bursting balloon/innards out as others have said, shaymin has dealt its damage and disappeared before damage can be placed on it.