Hello, if this is a bug I believe its pretty game breaking. Essentially, Cresselia uses 'lunar dance' and switches into a full health stakataka, which should I thought use up the lunar dance, similar to how if you use healing wish into a full health pokemon, the healing wish is 'wasted' as nothing is actually healed. HOWEVER, in this replay, after I killed the stakataka, my opponent switched into Alolan-Marowak, which should have died to rocks as it was at 24%, BUT the lunar dance for some reason healed up the marowak, even though it was used on the stakataka multiple turns prior, and I am pretty sure that is not how lunar dance is supposed to work, as its a direct counterpart to healing wish (or so i thought).
https://replay.pokemonshowdown.com/gen8ou-1216136690-w4hxhtqtx5wtvlb3v6gxxfpychbck18pw
This is the replay in which it happens (turn 13 is when the actual lunar dance takes place, and turn 15 is when the alolan-marowak somehow gets healed).
Thanks for your time, I hope im just stupid and thats how lunar dance actually works, but I contacted a moderator in the OU room, and he also said thats its probably a bug, so I think it is indeed a bug.
:)
BUG STATUS: NOT A BUG, Lunar Dance and Healing Wish have new storage mechanics as of Gen 8, as Dawn of Ares says. Lunar Dance also heals prior to Stealth Rock damage, which is why it didn't trigger despite Stakataka losing HP (DaWoblefet)