mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
updates to version 6.1
This commit is contained in:
@@ -102,6 +102,8 @@ end
|
||||
#
|
||||
#===============================================================================
|
||||
class PokemonSummary_Scene
|
||||
NB_PAGES = 5
|
||||
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
end
|
||||
@@ -307,7 +309,7 @@ class PokemonSummary_Scene
|
||||
base = Color.new(248, 248, 248)
|
||||
shadow = Color.new(104, 104, 104)
|
||||
# Set background image
|
||||
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_#{page}")
|
||||
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_#{page}") if page < NB_PAGES
|
||||
imagepos = []
|
||||
# Show the Poké Ball containing the Pokémon
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%s", @pokemon.poke_ball)
|
||||
@@ -334,7 +336,7 @@ class PokemonSummary_Scene
|
||||
end
|
||||
# Show shininess star
|
||||
if @pokemon.shiny?
|
||||
addShinyStarsToGraphicsArray(imagepos,2,134,@pokemon.bodyShiny?,@pokemon.headShiny?,@pokemon.debugShiny?,nil,nil,nil,nil,true)
|
||||
addShinyStarsToGraphicsArray(imagepos, 2, 134, @pokemon.bodyShiny?, @pokemon.headShiny?, @pokemon.debugShiny?, nil, nil, nil, nil, true)
|
||||
#imagepos.push([sprintf("Graphics/Pictures/shiny"), 2, 134])
|
||||
end
|
||||
# Draw all images
|
||||
@@ -344,7 +346,7 @@ class PokemonSummary_Scene
|
||||
_INTL("TRAINER MEMO"),
|
||||
_INTL("SKILLS"),
|
||||
_INTL("MOVES"),
|
||||
_INTL("RIBBONS")][page - 1]
|
||||
_INTL("MOVES")][page - 1]
|
||||
textpos = [
|
||||
[pagename, 26, 10, 0, base, shadow],
|
||||
[@pokemon.name, 46, 56, 0, base, shadow],
|
||||
@@ -383,6 +385,23 @@ class PokemonSummary_Scene
|
||||
end
|
||||
|
||||
def drawPageOne
|
||||
# dex_no_y=74
|
||||
# species_y=106
|
||||
# type_y=138
|
||||
# type_y_offset=8
|
||||
#
|
||||
# fusion_head_y=170
|
||||
# fusion_body_y=202
|
||||
|
||||
dex_no_y = 74
|
||||
species_y = 74
|
||||
type_y = 106
|
||||
type_y_offset = 8
|
||||
ot_y = 138
|
||||
|
||||
fusion_head_y = 170
|
||||
fusion_body_y = 202
|
||||
|
||||
overlay = @sprites["overlay"].bitmap
|
||||
base = Color.new(248, 248, 248)
|
||||
shadow = Color.new(104, 104, 104)
|
||||
@@ -399,16 +418,32 @@ class PokemonSummary_Scene
|
||||
end
|
||||
# Write various bits of text
|
||||
textpos = [
|
||||
[_INTL("Dex No."), 238, 74, 0, base, shadow],
|
||||
[_INTL("Species"), 238, 106, 0, base, shadow],
|
||||
[@pokemon.speciesName, 435, 106, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Type"), 238, 138, 0, base, shadow],
|
||||
[_INTL("OT"), 238, 170, 0, base, shadow],
|
||||
[_INTL("ID No."), 238, 202, 0, base, shadow],
|
||||
#[_INTL("Dex No."), 238, dex_no_y, 0, base, shadow],
|
||||
[_INTL("Species"), 238, species_y, 0, base, shadow],
|
||||
[@pokemon.speciesName, 435, species_y, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[_INTL("Type"), 238, type_y, 0, base, shadow],
|
||||
[_INTL("OT"), 238, ot_y, 0, base, shadow],
|
||||
# [_INTL("ID No."), 238, id_no_y, 0, base, shadow],
|
||||
]
|
||||
# Write the Regional/National Dex number
|
||||
dexnum = GameData::Species.get(@pokemon.species).id_number
|
||||
dexnumshift = false
|
||||
if @pokemon.isFusion?
|
||||
headName = getPokemon(@pokemon.species_data.get_head_species).name
|
||||
bodyName = getPokemon(@pokemon.species_data.get_body_species).name
|
||||
|
||||
textpos << [_INTL("Head"), 238, fusion_head_y, 0, base, shadow]
|
||||
textpos << [headName, 435, fusion_head_y, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)]
|
||||
|
||||
textpos << [_INTL("Body"), 238, fusion_body_y, 0, base, shadow]
|
||||
textpos << [bodyName, 435, fusion_body_y, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)]
|
||||
else
|
||||
dexnum = GameData::Species.get(@pokemon.species).id_number
|
||||
textpos << [_INTL("Dex No"), 238, fusion_head_y, 0, base, shadow]
|
||||
textpos << [sprintf("%03d", dexnum), 435, fusion_head_y, 2, dexNumBase, dexNumShadow]
|
||||
|
||||
end
|
||||
|
||||
# # Write the Regional/National Dex number
|
||||
# dexnum = GameData::Species.get(@pokemon.species).id_number
|
||||
# dexnumshift = false
|
||||
# if $Trainer.pokedex.unlocked?(-1) # National Dex is unlocked
|
||||
# dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1)
|
||||
# else
|
||||
@@ -422,16 +457,16 @@ class PokemonSummary_Scene
|
||||
# break
|
||||
# end
|
||||
# end
|
||||
if dexnum <= 0
|
||||
textpos.push(["???", 435, 74, 2, dexNumBase, dexNumShadow])
|
||||
else
|
||||
dexnum -= 1 if dexnumshift
|
||||
textpos.push([sprintf("%03d", dexnum), 435, 74, 2, dexNumBase, dexNumShadow])
|
||||
end
|
||||
# if dexnum <= 0
|
||||
# textpos.push(["???", 435, 74, 2, dexNumBase, dexNumShadow])
|
||||
# else
|
||||
# dexnum -= 1 if dexnumshift
|
||||
# textpos.push([sprintf("%03d", dexnum), 435, 74, 2, dexNumBase, dexNumShadow])
|
||||
# end
|
||||
# Write Original Trainer's name and ID number
|
||||
if @pokemon.owner.name.empty?
|
||||
textpos.push([_INTL("RENTAL"), 435, 170, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
textpos.push(["?????", 435, 202, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
textpos.push([_INTL("RENTAL"), 435, ot_y, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
#textpos.push(["?????", 435, 202, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
else
|
||||
ownerbase = Color.new(64, 64, 64)
|
||||
ownershadow = Color.new(176, 176, 176)
|
||||
@@ -443,27 +478,27 @@ class PokemonSummary_Scene
|
||||
ownerbase = Color.new(248, 56, 32)
|
||||
ownershadow = Color.new(224, 152, 144)
|
||||
end
|
||||
textpos.push([@pokemon.owner.name, 435, 170, 2, ownerbase, ownershadow])
|
||||
textpos.push([sprintf("%05d", @pokemon.owner.public_id), 435, 202, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
textpos.push([@pokemon.owner.name, 435, ot_y, 2, ownerbase, ownershadow])
|
||||
#textpos.push([sprintf("%05d", @pokemon.owner.public_id), 435, 202, 2, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
end
|
||||
# Write Exp text OR heart gauge message (if a Shadow Pokémon)
|
||||
if @pokemon.shadowPokemon?
|
||||
textpos.push([_INTL("Heart Gauge"), 238, 234, 0, base, shadow])
|
||||
heartmessage = [_INTL("The door to its heart is open! Undo the final lock!"),
|
||||
_INTL("The door to its heart is almost fully open."),
|
||||
_INTL("The door to its heart is nearly open."),
|
||||
_INTL("The door to its heart is opening wider."),
|
||||
_INTL("The door to its heart is opening up."),
|
||||
_INTL("The door to its heart is tightly shut.")][@pokemon.heartStage]
|
||||
memo = sprintf("<c3=404040,B0B0B0>%s\n", heartmessage)
|
||||
drawFormattedTextEx(overlay, 234, 304, 264, memo)
|
||||
else
|
||||
endexp = @pokemon.growth_rate.minimum_exp_for_level(@pokemon.level + 1)
|
||||
textpos.push([_INTL("Exp. Points"), 238, 234, 0, base, shadow])
|
||||
textpos.push([@pokemon.exp.to_s_formatted, 488, 266, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
textpos.push([_INTL("To Next Lv."), 238, 298, 0, base, shadow])
|
||||
textpos.push([(endexp - @pokemon.exp).to_s_formatted, 488, 330, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
end
|
||||
# if @pokemon.shadowPokemon?
|
||||
# textpos.push([_INTL("Heart Gauge"), 238, 234, 0, base, shadow])
|
||||
# heartmessage = [_INTL("The door to its heart is open! Undo the final lock!"),
|
||||
# _INTL("The door to its heart is almost fully open."),
|
||||
# _INTL("The door to its heart is nearly open."),
|
||||
# _INTL("The door to its heart is opening wider."),
|
||||
# _INTL("The door to its heart is opening up."),
|
||||
# _INTL("The door to its heart is tightly shut.")][@pokemon.heartStage]
|
||||
# memo = sprintf("<c3=404040,B0B0B0>%s\n", heartmessage)
|
||||
# drawFormattedTextEx(overlay, 234, 304, 264, memo)
|
||||
# else
|
||||
endexp = @pokemon.growth_rate.minimum_exp_for_level(@pokemon.level + 1)
|
||||
textpos.push([_INTL("Exp. Points"), 238, 234, 0, base, shadow])
|
||||
textpos.push([@pokemon.exp.to_s_formatted, 488, 266, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
textpos.push([_INTL("To Next Lv."), 238, 298, 0, base, shadow])
|
||||
textpos.push([(endexp - @pokemon.exp).to_s_formatted, 488, 330, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)])
|
||||
#end
|
||||
# Draw all text
|
||||
pbDrawTextPositions(overlay, textpos)
|
||||
# Draw Pokémon type(s)
|
||||
@@ -471,11 +506,13 @@ class PokemonSummary_Scene
|
||||
type2_number = GameData::Type.get(@pokemon.type2).id_number
|
||||
type1rect = Rect.new(0, type1_number * 28, 64, 28)
|
||||
type2rect = Rect.new(0, type2_number * 28, 64, 28)
|
||||
|
||||
type_graphics_y = type_y + type_y_offset
|
||||
if @pokemon.type1 == @pokemon.type2
|
||||
overlay.blt(402, 146, @typebitmap.bitmap, type1rect)
|
||||
overlay.blt(402, type_graphics_y, @typebitmap.bitmap, type1rect)
|
||||
else
|
||||
overlay.blt(370, 146, @typebitmap.bitmap, type1rect)
|
||||
overlay.blt(436, 146, @typebitmap.bitmap, type2rect)
|
||||
overlay.blt(370, type_graphics_y, @typebitmap.bitmap, type1rect)
|
||||
overlay.blt(436, type_graphics_y, @typebitmap.bitmap, type2rect)
|
||||
end
|
||||
# Draw Exp bar
|
||||
if @pokemon.level < GameData::GrowthRate.max_level
|
||||
@@ -689,7 +726,6 @@ class PokemonSummary_Scene
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
# Draw all text
|
||||
pbDrawTextPositions(overlay, textpos)
|
||||
# Draw HP bar
|
||||
@@ -868,32 +904,45 @@ class PokemonSummary_Scene
|
||||
end
|
||||
|
||||
def drawPageFive
|
||||
overlay = @sprites["overlay"].bitmap
|
||||
@sprites["uparrow"].visible = false
|
||||
@sprites["downarrow"].visible = false
|
||||
# Write various bits of text
|
||||
textpos = [
|
||||
[_INTL("No. of Ribbons:"), 234, 326, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
[@pokemon.numRibbons.to_s, 450, 326, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
]
|
||||
# Draw all text
|
||||
pbDrawTextPositions(overlay, textpos)
|
||||
# Show all ribbons
|
||||
imagepos = []
|
||||
coord = 0
|
||||
for i in @ribbonOffset * 4...@ribbonOffset * 4 + 12
|
||||
break if !@pokemon.ribbons[i]
|
||||
ribbon_data = GameData::Ribbon.get(@pokemon.ribbons[i])
|
||||
ribn = ribbon_data.id_number - 1
|
||||
imagepos.push(["Graphics/Pictures/ribbons",
|
||||
230 + 68 * (coord % 4), 78 + 68 * (coord / 4).floor,
|
||||
64 * (ribn % 8), 64 * (ribn / 8).floor, 64, 64])
|
||||
coord += 1
|
||||
end
|
||||
# Draw all images
|
||||
pbDrawImagePositions(overlay, imagepos)
|
||||
return if !$Trainer.has_pokedex
|
||||
$Trainer.pokedex.register_last_seen(@pokemon)
|
||||
pbFadeOutIn {
|
||||
scene = PokemonPokedexInfo_Scene.new
|
||||
screen = PokemonPokedexInfoScreen.new(scene)
|
||||
screen.pbStartSceneSingle(@pokemon.species)
|
||||
}
|
||||
pbChangePokemon
|
||||
@page -= 1
|
||||
drawPageFour #stay on the same page
|
||||
end
|
||||
|
||||
# def drawPageFive
|
||||
# overlay = @sprites["overlay"].bitmap
|
||||
# @sprites["uparrow"].visible = false
|
||||
# @sprites["downarrow"].visible = false
|
||||
# # Write various bits of text
|
||||
# textpos = [
|
||||
# [_INTL("No. of Ribbons:"), 234, 326, 0, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
# [@pokemon.numRibbons.to_s, 450, 326, 1, Color.new(64, 64, 64), Color.new(176, 176, 176)],
|
||||
# ]
|
||||
# # Draw all text
|
||||
# pbDrawTextPositions(overlay, textpos)
|
||||
# # Show all ribbons
|
||||
# imagepos = []
|
||||
# coord = 0
|
||||
# for i in @ribbonOffset * 4...@ribbonOffset * 4 + 12
|
||||
# break if !@pokemon.ribbons[i]
|
||||
# ribbon_data = GameData::Ribbon.get(@pokemon.ribbons[i])
|
||||
# ribn = ribbon_data.id_number - 1
|
||||
# imagepos.push(["Graphics/Pictures/ribbons",
|
||||
# 230 + 68 * (coord % 4), 78 + 68 * (coord / 4).floor,
|
||||
# 64 * (ribn % 8), 64 * (ribn / 8).floor, 64, 64])
|
||||
# coord += 1
|
||||
# end
|
||||
# # Draw all images
|
||||
# pbDrawImagePositions(overlay, imagepos)
|
||||
# end
|
||||
|
||||
def drawSelectedRibbon(ribbonid)
|
||||
# Draw all of page five
|
||||
drawPage(5)
|
||||
@@ -1232,7 +1281,7 @@ class PokemonSummary_Scene
|
||||
commands[cmdGiveItem = commands.length] = _INTL("Give item")
|
||||
commands[cmdTakeItem = commands.length] = _INTL("Take item") if @pokemon.hasItem?
|
||||
end
|
||||
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
|
||||
commands[cmdPokedex = commands.length] = _INTL("View Pokédex") if $Trainer.has_pokedex
|
||||
end
|
||||
commands[cmdMark = commands.length] = _INTL("Mark")
|
||||
commands[commands.length] = _INTL("Cancel")
|
||||
@@ -1256,6 +1305,7 @@ class PokemonSummary_Scene
|
||||
screen = PokemonPokedexInfoScreen.new(scene)
|
||||
screen.pbStartSceneSingle(@pokemon.species)
|
||||
}
|
||||
pbChangePokemon
|
||||
dorefresh = true
|
||||
elsif cmdMark >= 0 && command == cmdMark
|
||||
dorefresh = pbMarking(@pokemon)
|
||||
@@ -1320,9 +1370,10 @@ class PokemonSummary_Scene
|
||||
pbMoveSelection
|
||||
dorefresh = true
|
||||
elsif @page == 5
|
||||
@page -= 1
|
||||
pbPlayDecisionSE
|
||||
pbRibbonSelection
|
||||
dorefresh = true
|
||||
#pbRibbonSelection
|
||||
#dorefresh = true
|
||||
elsif !@inbattle
|
||||
pbPlayDecisionSE
|
||||
dorefresh = pbOptions
|
||||
@@ -1354,14 +1405,18 @@ class PokemonSummary_Scene
|
||||
dorefresh = true
|
||||
end
|
||||
elsif Input.trigger?(Input::RIGHT) && !@pokemon.egg?
|
||||
oldpage = @page
|
||||
@page += 1
|
||||
@page = 1 if @page < 1
|
||||
@page = 5 if @page > 5
|
||||
if @page != oldpage # Move to next page
|
||||
pbSEPlay("GUI summary change page")
|
||||
@ribbonOffset = 0
|
||||
dorefresh = true
|
||||
if @page == 4 && !$Trainer.has_pokedex
|
||||
pbSEPlay("GUI sel buzzer")
|
||||
else
|
||||
oldpage = @page
|
||||
@page += 1
|
||||
@page = 1 if @page < 1
|
||||
@page = 5 if @page > 5
|
||||
if @page != oldpage # Move to next page
|
||||
pbSEPlay("GUI summary change page")
|
||||
@ribbonOffset = 0
|
||||
dorefresh = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if dorefresh
|
||||
|
||||
Reference in New Issue
Block a user