pokemon cries

This commit is contained in:
infinitefusion
2022-01-01 11:22:08 -05:00
parent a447238b70
commit 1b0577139c
9 changed files with 353 additions and 310 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -200,6 +200,10 @@ module GameData
return pbGetMessage(MessageTypes::Entries, @id_number)
end
def is_fusion
return @id_number > Settings::NB_POKEMON
end
def apply_metrics_to_sprite(sprite, index, shadow = false)
if shadow
if (index & 1) == 1 # Foe Pokémon
@@ -209,7 +213,8 @@ module GameData
if (index & 1) == 0 # Player's Pokémon
sprite.x += @back_sprite_x * 2
sprite.y += (@back_sprite_y * 2) + Settings::BACKSPRITE_POSITION_OFFSET
else # Foe Pokémon
else
# Foe Pokémon
sprite.x += @front_sprite_x * 2
sprite.y += (@front_sprite_y * 2) + Settings::FRONTSPRITE_POSITION_OFFSET
sprite.y -= @front_sprite_altitude * 2
@@ -362,13 +367,15 @@ def pbGetEvolvedFormData(species, exclude_invalid = false)
end
# @deprecated Use {GameData#Species#get_family_evolutions} instead. This alias is slated to be removed in v20.
def pbGetEvolutionFamilyData(species) # Unused
def pbGetEvolutionFamilyData(species)
# Unused
Deprecation.warn_method('pbGetEvolutionFamilyData', 'v20', 'GameData::Species.get(species).get_family_evolutions')
return GameData::Species.get(species).get_family_evolutions
end
# @deprecated Use {GameData#Species#get_previous_species} instead. This alias is slated to be removed in v20.
def pbGetPreviousForm(species) # Unused
def pbGetPreviousForm(species)
# Unused
Deprecation.warn_method('pbGetPreviousForm', 'v20', 'GameData::Species.get(species).get_previous_species')
return GameData::Species.get(species).get_previous_species
end
@@ -380,7 +387,8 @@ def pbGetBabySpecies(species, check_items = false, item1 = nil, item2 = nil)
end
# @deprecated Use {GameData#Species#family_evolutions_have_method?} instead. This alias is slated to be removed in v20.
def pbCheckEvolutionFamilyForMethod(species, method, param = nil) # Unused
def pbCheckEvolutionFamilyForMethod(species, method, param = nil)
# Unused
Deprecation.warn_method('pbCheckEvolutionFamilyForMethod', 'v20', 'GameData::Species.get(species).family_evolutions_have_method?(method)')
return GameData::Species.get(species).family_evolutions_have_method?(method, param)
end

View File

@@ -18,11 +18,16 @@ module GameData
factors.each_with_index do |factor, index|
value = ((i / (2 ** index)) % 2 == 0) ? factor[1] : factor[2]
case factor[0]
when 0 then try_species = value
when 1 then try_form = value
when 2 then try_gender = value
when 3 then try_shadow = value
when 4 then try_subfolder = value # Shininess
when 0 then
try_species = value
when 1 then
try_form = value
when 2 then
try_gender = value
when 3 then
try_shadow = value
when 4 then
try_subfolder = value # Shininess
end
end
# Look for a graphic matching this combination's parameters
@@ -177,6 +182,10 @@ module GameData
def self.check_cry_file(species, form)
species_data = self.get_species_form(species, form)
return nil if species_data.nil?
if species_data.is_fusion
species_data = GameData::Species.get(getHeadID(species_data))
end
if form > 0
ret = sprintf("Cries/%s_%d", species_data.species, form)
return ret if pbResolveAudioSE(ret)

View File

@@ -17,7 +17,7 @@
class HallOfFame_Scene
# When true, all pokémon will be in one line
# When false, all pokémon will be in two lines
SINGLEROW = false
SINGLEROW = true
# Make the pokémon movement ON in hall entry
ANIMATION = true
# Speed in pokémon movement in hall entry. Don't use less than 2!
@@ -88,7 +88,8 @@ class HallOfFame_Scene
@viewport.dispose
end
def slowFadeOut(sprites,exponent) # 2 exponent
def slowFadeOut(sprites, exponent)
# 2 exponent
# To handle values above 8
extraWaitExponent = exponent - 9
exponent = 8 if 8 < exponent
@@ -210,6 +211,9 @@ class HallOfFame_Scene
@sprites["pokemon#{i}"] = PokemonSprite.new(@viewport)
@sprites["pokemon#{i}"].setOffset(PictureOrigin::TopLeft)
@sprites["pokemon#{i}"].setPokemonBitmap(pok)
@sprites["pokemon#{i}"].zoom_x = Settings::BACKRPSPRITE_SCALE
@sprites["pokemon#{i}"].zoom_y = Settings::BACKRPSPRITE_SCALE
# This method doesn't put the exact coordinates
@sprites["pokemon#{i}"].x = xpoint
@sprites["pokemon#{i}"].y = ypoint
@@ -272,6 +276,16 @@ class HallOfFame_Scene
end
end
def getDifficulty
if $game_switches[GAME_DIFFICULTY_EASY]
return "Easy"
elsif $game_switches[GAME_DIFFICULTY_HARD]
return "Hard"
else
return "Normal"
end
end
def writeTrainerData
totalsec = Graphics.frame_count / Graphics.frame_rate
hour = totalsec / 60 / 60
@@ -282,6 +296,7 @@ class HallOfFame_Scene
lefttext += _ISPRINTF("Time<r>{1:02d}:{2:02d}<br>", hour, min)
lefttext += _INTL("Pokédex<r>{1}/{2}<br>",
$Trainer.pokedex.owned_count, $Trainer.pokedex.seen_count)
lefttext += _INTL("Difficulty<r>{1}<br>", getDifficulty())
@sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext)
@sprites["messagebox"].viewport = @viewport
@sprites["messagebox"].width = 192 if @sprites["messagebox"].width < 192
@@ -387,7 +402,8 @@ class HallOfFame_Scene
if @battlerIndex < @hallEntry.size # Preparates the next battler
setPokemonSpritesOpacity(@battlerIndex, OPACITY)
@sprites["overlay"].bitmap.clear
else # Show the welcome message and preparates the trainer
else
# Show the welcome message and preparates the trainer
setPokemonSpritesOpacity(-1)
writeWelcome
(ENTRYWAITTIME * 2 * Graphics.frame_rate / 20).times do

View File

@@ -93,6 +93,8 @@ def getDexNumberForSpecies(species)
dexNum = GameData::Species.get(species).id_number
elsif species.is_a?(Pokemon)
dexNum = GameData::Species.get(species.species).id_number
elsif species.is_a?(GameData::Species)
return species.id_number
else
dexNum = species
end
@@ -142,7 +144,10 @@ def getBodyID(species)
return (dexNum / NB_POKEMON).round
end
def getHeadID(species, bodyId)
def getHeadID(species, bodyId = nil)
if bodyId == nil
bodyId = getBodyID(species)
end
head_dexNum = getDexNumberForSpecies(species)
body_dexNum = getDexNumberForSpecies(bodyId)
calculated_number = (head_dexNum - (body_dexNum * NB_POKEMON)).round

View File

@@ -1317,7 +1317,7 @@ def pbDNASplicing(pokemon, scene, supersplicers = false, superSplicer = false)
typeWindow = drawPokemonType(newid)
if hasCustom§
if hasCustom
previewwindow.picture.pbSetColor(220, 255, 220, 200)
else
previewwindow.picture.pbSetColor(255, 255, 255, 200)
@@ -1407,6 +1407,11 @@ def pbDNASplicing(pokemon, scene, supersplicers = false, superSplicer = false)
end
body_level = poke1.level
head_level = poke2.level
pokemon.exp_gained_since_fused=0
pokemon.exp_when_fused_head=nil
pokemon.exp_when_fused_body=nil
if $Trainer.party.length >= 6
if (keepInParty == 0)
$PokemonStorage.pbStoreCaught(poke2)

Binary file not shown.