diff --git a/Data/Map001.rxdata b/Data/Map001.rxdata index 7690aa580..9f890695a 100644 Binary files a/Data/Map001.rxdata and b/Data/Map001.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index 8a377201a..df577978c 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb b/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb index 049eb7dfc..37d4395a9 100644 --- a/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb +++ b/Data/Scripts/011_Battle/001_Battler/007_Battler_UseMove.rb @@ -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 diff --git a/Data/Scripts/050_AddOns/FusionSprites.rb b/Data/Scripts/050_AddOns/FusionSprites.rb index 9d2651e4f..9bfd7cdda 100644 --- a/Data/Scripts/050_AddOns/FusionSprites.rb +++ b/Data/Scripts/050_AddOns/FusionSprites.rb @@ -298,7 +298,7 @@ def get_fusion_sprite_path(head_id, body_id, spriteform_body = nil, spriteform_h return local_generated_path if pbResolveBitmap(local_generated_path) #Download generated sprite if nothing else found - autogen_path = download_autogen_sprite(head_id, body_id) + autogen_path = download_autogen_sprite(head_id, body_id,spriteform_body,spriteform_head) return autogen_path if pbResolveBitmap(autogen_path) return Settings::DEFAULT_SPRITE_PATH diff --git a/Data/Scripts/050_AddOns/GeneralUtils.rb b/Data/Scripts/050_AddOns/GeneralUtils.rb index 710e97bf9..9b7d79def 100644 --- a/Data/Scripts/050_AddOns/GeneralUtils.rb +++ b/Data/Scripts/050_AddOns/GeneralUtils.rb @@ -480,7 +480,6 @@ def customSpriteExistsForm(species,form_id_head=nil, form_id_body=nil) spritename += "_" + form_id_body.to_s if form_id_body pathCustom = _INTL("Graphics/CustomBattlers/indexed/{1}/{2}.png", folder, spritename) - return true if pbResolveBitmap(pathCustom) != nil return download_custom_sprite(head, body,form_id_head,form_id_body) != nil end diff --git a/Data/Scripts/050_AddOns/HttpCalls.rb b/Data/Scripts/050_AddOns/HttpCalls.rb index bce596e56..18a7dac32 100644 --- a/Data/Scripts/050_AddOns/HttpCalls.rb +++ b/Data/Scripts/050_AddOns/HttpCalls.rb @@ -81,11 +81,16 @@ def download_sprite(base_path, head_id, body_id, saveLocation = "Graphics/temp", end end -def download_autogen_sprite(head_id, body_id) +def download_autogen_sprite(head_id, body_id,spriteformBody_suffix=nil,spriteformHead_suffix=nil) return nil if $PokemonSystem.download_sprites != 0 - url = Settings::AUTOGEN_SPRITES_REPO_URL + "{1}/{1}.{2}.png" + template_url = Settings::AUTOGEN_SPRITES_REPO_URL + "{1}/{1}.{2}.png" + + head_id = (head_id.to_s) + "_" + spriteformHead_suffix.to_s if spriteformHead_suffix + body_id = (body_id.to_s) + "_" + spriteformBody_suffix.to_s if spriteformBody_suffix + destPath = _INTL("{1}{2}", Settings::BATTLERS_FOLDER, head_id) - sprite = download_sprite(_INTL(url, head_id, body_id), head_id, body_id, destPath) + url = _INTL(template_url, head_id, body_id) + sprite = download_sprite(url, head_id, body_id, destPath) return sprite if sprite return nil end diff --git a/Data/System.rxdata b/Data/System.rxdata index ea02376d6..187213d48 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ