- 67
- Posts
- 12
- Years
- Seen Aug 22, 2024
I can't unterstand, why my trainer pokemon and wild pokemon has different highs, I just changed the BattlerEnemyY in PBS.
![[PokeCommunity.com] Different pokemon heights in wild and trainer battles? [PokeCommunity.com] Different pokemon heights in wild and trainer battles?](https://www11.pic-upload.de/30.05.15/2vte2x9f98s7.png)
# Shows the enemy trainer(s)'s Pokémon being thrown out. It appears at coords
# (@spritex,@spritey), and moves in y to @endspritey where it stays for the rest
# of the battle, i.e. the latter is the more important value.
# Doesn't show the ball itself being thrown.
class PokeballSendOutAnimation
SPRITESTEPS=10
STARTZOOM=0.125
def initialize(sprite,spritehash,pkmn,doublebattle,illusionpoke)
@disposed=false
@ballused=pkmn.pokemon ? pkmn.pokemon.ballused : 0
@PokemonBattlerSprite=sprite
@PokemonBattlerSprite.visible=false
@PokemonBattlerSprite.tone=Tone.new(248,248,248,248)
@PokemonBattlerSprite.y=0
@pokeballsprite=IconSprite.new(0,0,sprite.viewport)
@pokeballsprite.setBitmap(sprintf("Graphics/Pictures/ball%02d",@ballused))
if doublebattle
@spritex=PokeBattle_SceneConstants::FOEBATTLERD1_X if pkmn.index==1
@spritex=PokeBattle_SceneConstants::FOEBATTLERD2_X if pkmn.index==3
else
@spritex=PokeBattle_SceneConstants::FOEBATTLER_X
end
@spritey=0
if doublebattle
@spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR] if pkmn.index==1
@spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR] if pkmn.index==3
else
@spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR]
end
@illusionpoke = illusionpoke #ILLUSION
if illusionpoke != nil #ILLUSION
@spritey+=adjustBattleSpriteY(sprite,illusionpoke.species,pkmn.index,nil,true,illusionpoke.formOffsetY)
else
@spritey+=adjustBattleSpriteY(sprite,pkmn.species,pkmn.index,nil,true,pkmn.formOffsetY)
end #ILLUSION
@endspritey=[COLOR=Red]PokeBattle_SceneConstants::FOEBATTLER_Y[/COLOR]
@spritehash=spritehash
@pokeballsprite.x=@[email protected]/2
@pokeballsprite.y=PokeBattle_SceneConstants::[email protected]/2
@[email protected]+1
@pkmn=pkmn
@shadowX=@spritex
if doublebattle
@shadowY=PokeBattle_SceneConstants::FOEBASED1_Y if pkmn.index==1
@shadowY=PokeBattle_SceneConstants::FOEBASED2_Y if pkmn.index==3
else
@shadowY=PokeBattle_SceneConstants::FOEBASEY
end
if @spritehash["shadow#{@pkmn.index}"] && @spritehash["shadow#{@pkmn.index}"].bitmap!=nil
@shadowX-=@spritehash["shadow#{@pkmn.index}"].bitmap.width/2
@shadowY-=@spritehash["shadow#{@pkmn.index}"].bitmap.height/2
end
if illusionpoke != nil #ILLUSION
@shadowVisible=showShadow?(illusionpoke.species)
else
@shadowVisible=showShadow?(pkmn.species)
end #ILLUSION
@stepspritey=(@spritey-@endspritey)
@zoomstep=(1.0-STARTZOOM)/SPRITESTEPS
@animdone=false
@frame=0
end
# Shows the enemy trainer(s)'s Pokémon being thrown out. It appears at coords
# (@spritex,@spritey), and moves in y to @endspritey where it stays for the rest
# of the battle, i.e. the latter is the more important value.
# Doesn't show the ball itself being thrown.
class PokeballSendOutAnimation
SPRITESTEPS=10
STARTZOOM=0.125
def initialize(sprite,spritehash,pkmn,doublebattle,illusionpoke)
@disposed=false
@ballused=pkmn.pokemon ? pkmn.pokemon.ballused : 0
@PokemonBattlerSprite=sprite
@PokemonBattlerSprite.visible=false
@PokemonBattlerSprite.tone=Tone.new(248,248,248,248)
@PokemonBattlerSprite.y=0
@pokeballsprite=IconSprite.new(0,0,sprite.viewport)
@pokeballsprite.setBitmap(sprintf("Graphics/Pictures/ball%02d",@ballused))
if doublebattle
@spritex=PokeBattle_SceneConstants::FOEBATTLERD1_X if pkmn.index==1
@spritex=PokeBattle_SceneConstants::FOEBATTLERD2_X if pkmn.index==3
else
@spritex=PokeBattle_SceneConstants::FOEBATTLER_X
end
@spritey=0
if doublebattle
@spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR][COLOR=Blue]-150[/COLOR] if pkmn.index==1
@spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR][COLOR=Blue]-150[/COLOR] if pkmn.index==3
else
@spritey=PokeBattle_SceneConstants::[COLOR=Red]FOEBASEY[/COLOR][COLOR=Blue]-150[/COLOR]
end
@illusionpoke = illusionpoke #ILLUSION
if illusionpoke != nil #ILLUSION
@spritey+=adjustBattleSpriteY(sprite,illusionpoke.species,pkmn.index,nil,true,illusionpoke.formOffsetY)
else
@spritey+=adjustBattleSpriteY(sprite,pkmn.species,pkmn.index,nil,true,pkmn.formOffsetY)
end #ILLUSION
@endspritey=[COLOR=Red]PokeBattle_SceneConstants::FOEBATTLER_Y[/COLOR][COLOR=Blue]-150[/COLOR]
@spritehash=spritehash
@pokeballsprite.x=@[email protected]/2
@pokeballsprite.y=PokeBattle_SceneConstants::[email protected]/2
@[email protected]+1
@pkmn=pkmn
@shadowX=@spritex
if doublebattle
@shadowY=PokeBattle_SceneConstants::FOEBASED1_Y if pkmn.index==1
@shadowY=PokeBattle_SceneConstants::FOEBASED2_Y if pkmn.index==3
else
@shadowY=PokeBattle_SceneConstants::FOEBASEY
end
if @spritehash["shadow#{@pkmn.index}"] && @spritehash["shadow#{@pkmn.index}"].bitmap!=nil
@shadowX-=@spritehash["shadow#{@pkmn.index}"].bitmap.width/2
@shadowY-=@spritehash["shadow#{@pkmn.index}"].bitmap.height/2
end
if illusionpoke != nil #ILLUSION
@shadowVisible=showShadow?(illusionpoke.species)
else
@shadowVisible=showShadow?(pkmn.species)
end #ILLUSION
@stepspritey=(@spritey-@endspritey)
@zoomstep=(1.0-STARTZOOM)/SPRITESTEPS
@animdone=false
@frame=0
end