Merge branch 'dev' into ai

This commit is contained in:
Maruno17
2023-04-09 22:28:34 +01:00
61 changed files with 799 additions and 563 deletions

View File

@@ -104,24 +104,24 @@ class Battle::Scene
messageFilename = @battle.backdrop
if time
trialName = sprintf("%s_%s", backdropFilename, time)
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_bg"))
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_bg", trialName))
backdropFilename = trialName
end
trialName = sprintf("%s_%s", baseFilename, time)
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_base0"))
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_base0", trialName))
baseFilename = trialName
end
trialName = sprintf("%s_%s", messageFilename, time)
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_message"))
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_message", trialName))
messageFilename = trialName
end
end
if !pbResolveBitmap(sprintf("Graphics/Battlebacks/" + baseFilename + "_base0")) &&
if !pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_base0", baseFilename)) &&
@battle.backdropBase
baseFilename = @battle.backdropBase
if time
trialName = sprintf("%s_%s", baseFilename, time)
if pbResolveBitmap(sprintf("Graphics/Battlebacks/" + trialName + "_base0"))
if pbResolveBitmap(sprintf("Graphics/Battlebacks/%s_base0", trialName))
baseFilename = trialName
end
end

View File

@@ -358,7 +358,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
# code to ensure the font is an appropriate color.
moveNameBase = button.bitmap.get_pixel(10, button.src_rect.y + 34)
end
textPos.push([moves[i].name, x, y, 2, moveNameBase, TEXT_SHADOW_COLOR])
textPos.push([moves[i].name, x, y, :center, moveNameBase, TEXT_SHADOW_COLOR])
end
pbDrawTextPositions(@overlay.bitmap, textPos)
end
@@ -408,7 +408,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
ppFraction = [(4.0 * move.pp / move.total_pp).ceil, 3].min
textPos = []
textPos.push([_INTL("PP: {1}/{2}", move.pp, move.total_pp),
448, 56, 2, PP_COLORS[ppFraction * 2], PP_COLORS[(ppFraction * 2) + 1]])
448, 56, :center, PP_COLORS[ppFraction * 2], PP_COLORS[(ppFraction * 2) + 1]])
pbDrawTextPositions(@infoOverlay.bitmap, textPos)
end
end
@@ -540,7 +540,7 @@ class Battle::Scene::TargetMenu < Battle::Scene::MenuBase
next if !button || nil_or_empty?(@texts[i])
x = button.x - self.x + (button.src_rect.width / 2)
y = button.y - self.y + 14
textpos.push([@texts[i], x, y, 2, TEXT_BASE_COLOR, TEXT_SHADOW_COLOR])
textpos.push([@texts[i], x, y, :center, TEXT_BASE_COLOR, TEXT_SHADOW_COLOR])
end
pbDrawTextPositions(@overlay.bitmap, textpos)
end

View File

@@ -214,7 +214,7 @@ class Battle::Scene::PokemonDataBox < Sprite
nameOffset = 0
nameOffset = nameWidth - 116 if nameWidth > 116
pbDrawTextPositions(self.bitmap,
[[@battler.name, @spriteBaseX + 8 - nameOffset, 12, false, NAME_BASE_COLOR, NAME_SHADOW_COLOR]]
[[@battler.name, @spriteBaseX + 8 - nameOffset, 12, :left, NAME_BASE_COLOR, NAME_SHADOW_COLOR]]
)
end
@@ -233,7 +233,7 @@ class Battle::Scene::PokemonDataBox < Sprite
gender_text = (gender == 0) ? _INTL("") : _INTL("")
base_color = (gender == 0) ? MALE_BASE_COLOR : FEMALE_BASE_COLOR
shadow_color = (gender == 0) ? MALE_SHADOW_COLOR : FEMALE_SHADOW_COLOR
pbDrawTextPositions(self.bitmap, [[gender_text, @spriteBaseX + 126, 12, false, base_color, shadow_color]])
pbDrawTextPositions(self.bitmap, [[gender_text, @spriteBaseX + 126, 12, :left, base_color, shadow_color]])
end
def draw_status
@@ -479,12 +479,13 @@ class Battle::Scene::AbilitySplashBar < Sprite
return if !@battler
textPos = []
textX = (@side == 0) ? 10 : self.bitmap.width - 8
align = (@side == 0) ? :left : :right
# Draw Pokémon's name
textPos.push([_INTL("{1}'s", @battler.name), textX, 8, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
textPos.push([_INTL("{1}'s", @battler.name), textX, 8, align,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, :outline])
# Draw Pokémon's ability
textPos.push([@battler.abilityName, textX, 38, @side == 1,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, true])
textPos.push([@battler.abilityName, textX, 38, align,
TEXT_BASE_COLOR, TEXT_SHADOW_COLOR, :outline])
pbDrawTextPositions(self.bitmap, textPos)
end