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.96k stars 1.58k forks source link

[BUG] Golden Punch does not trigger twice on moves that hit more than 1 Pokemon. #2467

Open DaltJM opened 2 weeks ago

DaltJM commented 2 weeks ago

Describe the bug

Golden Punch does not trigger twice on moves that hit more than 1 Pokemon. To Reproduce

  1. Ghouldango has 3 Golden Punch and 1 Multi-Hit Lens. 5 Amulet coins active.
  2. Ghouldango uses make it rain in a Double-Battle
  3. Golden Punch triggers on the first instance of damage, but not the second
  4. Multi-Hite Lens triggers
  5. Golden Punch triggers on first instance of damage but not the second.

Expected behavior

Expect that golden punch triggers on all damage instances. Screenshots / Videos image image

Device

Additional context

landwill commented 2 weeks ago

In steps 3 & 5, when you say that Golden Punch is not applied on the second 'instance', is 'second instance' referring to the hit on the second target? Or are you saying that it applied during the initial (non-Multi-Hit Lens) hit of both targets (step 3) but not being applied in step 5?

I ran a simplified test case (using Swift to hit both targets, 1x Golden Punch, 1x Multi-Hit Lens) and nothing struck me as odd about the calculations.

Swift hits the first target for 30 damage (warranting 15 gold) Swift hits the second target for 29 damage (warranting 14 gold) Multi-Hit Lens actives Swift hits the first target for 30 damage (warranting 15 gold) Swift hits the second target for 29 damage (warranting 14 gold)

and the result was 58 gold, which I would have expected.

Happy to help if you can spell out the unexpected behavior for me - I may be misunderstanding a detail here

DaltJM commented 2 weeks ago

Thanks for the reply!

Second instance does mean hitting the second pokemon. A better way to say it would have been 1st instance of damage on the 1st pokemon and the 1st instance of damage in the second pokemon.

I'm now wondering if it's just because the gold for both hits is added as 1 lump sum but the damage numbers show on the screen 1 after the other.

E.g. Use a multi hit move, it hits both targets, 1st pokemon takes damage and shows the damage numbers, the gold for hits on the 1st and premeptively for the 2nd pokemon are added to the gold total. Then the damage to the 2nd pokemon is shown.