More revamping and rearranging

This commit is contained in:
Maruno17
2021-01-23 20:44:07 +00:00
parent 8a89ef1220
commit 7de034957b
38 changed files with 674 additions and 661 deletions

View File

@@ -302,7 +302,10 @@ class PokemonSummary_Scene
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_#{page}")
imagepos=[]
# Show the Poké Ball containing the Pokémon
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d",@pokemon.ballused)
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%s", @pokemon.poke_ball)
if !pbResolveBitmap(ballimage)
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d", pbGetBallType(@pokemon.poke_ball))
end
imagepos.push([ballimage,14,60])
# Show status/fainted/Pokérus infected icon
status = -1
@@ -368,7 +371,7 @@ class PokemonSummary_Scene
dexNumShadow = (@pokemon.shiny?) ? Color.new(224,152,144) : Color.new(176,176,176)
# If a Shadow Pokémon, draw the heart gauge area and bar
if @pokemon.shadowPokemon?
shadowfract = @pokemon.heartgauge*1.0/Pokemon::HEARTGAUGESIZE
shadowfract = @pokemon.heart_gauge.to_f / Pokemon::HEART_GAUGE_SIZE
imagepos = [
["Graphics/Pictures/Summary/overlay_shadow",224,240],
["Graphics/Pictures/Summary/overlay_shadowbar",242,280,0,0,(shadowfract*248).floor,-1]
@@ -457,7 +460,7 @@ class PokemonSummary_Scene
end
# Draw Exp bar
if @pokemon.level<PBExperience.maxLevel
w = @pokemon.expFraction*128
w = @pokemon.exp_fraction * 128
w = ((w/2).round)*2
pbDrawImagePositions(overlay,[
["Graphics/Pictures/Summary/overlay_exp",362,372,0,0,w,6]
@@ -475,7 +478,10 @@ class PokemonSummary_Scene
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_egg")
imagepos = []
# Show the Poké Ball containing the Pokémon
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d",@pokemon.ballused)
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%s", @pokemon.poke_ball)
if !pbResolveBitmap(ballimage)
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d", pbGetBallType(@pokemon.poke_ball))
end
imagepos.push([ballimage,14,60])
# Draw all images
pbDrawImagePositions(overlay,imagepos)
@@ -502,11 +508,9 @@ class PokemonSummary_Scene
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n",date,month,year)
end
# Write map name egg was received on
mapname = pbGetMapNameFromId(@pokemon.obtainMap)
if (@pokemon.obtainText rescue false) && @pokemon.obtainText!=""
mapname = @pokemon.obtainText
end
if mapname && mapname!=""
mapname = pbGetMapNameFromId(@pokemon.obtain_map)
mapname = @pokemon.obtain_text if @pokemon.obtain_text && !@pokemon.obtain_text.empty?
if mapname && mapname != ""
memo += _INTL("<c3=404040,B0B0B0>A mysterious Pokémon Egg received from <c3=F83820,E09890>{1}<c3=404040,B0B0B0>.\n",mapname)
else
memo += _INTL("<c3=404040,B0B0B0>A mysterious Pokémon Egg.\n",mapname)
@@ -515,9 +519,9 @@ class PokemonSummary_Scene
# Write Egg Watch blurb
memo += _INTL("<c3=404040,B0B0B0>\"The Egg Watch\"\n")
eggstate = _INTL("It looks like this Egg will take a long time to hatch.")
eggstate = _INTL("What will hatch from this? It doesn't seem close to hatching.") if @pokemon.eggsteps<10200
eggstate = _INTL("It appears to move occasionally. It may be close to hatching.") if @pokemon.eggsteps<2550
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.eggsteps<1275
eggstate = _INTL("What will hatch from this? It doesn't seem close to hatching.") if @pokemon.steps_to_hatch < 10200
eggstate = _INTL("It appears to move occasionally. It may be close to hatching.") if @pokemon.steps_to_hatch < 2550
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275
memo += sprintf("<c3=404040,B0B0B0>%s\n",eggstate)
# Draw all text
drawFormattedTextEx(overlay,232,78,268,memo)
@@ -542,18 +546,16 @@ class PokemonSummary_Scene
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n",date,month,year)
end
# Write map name Pokémon was received on
mapname = pbGetMapNameFromId(@pokemon.obtainMap)
if (@pokemon.obtainText rescue false) && @pokemon.obtainText!=""
mapname = @pokemon.obtainText
end
mapname = pbGetMapNameFromId(@pokemon.obtain_map)
mapname = @pokemon.obtain_text if @pokemon.obtain_text && !@pokemon.obtain_text.empty?
mapname = _INTL("Faraway place") if !mapname || mapname==""
memo += sprintf("<c3=F83820,E09890>%s\n",mapname)
# Write how Pokémon was obtained
mettext = [_INTL("Met at Lv. {1}.",@pokemon.obtainLevel),
mettext = [_INTL("Met at Lv. {1}.",@pokemon.obtain_level),
_INTL("Egg received."),
_INTL("Traded at Lv. {1}.",@pokemon.obtainLevel),
_INTL("Traded at Lv. {1}.",@pokemon.obtain_level),
"",
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtainLevel)
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtain_level)
][@pokemon.obtain_method]
memo += sprintf("<c3=404040,B0B0B0>%s\n",mettext) if mettext && mettext!=""
# If Pokémon was hatched, write when and where it hatched
@@ -564,7 +566,7 @@ class PokemonSummary_Scene
year = @pokemon.timeEggHatched.year
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n",date,month,year)
end
mapname = pbGetMapNameFromId(@pokemon.hatchedMap)
mapname = pbGetMapNameFromId(@pokemon.hatched_map)
mapname = _INTL("Faraway place") if !mapname || mapname==""
memo += sprintf("<c3=F83820,E09890>%s\n",mapname)
memo += _INTL("<c3=404040,B0B0B0>Egg hatched.\n")
@@ -829,7 +831,7 @@ class PokemonSummary_Scene
# Write various bits of text
textpos = [
[_INTL("No. of Ribbons:"),234,332,0,Color.new(64,64,64),Color.new(176,176,176)],
[@pokemon.ribbonCount.to_s,450,332,1,Color.new(64,64,64),Color.new(176,176,176)],
[@pokemon.numRibbons.to_s,450,332,1,Color.new(64,64,64),Color.new(176,176,176)],
]
# Draw all text
pbDrawTextPositions(overlay,textpos)