Just out of curiosity, does anyone happen to know how damage is calculated in this game?

I know it's the typical atk factored into debuffs and buffs, but i'm asking about the actual formula