Added methods Pokemon.play_cry and pkkmn.play_cry

This commit is contained in:
Maruno17
2021-05-09 17:53:05 +01:00
parent 852c924ed6
commit e03e258f6a
11 changed files with 30 additions and 23 deletions

View File

@@ -70,7 +70,7 @@ class IntroEventScene < EventScene
# Play random cry
species_keys = GameData::Species::DATA.keys
species_data = GameData::Species.get(species_keys[rand(species_keys.length)])
GameData::Species.play_cry_from_species(species_data.species, species_data.form)
Pokemon.play_cry(species_data.species, species_data.form)
@pic.moveXY(0, 20, 0, 0) # Adds 20 ticks (1 second) pause
pictureWait
# Fade out

View File

@@ -97,7 +97,7 @@ class PokemonEggHatch_Scene
@sprites["overlay"].opacity=0
# Finish scene
frames = GameData::Species.cry_length(@pokemon)
GameData::Species.play_cry_from_pokemon(@pokemon)
@pokemon.play_cry
updateScene(frames)
pbBGMStop()
pbMEPlay("Evolution success")

View File

@@ -532,7 +532,7 @@ class PokemonEvolutionScene
metaplayer1.play
metaplayer2.play
pbBGMStop
GameData::Species.play_cry_from_pokemon(@pokemon)
@pokemon.play_cry
pbMessageDisplay(@sprites["msgwindow"],
_INTL("\\se[]What? {1} is evolving!\\^",@pokemon.name)) { pbUpdate }
pbMessageWaitForInput(@sprites["msgwindow"],50,true) { pbUpdate }
@@ -569,7 +569,7 @@ class PokemonEvolutionScene
# Play cry of evolved species
frames = GameData::Species.cry_length(@newspecies, @pokemon.form)
pbBGMStop
GameData::Species.play_cry_from_species(@newspecies, @pokemon.form)
Pokemon.play_cry(@newspecies, @pokemon.form)
frames.times do
Graphics.update
pbUpdate

View File

@@ -184,7 +184,7 @@ class PokemonTrade_Scene
def pbTrade
pbBGMStop
GameData::Species.play_cry_from_pokemon(@pokemon)
@pokemon.play_cry
speciesname1=GameData::Species.get(@pokemon.species).name
speciesname2=GameData::Species.get(@pokemon2.species).name
pbMessageDisplay(@sprites["msgwindow"],

View File

@@ -377,7 +377,7 @@ class HallOfFame_Scene
if @battlerIndex<=@hallEntry.size
# If it is a pokémon, write the pokémon text, wait the
# ENTRYWAITTIME and goes to the next battler
GameData::Species.play_cry_from_pokemon(@hallEntry[@battlerIndex - 1])
@hallEntry[@battlerIndex - 1].play_cry
writePokemonData(@hallEntry[@battlerIndex-1])
(ENTRYWAITTIME*Graphics.frame_rate/20).times do
Graphics.update
@@ -432,7 +432,7 @@ class HallOfFame_Scene
createBattlers(false)
end
# Change the pokemon
GameData::Species.play_cry_from_pokemon(@hallEntry[@battlerIndex])
@hallEntry[@battlerIndex].play_cry
setPokemonSpritesOpacity(@battlerIndex,OPACITY)
hallNumber=$PokemonGlobal.hallOfFameLastNumber + @hallIndex -
$PokemonGlobal.hallOfFame.size + 1

View File

@@ -442,7 +442,7 @@ class PokemonPokedexInfo_Scene
end
def pbScene
GameData::Species.play_cry_from_species(@species, @form)
Pokemon.play_cry(@species, @form)
loop do
Graphics.update
Input.update
@@ -450,7 +450,7 @@ class PokemonPokedexInfo_Scene
dorefresh = false
if Input.trigger?(Input::ACTION)
pbSEStop
GameData::Species.play_cry_from_species(@species, @form) if @page == 1
Pokemon.play_cry(@species, @form) if @page == 1
elsif Input.trigger?(Input::BACK)
pbPlayCloseMenuSE
break
@@ -471,7 +471,7 @@ class PokemonPokedexInfo_Scene
pbUpdateDummyPokemon
@available = pbGetAvailableForms
pbSEStop
(@page==1) ? GameData::Species.play_cry_from_species(@species, @form) : pbPlayCursorSE
(@page==1) ? Pokemon.play_cry(@species, @form) : pbPlayCursorSE
dorefresh = true
end
elsif Input.trigger?(Input::DOWN)
@@ -481,7 +481,7 @@ class PokemonPokedexInfo_Scene
pbUpdateDummyPokemon
@available = pbGetAvailableForms
pbSEStop
(@page==1) ? GameData::Species.play_cry_from_species(@species, @form) : pbPlayCursorSE
(@page==1) ? Pokemon.play_cry(@species, @form) : pbPlayCursorSE
dorefresh = true
end
elsif Input.trigger?(Input::LEFT)
@@ -511,14 +511,14 @@ class PokemonPokedexInfo_Scene
end
def pbSceneBrief
GameData::Species.play_cry_from_species(@species, @form)
Pokemon.play_cry(@species, @form)
loop do
Graphics.update
Input.update
pbUpdate
if Input.trigger?(Input::ACTION)
pbSEStop
GameData::Species.play_cry_from_species(@species, @form)
Pokemon.play_cry(@species, @form)
elsif Input.trigger?(Input::BACK)
pbPlayCloseMenuSE
break

View File

@@ -913,7 +913,7 @@ class PokemonSummary_Scene
@sprites["pokemon"].setPokemonBitmap(@pokemon)
@sprites["itemicon"].item = @pokemon.item_id
pbSEStop
GameData::Species.play_cry_from_pokemon(@pokemon)
@pokemon.play_cry
end
def pbMoveSelection
@@ -1250,7 +1250,7 @@ class PokemonSummary_Scene
end
def pbScene
GameData::Species.play_cry_from_pokemon(@pokemon)
@pokemon.play_cry
loop do
Graphics.update
Input.update
@@ -1258,7 +1258,7 @@ class PokemonSummary_Scene
dorefresh = false
if Input.trigger?(Input::ACTION)
pbSEStop
GameData::Species.play_cry_from_pokemon(@pokemon)
@pokemon.play_cry
elsif Input.trigger?(Input::BACK)
pbPlayCloseMenuSE
break