So would Pokemon ranger stop Minior from knocking it'self out?
It won't. Because ranger only removes existing effects, and all effects from attacks that happen AFTER ranger is being played will still count. So because minior damages itself right after it's attack, it can not be stopped by Pokemon Ranger.
Not quite, TotoBoss: you're right about almost everything, including the final conclusion that
Pokémon Ranger won't help
Minior survive. Just in case there is something that can, I want to be precise for the sake of Master Shuckle.
"Cosmosplosion" has an
effect that automatically KO's whatever uses the attack, instead of damaging or even placing damage counters upon that Pokémon. The specific timing is that
Minior KO's itself by the end of Step F* of attacking (as opposed to after its attack). Doesn't change the basis of your reasoning, though;
Pokémon Ranger removes all effects of attacks that
currently reside on both players and their Pokémon, but
Minior doesn't place an effect on either; it has an effect that is done and resolved during Step F.
If Master Shuckle is interested in a
Minior that can survive Cosmosplosion, he'll need to find an effect that blocks the effects of attacks made by your own Pokémon.
*See page 20 of the
Sun & Moon rulebook.