Fixes sprites not being downloaded before form change

This commit is contained in:
infinitefusion
2023-11-19 10:27:40 -05:00
parent 6e5f7bbce2
commit 48327a61ff
7 changed files with 15 additions and 6 deletions

View File

@@ -595,10 +595,16 @@ class PokeBattle_Battler
end
end
def ensure_form_has_sprite(pokemon,spriteform_body,spriteform_head)
GameData::Species.sprite_filename(pokemon.dexNum, spriteform_body,spriteform_head)
end
def changeForm(newForm, formChangingSpecies, animation = "UltraBurst2")
spriteform_body = newForm if @pokemon.hasBodyOf?(formChangingSpecies)
spriteform_head = newForm if @pokemon.hasHeadOf?(formChangingSpecies)
ensure_form_has_sprite(@pokemon,spriteform_body,spriteform_head)
if self.isFusion?
current_form_has_custom = customSpriteExists(@pokemon.species)
new_form_has_custom = customSpriteExistsForm(@pokemon.species, spriteform_head, spriteform_body)
@@ -607,7 +613,6 @@ class PokeBattle_Battler
should_change_sprite=true
end
if should_change_sprite
@pokemon.spriteform_body = spriteform_body
@pokemon.spriteform_head = spriteform_head