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

@@ -92,6 +92,14 @@ class Pokemon
# Maximum number of moves a Pokémon can know at once
MAX_MOVES = 4
def self.play_cry(species, form = 0, volume = 90, pitch = 100)
GameData::Species.play_cry_from_species(species, form, volume, pitch)
end
def play_cry(volume = 90, pitch = nil)
GameData::Species.play_cry_from_pokemon(self, volume, pitch)
end
def inspect
str = super.chop
str << format(' %s Lv.%s>', @species, @level.to_s || '???')