victory music + various

This commit is contained in:
infinitefusion
2022-06-10 19:10:14 -04:00
parent 5ec61fe6e8
commit 257a2e63fe
21 changed files with 30 additions and 37 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -6,14 +6,16 @@
module Settings module Settings
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format. # The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
GAME_VERSION = '5.0.0' GAME_VERSION = '5.0.0'
GAME_VERSION_NUMBER = "5.0.25.1 - beta" GAME_VERSION_NUMBER = "5.0.26 - beta"
POKERADAR_LIGHT_ANIMATION_RED_ID = 17 POKERADAR_LIGHT_ANIMATION_RED_ID = 17
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18 POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
POKERADAR_HIDDEN_ABILITY_POKE_CHANCE = 32 POKERADAR_HIDDEN_ABILITY_POKE_CHANCE = 32
POKERADAR_BATTERY_STEPS = 0 POKERADAR_BATTERY_STEPS = 0
LEADER_VICTORY_MUSIC="Battle victory leader"
TRAINER_VICTORY_MUSIC="trainer-victory"
WILD_VICTORY_MUSIC="wild-victory"
# #
FUSION_ICON_SPRITE_OFFSET = 10 FUSION_ICON_SPRITE_OFFSET = 10

View File

@@ -25,19 +25,7 @@ def pbGetWildVictoryME
if $PokemonGlobal.nextBattleME if $PokemonGlobal.nextBattleME
return $PokemonGlobal.nextBattleME.clone return $PokemonGlobal.nextBattleME.clone
end end
ret = nil ret = pbStringToAudioFile(Settings::WILD_VICTORY_MUSIC)
if !ret
# Check map metadata
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
music = (map_metadata) ? map_metadata.wild_victory_ME : nil
ret = pbStringToAudioFile(music) if music && music != ""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.wild_victory_ME
ret = pbStringToAudioFile(music) if music && music!=""
end
ret = pbStringToAudioFile("Battle victory") if !ret
ret.name = "../../Audio/ME/"+ret.name ret.name = "../../Audio/ME/"+ret.name
return ret return ret
end end
@@ -124,33 +112,35 @@ def pbGetTrainerBattleBGMFromType(trainertype)
end end
def pbGetTrainerVictoryME(trainer) # can be a Player, NPCTrainer or an array of them def pbGetTrainerVictoryME(trainer) # can be a Player, NPCTrainer or an array of them
begin
if $PokemonGlobal.nextBattleME if $PokemonGlobal.nextBattleME
return $PokemonGlobal.nextBattleME.clone return $PokemonGlobal.nextBattleME.clone
end end
music = nil if trainer.is_a?(Array)
trainerarray = (trainer.is_a?(Array)) ? trainer : [trainer] npcTrainer=trainer[0]
trainerarray.each do |t| else
trainer_type_data = GameData::TrainerType.get(t.trainer_type) npcTrainer=trainer
music = trainer_type_data.victory_ME if trainer_type_data.victory_ME
end end
ret = nil
if music && music!="" if is_gym_leader(npcTrainer)
ret = pbStringToAudioFile(music) ret = pbStringToAudioFile(Settings::LEADER_VICTORY_MUSIC)
else
ret = pbStringToAudioFile(Settings::TRAINER_VICTORY_MUSIC)
end end
if !ret ret.name = "../../Audio/ME/"+ret.name
# Check map metadata return ret
map_metadata = GameData::MapMetadata.try_get($game_map.map_id) rescue
music = (map_metadata) ? map_metadata.trainer_victory_ME : nil ret = pbStringToAudioFile(Settings::TRAINER_VICTORY_MUSIC)
ret = pbStringToAudioFile(music) if music && music != ""
end
if !ret
# Check global metadata
music = GameData::Metadata.get.trainer_victory_ME
if music && music!=""
ret = pbStringToAudioFile(music)
end
end
ret = pbStringToAudioFile("Battle victory") if !ret
ret.name = "../../Audio/ME/"+ret.name ret.name = "../../Audio/ME/"+ret.name
return ret return ret
end end
end
GYM_LEADERS=[:LEADER_Brock,:LEADER_Misty, :LEADER_Surge, :LEADER_Erika, :LEADER_Koga, :LEADER_Sabrina, :LEADER_Blaine,
:LEADER_Giovanni, :ELITEFOUR_Lorelei, :ELITEFOUR_Bruno, :ELITEFOUR_Agatha, :ELITEFOUR_Lance, :CHAMPION,
:LEADER_Whitney, :LEADER_Kurt, :LEADER_Falkner, :LEADER_Clair, :LEADER_Morty, :LEADER_Pryce, :LEADER_Chuck,
:LEADER_Jasmine, :CHAMPION_Sinnoh]
def is_gym_leader(trainer)
return GYM_LEADERS.include?(trainer.trainer_type)
end

View File

@@ -16,6 +16,7 @@ TRUE = true
#Game mode switches #Game mode switches
SWITCH_NEW_GAME_PLUS = 972 SWITCH_NEW_GAME_PLUS = 972
SWITCH_BEAT_MT_SILVER = 918 SWITCH_BEAT_MT_SILVER = 918
BEAT_MT_SILVER = 918 #don't remove this - used in some events
SWITCH_REVERSED_MODE = 47 SWITCH_REVERSED_MODE = 47
SWITCH_GAME_DIFFICULTY_EASY = 665 SWITCH_GAME_DIFFICULTY_EASY = 665
SWITCH_GAME_DIFFICULTY_HARD = 666 SWITCH_GAME_DIFFICULTY_HARD = 666

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.