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

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!
@@ -39,42 +39,42 @@ class HallOfFame_Scene
FINALFADESPEED = 16
# Sprites opacity value when them aren't selected
OPACITY = 64
BASECOLOR = Color.new(248,248,248)
SHADOWCOLOR = Color.new(0,0,0)
BASECOLOR = Color.new(248, 248, 248)
SHADOWCOLOR = Color.new(0, 0, 0)
# Placement for pokemon icons
def pbStartScene
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width, Graphics.height)
@viewport.z=99999
@sprites = {}
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@viewport.z = 99999
# Comment the below line to doesn't use a background
addBackgroundPlane(@sprites,"bg","hallfamebg",@viewport)
@sprites["hallbars"]=IconSprite.new(@viewport)
addBackgroundPlane(@sprites, "bg", "hallfamebg", @viewport)
@sprites["hallbars"] = IconSprite.new(@viewport)
@sprites["hallbars"].setBitmap("Graphics/Pictures/hallfamebars")
@sprites["overlay"]=BitmapSprite.new(Graphics.width,Graphics.height,@viewport)
@sprites["overlay"].z=10
@sprites["overlay"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
@sprites["overlay"].z = 10
pbSetSystemFont(@sprites["overlay"].bitmap)
@alreadyFadedInEnd=false
@useMusic=false
@battlerIndex=0
@hallEntry=[]
@alreadyFadedInEnd = false
@useMusic = false
@battlerIndex = 0
@hallEntry = []
end
def pbStartSceneEntry
pbStartScene
@useMusic=(ENTRYMUSIC && ENTRYMUSIC!="")
@useMusic = (ENTRYMUSIC && ENTRYMUSIC != "")
pbBGMPlay(ENTRYMUSIC) if @useMusic
saveHallEntry
@xmovement=[]
@ymovement=[]
@xmovement = []
@ymovement = []
createBattlers
pbFadeInAndShow(@sprites) { pbUpdate }
end
def pbStartScenePC
pbStartScene
@hallIndex=$PokemonGlobal.hallOfFame.size-1
@hallEntry=$PokemonGlobal.hallOfFame[-1]
@hallIndex = $PokemonGlobal.hallOfFame.size - 1
@hallEntry = $PokemonGlobal.hallOfFame[-1]
createBattlers(false)
pbFadeInAndShow(@sprites) { pbUpdate }
pbUpdatePC
@@ -88,35 +88,36 @@ 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
max=2**exponent
speed=(2**8)/max
extraWaitExponent = exponent - 9
exponent = 8 if 8 < exponent
max = 2 ** exponent
speed = (2 ** 8) / max
for j in 0..max
if extraWaitExponent>-1
(2**extraWaitExponent).times do
if extraWaitExponent > -1
(2 ** extraWaitExponent).times do
Graphics.update
Input.update
pbUpdate
end
end
pbSetSpritesToColor(sprites,Color.new(0,0,0,j*speed))
pbSetSpritesToColor(sprites, Color.new(0, 0, 0, j * speed))
block_given? ? yield : pbUpdateSpriteHash(sprites)
end
end
# Dispose the sprite if the sprite exists and make it null
def restartSpritePosition(sprites,spritename)
def restartSpritePosition(sprites, spritename)
sprites[spritename].dispose if sprites.include?(spritename) && sprites[spritename]
sprites[spritename]=nil
sprites[spritename] = nil
end
# Change the pokémon sprites opacity except the index one
def setPokemonSpritesOpacity(index,opacity=255)
def setPokemonSpritesOpacity(index, opacity = 255)
for n in 0...@hallEntry.size
@sprites["pokemon#{n}"].opacity=(n==index) ? 255 : opacity if @sprites["pokemon#{n}"]
@sprites["pokemon#{n}"].opacity = (n == index) ? 255 : opacity if @sprites["pokemon#{n}"]
end
end
@@ -127,142 +128,145 @@ class HallOfFame_Scene
end
# Update the global variables
$PokemonGlobal.hallOfFame.push(@hallEntry)
$PokemonGlobal.hallOfFameLastNumber+=1
$PokemonGlobal.hallOfFame.delete_at(0) if HALLLIMIT>-1 &&
$PokemonGlobal.hallOfFame.size>HALLLIMIT
$PokemonGlobal.hallOfFameLastNumber += 1
$PokemonGlobal.hallOfFame.delete_at(0) if HALLLIMIT > -1 &&
$PokemonGlobal.hallOfFame.size > HALLLIMIT
end
# Return the x/y point position in screen for battler index number
# Don't use odd numbers!
def xpointformula(battlernumber)
ret=0
ret = 0
if !SINGLEROW
ret=32+160*xpositionformula(battlernumber)
ret = 32 + 160 * xpositionformula(battlernumber)
else
ret=(60*(battlernumber/2)+48)*(xpositionformula(battlernumber)-1)
ret+=Graphics.width/2-56
ret = (60 * (battlernumber / 2) + 48) * (xpositionformula(battlernumber) - 1)
ret += Graphics.width / 2 - 56
end
return ret
end
def ypointformula(battlernumber)
ret=0
ret = 0
if !SINGLEROW
ret=32+128*ypositionformula(battlernumber)/2
ret = 32 + 128 * ypositionformula(battlernumber) / 2
else
ret=96-8*(battlernumber/2)
ret = 96 - 8 * (battlernumber / 2)
end
return ret
end
# Returns 0, 1 or 2 as the x/y column value
def xpositionformula(battlernumber)
ret=0
ret = 0
if !SINGLEROW
ret=(battlernumber/3%2==0) ? (19-battlernumber)%3 : (19+battlernumber)%3
ret = (battlernumber / 3 % 2 == 0) ? (19 - battlernumber) % 3 : (19 + battlernumber) % 3
else
ret=battlernumber%2*2
ret = battlernumber % 2 * 2
end
return ret
end
def ypositionformula(battlernumber)
ret=0
ret = 0
if !SINGLEROW
ret=(battlernumber/3)%2*2
ret = (battlernumber / 3) % 2 * 2
else
ret=1
ret = 1
end
return ret
end
def moveSprite(i)
spritename=(i>-1) ? "pokemon#{i}" : "trainer"
speed = (i>-1) ? ANIMATIONSPEED : 2
if(!ANIMATION) # Skips animation
@sprites[spritename].x-=speed*@xmovement[i]
@xmovement[i]=0
@sprites[spritename].y-=speed*@ymovement[i]
@ymovement[i]=0
spritename = (i > -1) ? "pokemon#{i}" : "trainer"
speed = (i > -1) ? ANIMATIONSPEED : 2
if (!ANIMATION) # Skips animation
@sprites[spritename].x -= speed * @xmovement[i]
@xmovement[i] = 0
@sprites[spritename].y -= speed * @ymovement[i]
@ymovement[i] = 0
end
if(@xmovement[i]!=0)
direction = (@xmovement[i]>0) ? -1 : 1
@sprites[spritename].x+=speed*direction
@xmovement[i]+=direction
if (@xmovement[i] != 0)
direction = (@xmovement[i] > 0) ? -1 : 1
@sprites[spritename].x += speed * direction
@xmovement[i] += direction
end
if(@ymovement[i]!=0)
direction = (@ymovement[i]>0) ? -1 : 1
@sprites[spritename].y+=speed*direction
@ymovement[i]+=direction
if (@ymovement[i] != 0)
direction = (@ymovement[i] > 0) ? -1 : 1
@sprites[spritename].y += speed * direction
@ymovement[i] += direction
end
end
def createBattlers(hide=true)
def createBattlers(hide = true)
# Movement in animation
for i in 0...6
# Clear all 6 pokémon sprites and dispose the ones that exists every time
# that this method is call
restartSpritePosition(@sprites,"pokemon#{i}")
next if i>=@hallEntry.size
xpoint=xpointformula(i)
ypoint=ypointformula(i)
pok=@hallEntry[i]
@sprites["pokemon#{i}"]=PokemonSprite.new(@viewport)
restartSpritePosition(@sprites, "pokemon#{i}")
next if i >= @hallEntry.size
xpoint = xpointformula(i)
ypoint = ypointformula(i)
pok = @hallEntry[i]
@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
if @sprites["pokemon#{i}"].bitmap && !@sprites["pokemon#{i}"].disposed?
@sprites["pokemon#{i}"].x += (128-@sprites["pokemon#{i}"].bitmap.width)/2
@sprites["pokemon#{i}"].y += (128-@sprites["pokemon#{i}"].bitmap.height)/2
@sprites["pokemon#{i}"].x += (128 - @sprites["pokemon#{i}"].bitmap.width) / 2
@sprites["pokemon#{i}"].y += (128 - @sprites["pokemon#{i}"].bitmap.height) / 2
end
@sprites["pokemon#{i}"].z=7-i if SINGLEROW
@sprites["pokemon#{i}"].z = 7 - i if SINGLEROW
next if !hide
# Animation distance calculation
horizontal=1-xpositionformula(i)
vertical=1-ypositionformula(i)
xdistance=(horizontal==-1) ? -@sprites["pokemon#{i}"].bitmap.width : Graphics.width
ydistance=(vertical==-1) ? -@sprites["pokemon#{i}"].bitmap.height : Graphics.height
xdistance=((xdistance-@sprites["pokemon#{i}"].x)/ANIMATIONSPEED).abs+1
ydistance=((ydistance-@sprites["pokemon#{i}"].y)/ANIMATIONSPEED).abs+1
biggerdistance=(xdistance>ydistance) ? xdistance : ydistance
@xmovement[i]=biggerdistance
@xmovement[i]*=-1 if horizontal==-1
@xmovement[i]=0 if horizontal== 0
@ymovement[i]=biggerdistance
@ymovement[i]*=-1 if vertical==-1
@ymovement[i]=0 if vertical== 0
horizontal = 1 - xpositionformula(i)
vertical = 1 - ypositionformula(i)
xdistance = (horizontal == -1) ? -@sprites["pokemon#{i}"].bitmap.width : Graphics.width
ydistance = (vertical == -1) ? -@sprites["pokemon#{i}"].bitmap.height : Graphics.height
xdistance = ((xdistance - @sprites["pokemon#{i}"].x) / ANIMATIONSPEED).abs + 1
ydistance = ((ydistance - @sprites["pokemon#{i}"].y) / ANIMATIONSPEED).abs + 1
biggerdistance = (xdistance > ydistance) ? xdistance : ydistance
@xmovement[i] = biggerdistance
@xmovement[i] *= -1 if horizontal == -1
@xmovement[i] = 0 if horizontal == 0
@ymovement[i] = biggerdistance
@ymovement[i] *= -1 if vertical == -1
@ymovement[i] = 0 if vertical == 0
# Hide the battlers
@sprites["pokemon#{i}"].x+=@xmovement[i]*ANIMATIONSPEED
@sprites["pokemon#{i}"].y+=@ymovement[i]*ANIMATIONSPEED
@sprites["pokemon#{i}"].x += @xmovement[i] * ANIMATIONSPEED
@sprites["pokemon#{i}"].y += @ymovement[i] * ANIMATIONSPEED
end
end
def createTrainerBattler
@sprites["trainer"]=IconSprite.new(@viewport)
@sprites["trainer"] = IconSprite.new(@viewport)
@sprites["trainer"].setBitmap(GameData::TrainerType.front_sprite_filename($Trainer.trainer_type))
if !SINGLEROW
@sprites["trainer"].x=Graphics.width-96
@sprites["trainer"].y=160
@sprites["trainer"].x = Graphics.width - 96
@sprites["trainer"].y = 160
else
@sprites["trainer"].x=Graphics.width/2
@sprites["trainer"].y=178
@sprites["trainer"].x = Graphics.width / 2
@sprites["trainer"].y = 178
end
@sprites["trainer"].z=9
@sprites["trainer"].ox=@sprites["trainer"].bitmap.width/2
@sprites["trainer"].oy=@sprites["trainer"].bitmap.height/2
@sprites["trainer"].z = 9
@sprites["trainer"].ox = @sprites["trainer"].bitmap.width / 2
@sprites["trainer"].oy = @sprites["trainer"].bitmap.height / 2
if REMOVEBARS
@sprites["overlay"].bitmap.clear
@sprites["hallbars"].visible=false
@sprites["hallbars"].visible = false
end
@xmovement[@battlerIndex]=0
@ymovement[@battlerIndex]=0
if(ANIMATION && !SINGLEROW) # Trainer Animation
startpoint=Graphics.width/2
@xmovement[@battlerIndex] = 0
@ymovement[@battlerIndex] = 0
if (ANIMATION && !SINGLEROW) # Trainer Animation
startpoint = Graphics.width / 2
# 2 is the trainer speed
@xmovement[@battlerIndex]=(startpoint-@sprites["trainer"].x)/2
@sprites["trainer"].x=startpoint
@xmovement[@battlerIndex] = (startpoint - @sprites["trainer"].x) / 2
@sprites["trainer"].x = startpoint
else
ENTRYWAITTIME.times do
Graphics.update
@@ -272,62 +276,73 @@ 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
min = totalsec / 60 % 60
pubid=sprintf("%05d",$Trainer.public_ID)
lefttext= _INTL("Name<r>{1}<br>",$Trainer.name)
lefttext+=_INTL("IDNo.<r>{1}<br>",pubid)
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)
@sprites["messagebox"]=Window_AdvancedTextPokemon.new(lefttext)
@sprites["messagebox"].viewport=@viewport
@sprites["messagebox"].width=192 if @sprites["messagebox"].width<192
@sprites["msgwindow"]=pbCreateMessageWindow(@viewport)
pubid = sprintf("%05d", $Trainer.public_ID)
lefttext = _INTL("Name<r>{1}<br>", $Trainer.name)
lefttext += _INTL("IDNo.<r>{1}<br>", pubid)
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
@sprites["msgwindow"] = pbCreateMessageWindow(@viewport)
pbMessageDisplay(@sprites["msgwindow"],
_INTL("League champion!\nCongratulations!\\^"))
_INTL("League champion!\nCongratulations!\\^"))
end
def writePokemonData(pokemon,hallNumber=-1)
overlay=@sprites["overlay"].bitmap
def writePokemonData(pokemon, hallNumber = -1)
overlay = @sprites["overlay"].bitmap
overlay.clear
pokename=pokemon.name
speciesname=pokemon.speciesName
pokename = pokemon.name
speciesname = pokemon.speciesName
if pokemon.male?
speciesname+=""
speciesname += ""
elsif pokemon.female?
speciesname+=""
speciesname += ""
end
pokename+="/"+speciesname
pokename=_INTL("Egg")+"/"+_INTL("Egg") if pokemon.egg?
idno=(pokemon.owner.name.empty? || pokemon.egg?) ? "?????" : sprintf("%05d",pokemon.owner.public_id)
pokename += "/" + speciesname
pokename = _INTL("Egg") + "/" + _INTL("Egg") if pokemon.egg?
idno = (pokemon.owner.name.empty? || pokemon.egg?) ? "?????" : sprintf("%05d", pokemon.owner.public_id)
dexnumber = _INTL("No. ???")
if !pokemon.egg?
species_data = GameData::Species.get(pokemon.species)
dexnumber = _ISPRINTF("No. {1:03d}",species_data.id_number)
dexnumber = _ISPRINTF("No. {1:03d}", species_data.id_number)
end
textPositions=[
[dexnumber,32,Graphics.height-86,0,BASECOLOR,SHADOWCOLOR],
[pokename,Graphics.width-192,Graphics.height-86,2,BASECOLOR,SHADOWCOLOR],
[_INTL("Lv. {1}",pokemon.egg? ? "?" : pokemon.level),
64,Graphics.height-54,0,BASECOLOR,SHADOWCOLOR],
[_INTL("IDNo.{1}",pokemon.egg? ? "?????" : idno),
Graphics.width-192,Graphics.height-54,2,BASECOLOR,SHADOWCOLOR]
textPositions = [
[dexnumber, 32, Graphics.height - 86, 0, BASECOLOR, SHADOWCOLOR],
[pokename, Graphics.width - 192, Graphics.height - 86, 2, BASECOLOR, SHADOWCOLOR],
[_INTL("Lv. {1}", pokemon.egg? ? "?" : pokemon.level),
64, Graphics.height - 54, 0, BASECOLOR, SHADOWCOLOR],
[_INTL("IDNo.{1}", pokemon.egg? ? "?????" : idno),
Graphics.width - 192, Graphics.height - 54, 2, BASECOLOR, SHADOWCOLOR]
]
if (hallNumber>-1)
textPositions.push([_INTL("Hall of Fame No."),Graphics.width/2-104,-6,0,BASECOLOR,SHADOWCOLOR])
textPositions.push([hallNumber.to_s,Graphics.width/2+104,-6,1,BASECOLOR,SHADOWCOLOR])
if (hallNumber > -1)
textPositions.push([_INTL("Hall of Fame No."), Graphics.width / 2 - 104, -6, 0, BASECOLOR, SHADOWCOLOR])
textPositions.push([hallNumber.to_s, Graphics.width / 2 + 104, -6, 1, BASECOLOR, SHADOWCOLOR])
end
pbDrawTextPositions(overlay,textPositions)
pbDrawTextPositions(overlay, textPositions)
end
def writeWelcome
overlay=@sprites["overlay"].bitmap
overlay = @sprites["overlay"].bitmap
overlay.clear
pbDrawTextPositions(overlay,[[_INTL("Welcome to the Hall of Fame!"),
Graphics.width/2,Graphics.height-80,2,BASECOLOR,SHADOWCOLOR]])
pbDrawTextPositions(overlay, [[_INTL("Welcome to the Hall of Fame!"),
Graphics.width / 2, Graphics.height - 80, 2, BASECOLOR, SHADOWCOLOR]])
end
def pbAnimationLoop
@@ -336,7 +351,7 @@ class HallOfFame_Scene
Input.update
pbUpdate
pbUpdateAnimation
break if @battlerIndex==@hallEntry.size+2
break if @battlerIndex == @hallEntry.size + 2
end
end
@@ -345,19 +360,19 @@ class HallOfFame_Scene
Graphics.update
Input.update
pbUpdate
continueScene=true
break if Input.trigger?(Input::BACK) # Exits
if Input.trigger?(Input::USE) # Moves the selection one entry backward
@battlerIndex+=10
continueScene=pbUpdatePC
continueScene = true
break if Input.trigger?(Input::BACK) # Exits
if Input.trigger?(Input::USE) # Moves the selection one entry backward
@battlerIndex += 10
continueScene = pbUpdatePC
end
if Input.trigger?(Input::LEFT) # Moves the selection one pokémon forward
@battlerIndex-=1
continueScene=pbUpdatePC
if Input.trigger?(Input::LEFT) # Moves the selection one pokémon forward
@battlerIndex -= 1
continueScene = pbUpdatePC
end
if Input.trigger?(Input::RIGHT) # Moves the selection one pokémon backward
@battlerIndex+=1
continueScene=pbUpdatePC
if Input.trigger?(Input::RIGHT) # Moves the selection one pokémon backward
@battlerIndex += 1
continueScene = pbUpdatePC
end
break if !continueScene
end
@@ -368,75 +383,76 @@ class HallOfFame_Scene
end
def pbUpdateAnimation
if @battlerIndex<=@hallEntry.size
if @xmovement[@battlerIndex]!=0 || @ymovement[@battlerIndex]!=0
spriteIndex=(@battlerIndex<@hallEntry.size) ? @battlerIndex : -1
if @battlerIndex <= @hallEntry.size
if @xmovement[@battlerIndex] != 0 || @ymovement[@battlerIndex] != 0
spriteIndex = (@battlerIndex < @hallEntry.size) ? @battlerIndex : -1
moveSprite(spriteIndex)
else
@battlerIndex+=1
if @battlerIndex<=@hallEntry.size
@battlerIndex += 1
if @battlerIndex <= @hallEntry.size
# If it is a pokémon, write the pokémon text, wait the
# ENTRYWAITTIME and goes to the next battler
@hallEntry[@battlerIndex - 1].play_cry
writePokemonData(@hallEntry[@battlerIndex-1])
(ENTRYWAITTIME*Graphics.frame_rate/20).times do
writePokemonData(@hallEntry[@battlerIndex - 1])
(ENTRYWAITTIME * Graphics.frame_rate / 20).times do
Graphics.update
Input.update
pbUpdate
end
if @battlerIndex<@hallEntry.size # Preparates the next battler
setPokemonSpritesOpacity(@battlerIndex,OPACITY)
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
(ENTRYWAITTIME * 2 * Graphics.frame_rate / 20).times do
Graphics.update
Input.update
pbUpdate
end
setPokemonSpritesOpacity(-1,OPACITY) if !SINGLEROW
setPokemonSpritesOpacity(-1, OPACITY) if !SINGLEROW
createTrainerBattler
end
end
end
elsif @battlerIndex>@hallEntry.size
elsif @battlerIndex > @hallEntry.size
# Write the trainer data and fade
writeTrainerData
(ENTRYWAITTIME*Graphics.frame_rate/20).times do
(ENTRYWAITTIME * Graphics.frame_rate / 20).times do
Graphics.update
Input.update
pbUpdate
end
fadeSpeed=((Math.log(2**12)-Math.log(FINALFADESPEED))/Math.log(2)).floor
pbBGMFade((2**fadeSpeed).to_f/20) if @useMusic
slowFadeOut(@sprites,fadeSpeed) { pbUpdate }
@alreadyFadedInEnd=true
@battlerIndex+=1
fadeSpeed = ((Math.log(2 ** 12) - Math.log(FINALFADESPEED)) / Math.log(2)).floor
pbBGMFade((2 ** fadeSpeed).to_f / 20) if @useMusic
slowFadeOut(@sprites, fadeSpeed) { pbUpdate }
@alreadyFadedInEnd = true
@battlerIndex += 1
end
end
def pbUpdatePC
# Change the team
if @battlerIndex>=@hallEntry.size
@hallIndex-=1
return false if @hallIndex==-1
@hallEntry=$PokemonGlobal.hallOfFame[@hallIndex]
@battlerIndex=0
if @battlerIndex >= @hallEntry.size
@hallIndex -= 1
return false if @hallIndex == -1
@hallEntry = $PokemonGlobal.hallOfFame[@hallIndex]
@battlerIndex = 0
createBattlers(false)
elsif @battlerIndex<0
@hallIndex+=1
return false if @hallIndex>=$PokemonGlobal.hallOfFame.size
@hallEntry=$PokemonGlobal.hallOfFame[@hallIndex]
@battlerIndex=@hallEntry.size-1
elsif @battlerIndex < 0
@hallIndex += 1
return false if @hallIndex >= $PokemonGlobal.hallOfFame.size
@hallEntry = $PokemonGlobal.hallOfFame[@hallIndex]
@battlerIndex = @hallEntry.size - 1
createBattlers(false)
end
# Change the pokemon
@hallEntry[@battlerIndex].play_cry
setPokemonSpritesOpacity(@battlerIndex,OPACITY)
hallNumber=$PokemonGlobal.hallOfFameLastNumber + @hallIndex -
$PokemonGlobal.hallOfFame.size + 1
writePokemonData(@hallEntry[@battlerIndex],hallNumber)
setPokemonSpritesOpacity(@battlerIndex, OPACITY)
hallNumber = $PokemonGlobal.hallOfFameLastNumber + @hallIndex -
$PokemonGlobal.hallOfFame.size + 1
writePokemonData(@hallEntry[@battlerIndex], hallNumber)
return true
end
end
@@ -467,7 +483,7 @@ end
#===============================================================================
class HallOfFamePC
def shouldShow?
return $PokemonGlobal.hallOfFameLastNumber>0
return $PokemonGlobal.hallOfFameLastNumber > 0
end
def name
@@ -507,13 +523,13 @@ end
#
#===============================================================================
def pbHallOfFameEntry
scene=HallOfFame_Scene.new
screen=HallOfFameScreen.new(scene)
scene = HallOfFame_Scene.new
screen = HallOfFameScreen.new(scene)
screen.pbStartScreenEntry
end
def pbHallOfFamePC
scene=HallOfFame_Scene.new
screen=HallOfFameScreen.new(scene)
scene = HallOfFame_Scene.new
screen = HallOfFameScreen.new(scene)
screen.pbStartScreenPC
end