diff --git a/Data/Scripts/016_Pokemon/002_Pokemon_Forms.rb b/Data/Scripts/016_Pokemon/002_Pokemon_Forms.rb index cef9e2f25..4bc48a0d9 100644 --- a/Data/Scripts/016_Pokemon/002_Pokemon_Forms.rb +++ b/Data/Scripts/016_Pokemon/002_Pokemon_Forms.rb @@ -61,6 +61,7 @@ class PokeBattle_RealBattlePeer # For switching out, including due to fainting, and for the end of battle def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false) + return if !pkmn f = MultipleForms.call("getFormOnLeavingBattle",pkmn,battle,usedInBattle,endBattle) pkmn.form = f if f && pkmn.form!=f pkmn.hp = pkmn.totalhp if pkmn.hp>pkmn.totalhp diff --git a/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb b/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb index de153a00f..0f3e57d33 100644 --- a/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb +++ b/Data/Scripts/017_UI/027_PScreen_HallOfFame.rb @@ -486,7 +486,8 @@ class PokemonGlobalMetadata attr_writer :hallOfFameLastNumber def hallOfFame - return @hallOfFame || [] + @hallOfFame = [] if !@hallOfFame + return @hallOfFame end def hallOfFameLastNumber