mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-26 00:06:00 +00:00
Added battle debug menu (access with F9)
This commit is contained in:
@@ -157,8 +157,13 @@ class Battle
|
||||
end
|
||||
|
||||
def pbDebugMenu
|
||||
# NOTE: This doesn't do anything yet. Maybe you can write your own debugging
|
||||
# options!
|
||||
pbBattleDebug(self)
|
||||
@scene.pbRefreshEverything
|
||||
allBattlers.each { |b| b.pbCheckFormOnWeatherChange }
|
||||
pbEndPrimordialWeather
|
||||
allBattlers.each { |b| b.pbAbilityOnTerrainChange }
|
||||
allBattlers.each { |b| b.pbCheckFormOnMovesetChange }
|
||||
allBattlers.each { |b| b.pbCheckFormOnStatusChange }
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
@@ -132,6 +132,16 @@ class Battle::Scene
|
||||
@sprites["dataBox_#{idxBattler}"].refresh if @sprites["dataBox_#{idxBattler}"]
|
||||
end
|
||||
|
||||
def pbRefreshEverything
|
||||
pbCreateBackdropSprites
|
||||
@battle.battlers.each_with_index do |battler, i|
|
||||
next if !battler
|
||||
pbChangePokemon(i, @sprites["pokemon_#{i}"].pkmn)
|
||||
@sprites["dataBox_#{i}"].initializeDataBoxGraphic(@battle.pbSideSize(i))
|
||||
@sprites["dataBox_#{i}"].refresh
|
||||
end
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Party lineup
|
||||
#=============================================================================
|
||||
@@ -305,7 +315,7 @@ class Battle::Scene
|
||||
# Sprites
|
||||
#=============================================================================
|
||||
def pbAddSprite(id,x,y,filename,viewport)
|
||||
sprite = IconSprite.new(x,y,viewport)
|
||||
sprite = @sprites[id] || IconSprite.new(x,y,viewport)
|
||||
if filename
|
||||
sprite.setBitmap(filename) rescue nil
|
||||
end
|
||||
|
||||
@@ -52,7 +52,8 @@ class Battle::Scene::PokemonDataBox < SpriteWrapper
|
||||
bgFilename = ["Graphics/Pictures/Battle/databox_thin",
|
||||
"Graphics/Pictures/Battle/databox_thin_foe"][@battler.index%2]
|
||||
end
|
||||
@databoxBitmap = AnimatedBitmap.new(bgFilename)
|
||||
@databoxBitmap.dispose if @databoxBitmap
|
||||
@databoxBitmap = AnimatedBitmap.new(bgFilename)
|
||||
# Determine the co-ordinates of the data box and the left edge padding width
|
||||
if onPlayerSide
|
||||
@spriteX = Graphics.width - 244
|
||||
|
||||
Reference in New Issue
Block a user