mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Created and implemented GameData::Species
This commit is contained in:
@@ -668,10 +668,10 @@ class BattlerFaintAnimation < PokeBattle_Animation
|
||||
# Animation
|
||||
# Play cry
|
||||
delay = 10
|
||||
cry = pbCryFile(batSprite.pkmn)
|
||||
cry = GameData::Species.cry_filename_from_pokemon(batSprite.pkmn)
|
||||
if cry
|
||||
battler.setSE(0,pbCryFile(batSprite.pkmn),nil,75) # 75 is pitch
|
||||
delay = pbCryFrameLength(batSprite.pkmn)*20/Graphics.frame_rate
|
||||
battler.setSE(0, cry, nil, 75) # 75 is pitch
|
||||
delay = GameData::Species.cry_length(batSprite.pkmn) * 20 / Graphics.frame_rate
|
||||
end
|
||||
# Sprite drops down
|
||||
shadow.setVisible(delay,false)
|
||||
|
||||
@@ -540,13 +540,13 @@ class PokemonBattlerSprite < RPG::Sprite
|
||||
@spriteX = p[0]
|
||||
@spriteY = p[1]
|
||||
# Apply metrics
|
||||
pbApplyBattlerMetricsToSprite(self,@index,@pkmn.fSpecies)
|
||||
@pkmn.species_data.apply_metrics_to_sprite(self, @index)
|
||||
end
|
||||
|
||||
def setPokemonBitmap(pkmn,back=false)
|
||||
@pkmn = pkmn
|
||||
@_iconBitmap.dispose if @_iconBitmap
|
||||
@_iconBitmap = pbLoadPokemonBitmap(@pkmn,back)
|
||||
@_iconBitmap = GameData::Species.sprite_bitmap_from_pokemon(@pkmn, back)
|
||||
self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil
|
||||
pbSetPosition
|
||||
end
|
||||
@@ -557,8 +557,7 @@ class PokemonBattlerSprite < RPG::Sprite
|
||||
# @battleAnimations array.
|
||||
def pbPlayIntroAnimation(pictureEx=nil)
|
||||
return if !@pkmn
|
||||
cry = pbCryFile(@pkmn)
|
||||
pbSEPlay(cry) if cry
|
||||
GameData::Species.play_cry_from_pokemon(@pkmn)
|
||||
end
|
||||
|
||||
QUARTER_ANIM_PERIOD = Graphics.frame_rate*3/20
|
||||
@@ -637,13 +636,13 @@ class PokemonBattlerShadowSprite < RPG::Sprite
|
||||
self.x = p[0]
|
||||
self.y = p[1]
|
||||
# Apply metrics
|
||||
pbApplyBattlerMetricsToSprite(self,@index,@pkmn.fSpecies,true)
|
||||
@pkmn.species_data.apply_metrics_to_sprite(self, @index, true)
|
||||
end
|
||||
|
||||
def setPokemonBitmap(pkmn)
|
||||
@pkmn = pkmn
|
||||
@_iconBitmap.dispose if @_iconBitmap
|
||||
@_iconBitmap = pbLoadPokemonShadowBitmap(@pkmn)
|
||||
@_iconBitmap = GameData::Species.shadow_bitmap_from_pokemon(@pkmn)
|
||||
self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil
|
||||
pbSetPosition
|
||||
end
|
||||
|
||||
@@ -323,9 +323,7 @@ class PokeBattle_Scene
|
||||
pkmnSprite.setPokemonBitmap(pkmn,back)
|
||||
shadowSprite.setPokemonBitmap(pkmn)
|
||||
# Set visibility of battler's shadow
|
||||
if shadowSprite && !back
|
||||
shadowSprite.visible = showShadow?(pkmn.fSpecies)
|
||||
end
|
||||
shadowSprite.visible = pkmn.species_data.shows_shadow? if shadowSprite && !back
|
||||
end
|
||||
|
||||
def pbResetMoveIndex(idxBattler)
|
||||
|
||||
Reference in New Issue
Block a user