if its Special Attack is equal to or greater than its Attack, the damage will factor in the user's Special Attack and the target's Special Defense.
source