For example, i have gengar and nidoking in my field, my opponent kill gengar. But by he only have 20hp left. What counts first, Gengar's power, or nidoking's body?
Nidoking's Body occurs first since it immediately follows the attack before you check for KO's. Though, just to be clear, even if Fainting Spell happened first but didn't work, Nidoking's Body would just KO it anyway.