pagefaultgames / pokerogue

A browser based Pokémon fangame heavily inspired by the roguelite genre.
https://pokerogue.net
GNU Affero General Public License v3.0
3.89k stars 1.56k forks source link

[BUG] Triple PSN/BRN damage with Toxic/Flame Orb + Lum Berry #1720

Open hightowernl opened 1 month ago

hightowernl commented 1 month ago

Describe the bug

With a Toxic/Burn Orb + Lum Berry on your Pokemon you will take damage, end the turn and take damage again, heal the status with a Lum Berry, only to activate the condition again and take another hit of burn/psn. So 3x damage instead of 0. To Reproduce

  1. Have a toxic orb or flame orb
  2. Have a lum berry
  3. battle as usual, notice you get damage from the orb, the turn ends, you get cured and immediately get brn/toxic again and take damage again.

Expected behavior

Expected to only take damage after the turn ends IF there is no Lum Berry. Screenshots / Videos

https://github.com/pagefaultgames/pokerogue/assets/57909502/62401630-bfc6-43e0-8549-cdded259844b Device

PC

Additional context

hightowernl commented 1 month ago

Got confused by my own video that started at the end of a turn...

When the turn ended my Toxic Orb activated and I took damage. The PSN didn't heal with my Lum berry because Lum berry activates before the Toxic Orb activates in this game (bug)

I took damage on the 2nd turn, then heal the PSN, got PSN again and took damage from it.

Current priority is: Use Lum Berry (if holding one) Activate Orb Take PSN/BRN damage

Priority should be: Activate Orb Use Lum Berry (if holding one) Take BRN/PSN damage (if there is a BRN/PSN)

RNGezeus commented 1 month ago

The issue here is of a bit higher elevation since Tox/Flame orb are supposed to be activated last after any Status cure from abilities and status damage step. Presumable also before item cure step but this cant be tested in official scenario

https://bulbapedia.bulbagarden.net/wiki/Flame_Orb https://bulbapedia.bulbagarden.net/wiki/Toxic_Orb "The Toxic Orb activates after the Pokémon would take damage from poison, so it does not take poison damage the turn it is poisoned by the Toxic Orb."

Priority to replicate it would be Use Lum Berry (if holding one) Take BRN/PSN damage (if there is a BRN/PSN) Activate Orb