Fixed GameData::Species.icon_bitmap_from_pokemon causing a crash, fixed trainer intro music not stopping after skipping their battle

This commit is contained in:
Maruno17
2022-06-09 21:05:22 +01:00
parent 49c916e1bb
commit cb2f33d8f6
2 changed files with 9 additions and 2 deletions

View File

@@ -124,7 +124,8 @@ module GameData
return (filename) ? AnimatedBitmap.new(filename).deanimate : nil return (filename) ? AnimatedBitmap.new(filename).deanimate : nil
end end
def self.icon_bitmap(species, form = 0, gender = 0, shiny = false, shadow = false) def self.icon_bitmap(species, form = 0, gender = 0, shiny = false, shadow = false, egg = false)
return self.egg_icon_bitmap(species, form) if egg
filename = self.icon_filename(species, form, gender, shiny, shadow) filename = self.icon_filename(species, form, gender, shiny, shadow)
return (filename) ? AnimatedBitmap.new(filename).deanimate : nil return (filename) ? AnimatedBitmap.new(filename).deanimate : nil
end end

View File

@@ -146,11 +146,17 @@ module BattleCreationHelperMethods
pbMessage(_INTL("SKIPPING BATTLE...")) if trainer_battle && $DEBUG pbMessage(_INTL("SKIPPING BATTLE...")) if trainer_battle && $DEBUG
pbMessage(_INTL("AFTER WINNING...")) if trainer_battle && $player.able_pokemon_count > 0 pbMessage(_INTL("AFTER WINNING...")) if trainer_battle && $player.able_pokemon_count > 0
$game_temp.clear_battle_rules $game_temp.clear_battle_rules
if $game_temp.memorized_bgm && $game_system.is_a?(Game_System)
$game_system.bgm_position = $game_temp.memorized_bgm_position
$game_system.bgm_resume($game_temp.memorized_bgm)
end
$game_temp.memorized_bgm = nil
$game_temp.memorized_bgm_position = 0
$PokemonGlobal.nextBattleBGM = nil $PokemonGlobal.nextBattleBGM = nil
$PokemonGlobal.nextBattleVictoryBGM = nil $PokemonGlobal.nextBattleVictoryBGM = nil
$PokemonGlobal.nextBattleCaptureME = nil $PokemonGlobal.nextBattleCaptureME = nil
$PokemonGlobal.nextBattleBack = nil $PokemonGlobal.nextBattleBack = nil
pbMEStop $PokemonEncounters.reset_step_count
outcome = 1 # Win outcome = 1 # Win
outcome = 0 if trainer_battle && $player.able_pokemon_count == 0 # Undecided outcome = 0 if trainer_battle && $player.able_pokemon_count == 0 # Undecided
pbSet(outcome_variable, outcome) pbSet(outcome_variable, outcome)