mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 06:04:59 +00:00
Merge branch 'dev' into ai
This commit is contained in:
@@ -27,13 +27,13 @@ class Battle
|
||||
weather_data = GameData::BattleWeather.try_get(@field.weather)
|
||||
pbCommonAnimation(weather_data.animation) if weather_data
|
||||
case @field.weather
|
||||
# when :Sun then pbDisplay(_INTL("The sunlight is strong."))
|
||||
# when :Rain then pbDisplay(_INTL("Rain continues to fall."))
|
||||
when :Sun then pbDisplay(_INTL("The sunlight is strong."))
|
||||
when :Rain then pbDisplay(_INTL("Rain continues to fall."))
|
||||
when :Sandstorm then pbDisplay(_INTL("The sandstorm is raging."))
|
||||
when :Hail then pbDisplay(_INTL("The hail is crashing down."))
|
||||
# when :HarshSun then pbDisplay(_INTL("The sunlight is extremely harsh."))
|
||||
# when :HeavyRain then pbDisplay(_INTL("It is raining heavily."))
|
||||
# when :StrongWinds then pbDisplay(_INTL("The wind is strong."))
|
||||
when :HarshSun then pbDisplay(_INTL("The sunlight is extremely harsh."))
|
||||
when :HeavyRain then pbDisplay(_INTL("It is raining heavily."))
|
||||
when :StrongWinds then pbDisplay(_INTL("The wind is strong."))
|
||||
when :ShadowSky then pbDisplay(_INTL("The shadow sky continues."))
|
||||
end
|
||||
# Effects due to weather
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ class Battle::Scene::SafariDataBox < Sprite
|
||||
base = Color.new(72, 72, 72)
|
||||
shadow = Color.new(184, 184, 184)
|
||||
textpos = []
|
||||
textpos.push([_INTL("Safari Balls"), 30, 14, false, base, shadow])
|
||||
textpos.push([_INTL("Left: {1}", @battle.ballCount), 30, 44, false, base, shadow])
|
||||
textpos.push([_INTL("Safari Balls"), 30, 14, :left, base, shadow])
|
||||
textpos.push([_INTL("Left: {1}", @battle.ballCount), 30, 44, :left, base, shadow])
|
||||
pbDrawTextPositions(self.bitmap, textpos)
|
||||
end
|
||||
|
||||
|
||||
@@ -235,15 +235,15 @@ class Battle::Scene
|
||||
window.contents.clear
|
||||
pbSetSystemFont(window.contents)
|
||||
textpos = [
|
||||
[battler1.name, 64, 6, 2, Color.new(248, 0, 0), Color.new(208, 208, 200)],
|
||||
[_INTL("VS"), 144, 6, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[battler2.name, 224, 6, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Mind"), 144, 54, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Skill"), 144, 86, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Body"), 144, 118, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[sprintf("%d", total1), 64, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Judgment"), 144, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[sprintf("%d", total2), 224, 166, 2, Color.new(72, 72, 72), Color.new(208, 208, 200)]
|
||||
[battler1.name, 64, 6, :center, Color.new(248, 0, 0), Color.new(208, 208, 200)],
|
||||
[_INTL("VS"), 144, 6, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[battler2.name, 224, 6, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Mind"), 144, 54, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Skill"), 144, 86, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Body"), 144, 118, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[total1.to_s, 64, 166, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[_INTL("Judgment"), 144, 166, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)],
|
||||
[total2.to_s, 224, 166, :center, Color.new(72, 72, 72), Color.new(208, 208, 200)]
|
||||
]
|
||||
pbDrawTextPositions(window.contents, textpos)
|
||||
images = []
|
||||
|
||||
Reference in New Issue
Block a user