fixes crash when trying to unfuse a triple fusion

This commit is contained in:
infinitefusion
2023-11-14 20:06:51 -05:00
parent ea84f0fe2d
commit 433cb999ff
2 changed files with 5 additions and 5 deletions

View File

@@ -1471,6 +1471,11 @@ def pbFuse(pokemon, poke2, splicer_item)
end end
def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil) def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
if pokemon.species_data.id_number > (NB_POKEMON * NB_POKEMON) + NB_POKEMON #triple fusion
scene.pbDisplay(_INTL("{1} cannot be unfused.", pokemon.name))
return false
end
pokemon.spriteform_body=nil pokemon.spriteform_body=nil
pokemon.spriteform_head=nil pokemon.spriteform_head=nil
@@ -1482,11 +1487,6 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
return false return false
else else
if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be unfused?", pokemon.name)) if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be unfused?", pokemon.name))
if pokemon.species_data.id_number > (NB_POKEMON * NB_POKEMON) + NB_POKEMON #triple fusion
scene.pbDisplay(_INTL("{1} cannot be unfused.", pokemon.name))
return false
end
keepInParty = 0 keepInParty = 0
if $Trainer.party.length >= 6 && !pcPosition if $Trainer.party.length >= 6 && !pcPosition
scene.pbDisplay(_INTL("Your party is full! Keep which Pokémon in party?")) scene.pbDisplay(_INTL("Your party is full! Keep which Pokémon in party?"))

Binary file not shown.