No. No it does not. It’s calculated using the power of the Pokémon that attacked, not the Pokémon you have out when the attack hits.
Source: I finally decided to use Jirachi. I switched into Magikarp and doom desire still did huge damage to Xerneas. (Magikarp is Adamant 31*2).