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.84k stars 1.55k forks source link

[BUG] Metal Burst fails #1816

Open hightowernl opened 3 weeks ago

hightowernl commented 3 weeks ago

Describe the bug

Metal Burst calculates the damage the user took and then double it to the opponent, if the user moves last. I faced an Electabuzz that was faster and used Volt Switch. It switched into Electrode and my Metal Burst failed. It should do damage even if the opponent used a move like Volt Switch or U-Turn. To Reproduce

  1. Face a faster opponent with Volt Switch
  2. Use Metal Burst while the opponent uses Volt Switch
  3. Opponent switches into another Pokemon
  4. See error

Expected behavior

Metal burst should double the damage even when the opponent used a move that switched it out. Screenshots / Videos

Device

PC Additional context

schmidtc1 commented 2 weeks ago

This bug also affects Mirror Coat and Counter, since the target is set to the attacker but the attacker switches out, the move fails instead of redirecting the target to the new opponent.