Client Side-Leech Seed and Ally Switch

DaWoblefet

Demonstrably so
is a Battle Simulator Administratoris a Community Leaderis a Top Programmeris a Community Contributoris a Top Researcheris a Top Tiering Contributoris a Social Media Contributor Alumnus
PS Admin
What type of bug are you reporting? Client

What is the bug?
Using Ally Switch after using and Leech Seed on an ally causes the client to break. The Pokemon should sap HP and heal from itself, which it does correctly server-side.

Are you able to replicate it? If so, how?
https://replay.pokemonshowdown.com/gen9doublescustomgame-2247385337 (don't skip turns)

Code:
TypeError: Cannot read properties of null (reading 'sprite')
at https://play.pokemonshowdown.com/data/graphics.js?0.9463435074524507:540:74
at Array.map (<anonymous>)
at BattleScene.runOtherAnim (https://play.pokemonshowdown.com/data/graphics.js?0.9463435074524507:540:49)
at Battle.runMinor (https://play.pokemonshowdown.com/js/battle.js?0.6543269799671527:1720:12)
 
The server doesn't bother sending the source of the damage for self-inflicted damage, but the client is expecting Leech Seed to have both a source and target. I think changing the code to be this.scene.runOtherAnim('leech' as ID, [ofpoke || poke, poke]); should work
 
Back
Top