Oh yeah, nice catch! Line 23 reads the sprite directly:
var spr = global.monster_data[global.active_monster_party[mon,amp_MONID],mond_SPRITE_BATTLE];
Changing this to
var spr = monster_get_battlesprite(mon);
should do the trick.
I did a quick search to see if there's any more direct reads that needs to be updated, there's a handful of other places where the sprite is read directly instead of using the monster_get_battlesprite script... searching for the string ",mond_SPRITE_BATTLE" (with the comma, but without quotes) should give you all the results so you can just click on them to instantly jump to the line that needs to be updated. You can ignore the starter select / nickname scripts and the moncyclopedia, but you probably want the shrine / terminal scripts, the evolution control, and normal nicknaming updated to use monster_get_battlesprite.