mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 07:35:00 +00:00
6.7.2 patch
This commit is contained in:
@@ -48,8 +48,10 @@ class HallOfFame_Scene
|
||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
@viewport.z = 99999
|
||||
# Comment the below line to doesn't use a background
|
||||
bgFile = @singlerow ? "hallfamebg" : "hallfamebg_multiline"
|
||||
addBackgroundPlane(@sprites, "bg", bgFile, @viewport)
|
||||
@sprites["bg"] = IconSprite.new(@viewport)
|
||||
@sprites["bg"].setBitmap(getHallOfFameBackground)
|
||||
@sprites["bg"].z = 0
|
||||
|
||||
@sprites["hallbars"] = IconSprite.new(@viewport)
|
||||
@sprites["hallbars"].setBitmap("Graphics/Pictures/hallfamebars")
|
||||
@sprites["overlay"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||
@@ -73,12 +75,25 @@ class HallOfFame_Scene
|
||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||
end
|
||||
|
||||
def getHallOfFameBackground
|
||||
if @singlerow #in the e4
|
||||
rank = pbGet(VAR_LEAGUE_REMATCH_TIER)
|
||||
background = "Graphics/Pictures/HallOfFame/hallfamebg"
|
||||
else #from PC
|
||||
rank = $PokemonGlobal.hallOfFame[@hallIndex][:TIER]
|
||||
background = "Graphics/Pictures/HallOfFame/hallfamebg_multiline"
|
||||
end
|
||||
if rank && rank.to_i > 0
|
||||
background += "_#{rank}"
|
||||
end
|
||||
return background
|
||||
end
|
||||
|
||||
def pbStartScenePC
|
||||
@singlerow = false
|
||||
pbStartScene
|
||||
@hallIndex = $PokemonGlobal.hallOfFame.size - 1
|
||||
|
||||
echoln $PokemonGlobal.hallOfFame[-1]
|
||||
pbStartScene
|
||||
@hallEntry = $PokemonGlobal.hallOfFame[-1][:TEAM]
|
||||
createBattlers(false)
|
||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||
@@ -136,6 +151,7 @@ class HallOfFame_Scene
|
||||
entryData[:DIFFICULTY] = getDifficulty
|
||||
entryData[:MODE] = getCurrentGameMode()
|
||||
entryData[:DATE] = getCurrentDate()
|
||||
entryData[:TIER] = getCurrentE4Tier()
|
||||
|
||||
#Save trainer data (unused for now)
|
||||
entryData[:TRAINER_HAT] = $Trainer.hat
|
||||
@@ -381,7 +397,12 @@ class HallOfFame_Scene
|
||||
def writeWelcomePC
|
||||
overlay = @sprites["overlay"].bitmap
|
||||
overlay.clear
|
||||
pbDrawTextPositions(overlay, [[_INTL("Entered the Hall of Fame!"),
|
||||
text = _INTL("Entered the Hall of Fame!")
|
||||
rank = $PokemonGlobal.hallOfFame[@hallIndex][:TIER]
|
||||
if rank && rank.to_i > 0
|
||||
text += _INTL(" (Rematch Tier {1})",rank.to_i)
|
||||
end
|
||||
pbDrawTextPositions(overlay, [[text,
|
||||
Graphics.width / 2, Graphics.height - 80, 2, BASECOLOR, SHADOWCOLOR]])
|
||||
|
||||
date = $PokemonGlobal.hallOfFame[@hallIndex][:DATE]
|
||||
@@ -397,11 +418,17 @@ class HallOfFame_Scene
|
||||
pbDrawTextPositions(overlay, [[_INTL("{1}", timeString), x, y, 2, BASECOLOR, SHADOWCOLOR]])
|
||||
end
|
||||
|
||||
|
||||
def getCurrentDate()
|
||||
currentTime = Time.new
|
||||
return currentTime.year.to_s + "-" + ("%02d" % currentTime.month) + "-" + ("%02d" % currentTime.day)
|
||||
end
|
||||
|
||||
def getCurrentE4Tier()
|
||||
return pbGet(VAR_LEAGUE_REMATCH_TIER)
|
||||
end
|
||||
|
||||
|
||||
def getCurrentGameMode()
|
||||
gameMode = "Classic mode"
|
||||
if $game_switches[SWITCH_MODERN_MODE]
|
||||
@@ -563,6 +590,7 @@ class HallOfFame_Scene
|
||||
@battlerIndex = @hallEntry.size - 1
|
||||
createBattlers(false)
|
||||
end
|
||||
@sprites["bg"].setBitmap(getHallOfFameBackground)
|
||||
# Change the pokemon
|
||||
@hallEntry[@battlerIndex].play_cry
|
||||
setPokemonSpritesOpacity(@battlerIndex, OPACITY)
|
||||
|
||||
@@ -24,7 +24,11 @@ class MoveRelearner_Scene
|
||||
@pokemon=pokemon
|
||||
@moves=moves
|
||||
moveCommands=[]
|
||||
moves.each { |m| moveCommands.push(GameData::Move.get(m).name) }
|
||||
echoln moves
|
||||
moves.each do |m|
|
||||
echoln m.name
|
||||
moveCommands.push(GameData::Move.get(m).name)
|
||||
end
|
||||
# Create sprite hash
|
||||
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
|
||||
@viewport.z=99999
|
||||
@@ -169,7 +173,9 @@ class MoveRelearnerScreen
|
||||
end
|
||||
|
||||
pkmn.learned_moves.each do |move|
|
||||
moves.push(move) if !moves.include?(move)
|
||||
move_id = move.is_a?(Symbol) ? move : move.id
|
||||
next if pkmn.hasMove?(move_id)
|
||||
moves.push(move_id) if !moves.include?(move_id)
|
||||
end
|
||||
|
||||
tmoves = []
|
||||
@@ -178,6 +184,7 @@ class MoveRelearnerScreen
|
||||
tmoves.push(i) if !pkmn.hasMove?(i) && !moves.include?(i)
|
||||
end
|
||||
end
|
||||
|
||||
moves = tmoves + moves
|
||||
return moves | [] # remove duplicates
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user