Update 6.8

This commit is contained in:
chardub
2026-07-10 15:42:06 -04:00
parent 5b85e72cb2
commit 6a6f126a18
7871 changed files with 493193 additions and 224825 deletions
@@ -4,6 +4,8 @@
class PokemonStorageScene
attr_reader :quickswap
attr_accessor :sprites
attr_accessor :choseFromParty
attr_reader :inTransferBox
def initialize
@command = 1
@@ -41,9 +43,15 @@ class PokemonStorageScene
@quickswap = false
@sprites = {}
@choseFromParty = false
@partyTabBackButton = nil
@command = command
addBackgroundPlane(@sprites, "background", "Storage/bg", @bgviewport)
@sprites["box"] = PokemonBoxSprite.new(@storage, @storage.currentBox, @boxviewport)
checkOpenTransferBox(@storage.currentBox)
@sprites["box"] = PokemonBoxSprite.new(@storage, @storage.currentBox, @boxviewport,true,@screen.filterProc)
# echoln @screen.filterProc
# if @screen.filterProc
# @sprites["box"].setFilterProc(@screen.filterProc)
# end
@sprites["boxsides"] = IconSprite.new(0, 0, @boxsidesviewport)
@sprites["boxsides"].setBitmap("Graphics/Pictures/Storage/overlay_main")
@sprites["overlay"] = BitmapSprite.new(Graphics.width, Graphics.height, @boxsidesviewport)
@@ -54,8 +62,8 @@ class PokemonStorageScene
@sprites["pokemon"].y = 134
@sprites["pokemon"].zoom_y = Settings::FRONTSPRITE_SCALE
@sprites["pokemon"].zoom_x = Settings::FRONTSPRITE_SCALE
@sprites["boxparty"] = PokemonBoxPartySprite.new(@storage.party, @boxsidesviewport)
if command != 2 # Drop down tab only on Deposit
@sprites["boxparty"] = PokemonBoxPartySprite.new(@storage.party, @boxsidesviewport,@screen.filterProc)
if command != 2 && command != 3 # Drop down tab only on Deposit and Select Pokemon
@sprites["boxparty"].x = 182
@sprites["boxparty"].y = Graphics.height
end
@@ -266,7 +274,6 @@ class PokemonStorageScene
end
return selection
end
def pbSelectBoxInternal(_party)
selection = @selection
pbSetArrow(@sprites["arrow"], selection)
@@ -369,6 +376,11 @@ class PokemonStorageScene
end
end
def setStartingTab(symbol)
@command = (symbol == :party ? 1 : 0) # 1 = party, 0 = box
end
def pbSelectPartyInternal(party, depositing)
selection = @selection
pbPartySetArrow(@sprites["arrow"], selection)
@@ -453,7 +465,7 @@ class PokemonStorageScene
end
def pbSwitchBoxToRight(newbox)
newbox = PokemonBoxSprite.new(@storage, newbox, @boxviewport, @sprites["box"].isFusionEnabled)
newbox = PokemonBoxSprite.new(@storage, newbox, @boxviewport, @sprites["box"].isFusionEnabled,@screen.filterProc)
newbox.x = 520
Graphics.frame_reset
distancePerFrame = 64 * 20 / Graphics.frame_rate
@@ -471,10 +483,11 @@ class PokemonStorageScene
@sprites["box"].dispose
@sprites["box"] = newbox
newbox.refreshAllBoxSprites
checkOpenTransferBox(newbox.boxnumber)
end
def pbSwitchBoxToLeft(newbox)
newbox = PokemonBoxSprite.new(@storage, newbox, @boxviewport, @sprites["box"].isFusionEnabled)
newbox = PokemonBoxSprite.new(@storage, newbox, @boxviewport, @sprites["box"].isFusionEnabled,@screen.filterProc)
newbox.x = -152
Graphics.frame_reset
distancePerFrame = 64 * 20 / Graphics.frame_rate
@@ -492,6 +505,7 @@ class PokemonStorageScene
@sprites["box"].dispose
@sprites["box"] = newbox
newbox.refreshAllBoxSprites
checkOpenTransferBox(newbox.boxnumber)
end
def pbJumpToBox(newbox)
@@ -503,8 +517,31 @@ class PokemonStorageScene
end
@storage.currentBox = newbox
end
checkOpenTransferBox(newbox)
end
def checkOpenTransferBox(newbox)
@inTransferBox = @storage[newbox].is_a?(StorageTransferBox)
if @inTransferBox
checkTransferBoxTutorial(newbox)
if @storage[newbox].can_use_transfer_box?
@storage[newbox].loadTransferBoxPokemon
else
@storage[newbox].setDisabled
end
end
end
def checkTransferBoxTutorial(newbox)
isTransferBox = @storage[newbox].is_a?(StorageTransferBox)
if isTransferBox
unless $PokemonGlobal.seen_transfer_box_tutorial
transferBoxTutorial
$PokemonGlobal.seen_transfer_box_tutorial=true
end
end
end
def pbSetMosaic(selection)
if !@screen.pbHeldPokemon
if @boxForMosaic != @storage.currentBox || @selectionForMosaic != selection
@@ -648,13 +685,18 @@ class PokemonStorageScene
def pbChooseBox(msg)
commands = []
boxIndices = []
for i in 0...@storage.maxBoxes
box = @storage[i]
if box
next if box.is_a?(StorageTransferBox)
commands.push(_INTL("{1} ({2}/{3})", box.name, box.nitems, box.length))
boxIndices.push(i)
end
end
return pbShowCommands(msg, commands, @storage.currentBox)
defaultIndex = boxIndices.index(@storage.currentBox) || 0
cmdIndex = pbShowCommands(msg, commands, defaultIndex)
return cmdIndex >= 0 ? boxIndices[cmdIndex] : -1
end
def pbBoxName(helptext, minchars, maxchars)
@@ -835,9 +877,9 @@ class PokemonStorageScene
def pbHardRefresh
oldPartyY = @sprites["boxparty"].y
@sprites["box"].dispose
@sprites["box"] = PokemonBoxSprite.new(@storage, @storage.currentBox, @boxviewport)
@sprites["box"] = PokemonBoxSprite.new(@storage, @storage.currentBox, @boxviewport,@screen.filterProc)
@sprites["boxparty"].dispose
@sprites["boxparty"] = PokemonBoxPartySprite.new(@storage.party, @boxsidesviewport)
@sprites["boxparty"] = PokemonBoxPartySprite.new(@storage.party, @boxsidesviewport,@screen.filterProc)
@sprites["boxparty"].y = oldPartyY
end
@@ -874,6 +916,11 @@ class PokemonStorageScene
shadow = Color.new(168, 184, 184)
nonbase = Color.new(208, 208, 208)
nonshadow = Color.new(224, 224, 224)
if isDarkMode
base, shadow = shadow, base
end
pokename = pokemon.name
textstrings = [
[pokename, 10, 2, false, base, shadow]
@@ -881,27 +928,27 @@ class PokemonStorageScene
if !pokemon.egg?
imagepos = []
if pokemon.male?
textstrings.push([_INTL("♂"), 148, 2, false, Color.new(24, 112, 216), Color.new(136, 168, 208)])
textstrings.push(["♂", 148, 2, false, Color.new(24, 112, 216), Color.new(136, 168, 208)])
elsif pokemon.female?
textstrings.push([_INTL("♀"), 148, 2, false, Color.new(248, 56, 32), Color.new(224, 152, 144)])
textstrings.push(["♀", 148, 2, false, Color.new(248, 56, 32), Color.new(224, 152, 144)])
end
imagepos.push(["Graphics/Pictures/Storage/overlay_lv", 6, 246])
textstrings.push([pokemon.level.to_s, 28, 228, false, base, shadow])
if pokemon.ability
textstrings.push([pokemon.ability.name, 86, 300, 2, base, shadow])
else
textstrings.push([_INTL("No ability"), 86, 300, 2, nonbase, nonshadow])
textstrings.push([_INTL("No ability"), 86, 300, 2, base, nonshadow])
end
if pokemon.item
textstrings.push([pokemon.item.name, 86, 336, 2, base, shadow])
else
textstrings.push([_INTL("No item"), 86, 336, 2, nonbase, nonshadow])
textstrings.push([_INTL("No item"), 86, 336, 2, base, nonshadow])
end
if pokemon.shiny?
addShinyStarsToGraphicsArray(imagepos, 156, 198, pokemon.bodyShiny?, pokemon.headShiny?, pokemon.debugShiny?, nil, nil, nil, nil, false, true)
addShinyStarsToGraphicsArray(imagepos, 156, 198, pokemon.bodyShiny?, pokemon.headShiny?, pokemon.debugShiny?, pokemon.radarShiny?, nil, nil, nil, nil, false, true)
# imagepos.push(["Graphics/Pictures/shiny", 156, 198])
end
typebitmap = AnimatedBitmap.new(_INTL("Graphics/Pictures/types"))
typebitmap = AnimatedBitmap.new("Graphics/Pictures/types")
type1_number = GameData::Type.get(pokemon.type1).id_number
type2_number = GameData::Type.get(pokemon.type2).id_number
type1rect = Rect.new(0, type1_number * 28, 64, 28)
@@ -943,4 +990,4 @@ class PokemonStorageScene
pbRefresh
end
end
end
@@ -6,15 +6,22 @@ class PokemonStorageScreen
attr_reader :storage
attr_accessor :heldpkmn
attr_accessor :fusionMode
attr_accessor :filterProc
def initialize(scene, storage)
@scene = scene
@storage = storage
@pbHeldPokemon = nil
@command =0
@command = 0
@filterProc = nil
@saveWhenPlaceDown = false
end
def pbStartScreen(command,animate=true)
def setFilter(filterProc)
@filterProc = filterProc
end
def pbStartScreen(command, animate = true)
@heldpkmn = nil
@command = command
if command == 0 # Organise
@@ -26,14 +33,21 @@ class PokemonStorageScreen
elsif command == 2 # Deposit
@scene.pbStartBox(self, command, animate)
pcDepositCommand
elsif command == 3
else
@scene.pbStartBox(self, command, animate)
@scene.pbCloseBox
end
end
# TODO: Open party screen by default.
# Handle when player chooses a Pokemon from their party instead of a box
def choosePokemon
command = COMMAND_SELECT_POKEMON
@scene.pbStartBox(self, command, true)
return pcSelectCommand
end
def pcOrganizeCommand()
isTransferBox = @storage[@storage.currentBox].is_a?(StorageTransferBox)
loop do
selected = @scene.pbSelectBox(@storage.party)
if selected == nil
@@ -65,7 +79,7 @@ class PokemonStorageScreen
if @fusionMode
pbFusionCommands(selected)
else
organizeActions(selected, pokemon, heldpoke, isTransferBox)
organizeActions(selected, pokemon, heldpoke, @scene.inTransferBox)
end
end
end
@@ -87,8 +101,6 @@ class PokemonStorageScreen
cmdCancel = -1
cmdNickname = -1
echoln selected
if heldpoke
helptext = _INTL("{1} is selected.", heldpoke.name)
commands[cmdMove = commands.length] = (pokemon) ? _INTL("Shift") : _INTL("Place")
@@ -109,7 +121,7 @@ class PokemonStorageScreen
commands[cmdWithdraw = commands.length] = (selected[0] == -1) ? _INTL("Store") : _INTL("Withdraw")
commands[cmdItem = commands.length] = _INTL("Item") if !isTransferBox
commands[cmdRelease = commands.length] = _INTL("Release") if !isTransferBox
commands[cmdRelease = commands.length] = _INTL("Release")
commands[cmdDebug = commands.length] = _INTL("Debug") if $DEBUG
commands[cmdCancel = commands.length] = _INTL("Cancel")
command = pbShowCommands(helptext, commands)
@@ -153,6 +165,51 @@ class PokemonStorageScreen
end
end
def pcSelectCommand
@scene.choseFromParty = true
loop do
selected = @scene.pbSelectBox(@storage.party)
if selected == nil
next if pbConfirm(_INTL("Continue Box operations?"))
break
else
case selected[0]
when -2 # Party Pokémon
pbDisplay(_INTL("Which one will you choose?"))
next
when -3 # Close box
if pbConfirm(_INTL("Cancel choosing a Pokémon?"))
pbSEPlay("PC close")
break
end
return nil
when -4 # Box name
pbBoxCommands
next
end
pokemon = @storage[selected[0], selected[1]]
next if !pokemon
if @filterProc.call(pokemon)
command = pbShowCommands(_INTL("{1} is selected.", pokemon.name), [
_INTL("Choose"),
_INTL("Summary"),
_INTL("Cancel")
])
case command
when 0 then
return selected
when 1 then
pbSummary(selected, nil)
end
else
pbDisplay(_INTL("This Pokémon cannot be chosen..."))
next
end
end
end
@scene.pbCloseBox
end
def pcWithdrawCommand
isTransferBox = @storage[@storage.currentBox].is_a?(StorageTransferBox)
loop do
@@ -325,8 +382,9 @@ class PokemonStorageScreen
pbDisplay(_INTL("Your party's full!"))
return false
end
if @storage[box].is_a?(StorageTransferBox)
if @scene.inTransferBox && @storage[box].can_use_transfer_box?
pokemon = $PokemonStorage[*selected]
return if @storage[box].check_is_duplicate(pokemon)
unless verifyTransferBoxAutosave
return
end
@@ -388,13 +446,13 @@ class PokemonStorageScreen
def pbHold(selected)
box = selected[0]
index = selected[1]
if @storage[box].is_a?(StorageTransferBox)
if @scene.inTransferBox && box != -1
pokemon = $PokemonStorage[*selected]
return if @storage[box].check_is_duplicate(pokemon)
unless verifyTransferBoxAutosave
return
end
end
if box == -1 && pbAble?(@storage[box, index]) && pbAbleCount <= 1
pbPlayBuzzerSE
pbDisplay(_INTL("That's your last Pokémon!"))
@@ -404,18 +462,21 @@ class PokemonStorageScreen
@heldpkmn = @storage[box, index]
@storage.pbDelete(box, index)
@scene.pbRefresh
if @scene.inTransferBox && box != -1
@saveWhenPlaceDown = true
end
end
def pbPlace(selected)
box = selected[0]
index = selected[1]
if @storage[box].is_a?(StorageTransferBox)
if @scene.inTransferBox && box != -1
if @heldpkmn.owner.name == "RENTAL"
pbMessage(_INTL("This Pokémon cannot be transferred."))
return
end
unless verifyTransferBoxAutosave
return if @storage[box].check_is_duplicate(@heldpkmn)
unless verifyTransferBoxAutosave #Warning on the first time
return
end
end
@@ -445,6 +506,10 @@ class PokemonStorageScreen
end
@scene.pbRefresh
@heldpkmn = nil
if @saveWhenPlaceDown
@saveWhenPlaceDown = false
Game.save()
end
end
def pbSwap(selected)
@@ -455,11 +520,14 @@ class PokemonStorageScreen
raise _INTL("Position {1},{2} is empty...", box, index)
end
if @storage[box].is_a?(StorageTransferBox)
if @scene.inTransferBox && box != -1
if @heldpkmn.owner.name == "RENTAL"
pbMessage(_INTL("This Pokémon cannot be transferred."))
return
end
pokemon = $PokemonStorage[*selected]
return if @storage[box].check_is_duplicate(pokemon)
unless verifyTransferBoxAutosave
return
end
@@ -483,6 +551,10 @@ class PokemonStorageScreen
tmp = @storage[box, index]
@storage[box, index] = @heldpkmn
@heldpkmn = tmp
if @saveWhenPlaceDown
@saveWhenPlaceDown = false
Game.save()
end
@scene.pbRefresh
return true
end
@@ -589,8 +661,8 @@ class PokemonStorageScreen
commands = []
commands << cmd_jump
commands << cmd_wallpaper
commands << cmd_name if !@storage[@storage.currentBox].is_a?(StorageTransferBox)
commands << cmd_wallpaper unless @storage[@storage.currentBox].is_a?(StorageTransferBox)
commands << cmd_name unless @storage[@storage.currentBox].is_a?(StorageTransferBox)
commands << cmd_info if @storage[@storage.currentBox].is_a?(StorageTransferBox)
commands << cmd_cancel
@@ -604,23 +676,21 @@ class PokemonStorageScreen
when cmd_name
boxCommandName
when cmd_info
boxCommandTransferInfo
transferBoxTutorial
end
end
def boxCommandTransferInfo
pbMessage(_INTL("This is the Transfer Box. It's used to transfer Pokémon between savefiles!"))
pbMessage(_INTL("Any Pokémon that is placed in this box will be shared between all savefiles of Pokémon Infinite Fusion 1 and Pokémon Infinite Fusion 2."))
end
def boxCommandName
@scene.pbBoxName(_INTL("Box name?"), 0, 20)
end
def boxCommandJump
destbox = @scene.pbChooseBox(_INTL("Jump to which Box?"))
if destbox >= 0
@scene.pbJumpToBox(destbox)
end
end
def boxCommandSetWallpaper
papers = @storage.availableWallpapers
index = 0
@@ -800,7 +870,7 @@ class PokemonStorageScreen
end
isSuperSplicer = isSuperSplicer?(@fusionItem)
selectedHead = selectFusion(pokemon, heldpoke, isSuperSplicer)
selectedHead, selected_sprite = selectFusion(pokemon, heldpoke, isSuperSplicer)
if selectedHead == nil
pbDisplay(_INTL("It won't have any effect."))
return false
@@ -814,7 +884,7 @@ class PokemonStorageScreen
if (Kernel.pbConfirmMessage(_INTL("Fuse the two Pokémon?")))
playingBGM = $game_system.getPlayingBGM
pbFuse(selectedHead, selectedBase, @fusionItem)
pbFuse(selectedHead, selectedBase, @fusionItem, selected_sprite)
if canDeleteItem(@fusionItem)
$PokemonBag.pbDeleteItem(@fusionItem)
end
@@ -859,7 +929,7 @@ class PokemonStorageScreen
scene.pbDisplay(_INTL("It won't have any effect."))
return
end
if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be reversed?", pokemon.name))
if Kernel.pbConfirmMessage(_INTL("Should {1} be reversed?", pokemon.name))
reverseFusion(pokemon)
$PokemonBag.pbDeleteItem(:DNAREVERSER) if $PokemonBag.pbQuantity(:INFINITEREVERSERS) <= 0
end
@@ -875,7 +945,7 @@ class PokemonStorageScreen
item = selectSplicer()
return if item == nil
isSuperSplicer = isSuperSplicer?(item)
if pbUnfuse(pokemon, @scene, isSuperSplicer, selected)
if pbUnfuse(pokemon, @scene, nil, selected)
if canDeleteItem(item)
$PokemonBag.pbDeleteItem(item)
end
@@ -34,6 +34,7 @@ class PokemonStorageScreen
pbHold(selected)
pbDisplay(_INTL("Select a Pokémon to fuse it with"))
@scene.sprites["box"].disableFusions()
return
end
if !poke_body
@@ -109,7 +110,7 @@ class PokemonStorageScreen
end
isSuperSplicer = isSuperSplicer?(@fusionItem)
selectedHead = selectFusion(pokemon, heldpoke, isSuperSplicer)
selectedHead, selected_sprite = selectFusion(pokemon, heldpoke, isSuperSplicer)
if selectedHead == nil
pbDisplay(_INTL("It won't have any effect."))
return false
@@ -123,7 +124,7 @@ class PokemonStorageScreen
if (Kernel.pbConfirmMessage(_INTL("Fuse the two Pokémon?")))
playingBGM = $game_system.getPlayingBGM
pbFuse(selectedHead, selectedBase, @fusionItem)
pbFuse(selectedHead, selectedBase, @fusionItem, selected_sprite)
if canDeleteItem(@fusionItem)
$PokemonBag.pbDeleteItem(@fusionItem)
end
@@ -168,7 +169,7 @@ class PokemonStorageScreen
scene.pbDisplay(_INTL("It won't have any effect."))
return
end
if Kernel.pbConfirmMessageSerious(_INTL("Should {1} be reversed?", pokemon.name))
if Kernel.pbConfirmMessage(_INTL("Should {1} be reversed?", pokemon.name))
reverseFusion(pokemon)
$PokemonBag.pbDeleteItem(:DNAREVERSER) if $PokemonBag.pbQuantity(:INFINITEREVERSERS) <= 0
end
@@ -184,7 +185,7 @@ class PokemonStorageScreen
item = selectSplicer()
return if item == nil
isSuperSplicer = isSuperSplicer?(item)
if pbUnfuse(pokemon, @scene, isSuperSplicer, selected)
if pbUnfuse(pokemon, @scene, nil, selected)
if canDeleteItem(item)
$PokemonBag.pbDeleteItem(item)
end
@@ -9,6 +9,7 @@ class PokemonBoxIcon < IconSprite
@pokemon = pokemon
@release = Interpolator.new
@startRelease = false
@enabled=true
refresh
end
@@ -66,20 +67,20 @@ class PokemonBoxIcon < IconSprite
@startRelease = true
end
def refresh(fusion_enabled = true)
return if !@pokemon
if useRegularIcon(@pokemon.species) || @pokemon.egg?
self.setBitmap(GameData::Species.icon_filename_from_pokemon(@pokemon))
else
self.setBitmapDirectly(createFusionIcon(@pokemon.species, @pokemon.spriteform_head, @pokemon.spriteform_body))
if fusion_enabled
self.visible = true
else
self.opacity = false
end
end
self.src_rect = Rect.new(0, 0, self.bitmap.height, self.bitmap.height)
end
# def refresh(fusion_enabled = true, filter_proc = nil)
# return if !@pokemon
# if useRegularIcon(@pokemon.species) || @pokemon.egg?
# self.setBitmap(GameData::Species.icon_filename_from_pokemon(@pokemon))
# else
# self.setBitmapDirectly(createFusionIcon(@pokemon.species, @pokemon.spriteform_head, @pokemon.spriteform_body))
# if fusion_enabled
# self.visible = true
# else
# self.opacity = false
# end
# end
# self.src_rect = Rect.new(0, 0, self.bitmap.height, self.bitmap.height)
# end
def update
super
@@ -3,16 +3,24 @@
# Party pop-up panel
#===============================================================================
class PokemonBoxPartySprite < SpriteWrapper
def initialize(party, viewport = nil)
attr_accessor :filterProc
def initialize(party, viewport = nil, filter= nil)
super(viewport)
@party = party
@boxbitmap = AnimatedBitmap.new("Graphics/Pictures/Storage/overlay_party")
dark_mode = isDarkMode
party_tab_path ="Graphics/Pictures/Storage/overlay_party"
party_tab_path += "_dark" if dark_mode
@boxbitmap = AnimatedBitmap.new(party_tab_path)
@pokemonsprites = []
@filterProc = filter
for i in 0...Settings::MAX_PARTY_SIZE
@pokemonsprites[i] = nil
pokemon = @party[i]
if pokemon
@pokemonsprites[i] = PokemonBoxIcon.new(pokemon, viewport)
@pokemonsprites[i].apply_filter(@filterProc)
end
end
@contents = BitmapWrapper.new(172, 352)
@@ -90,7 +98,7 @@ class PokemonBoxPartySprite < SpriteWrapper
def refresh
@contents.blt(0, 0, @boxbitmap.bitmap, Rect.new(0, 0, 172, 352))
pbDrawTextPositions(self.bitmap, [
[_INTL("Back"), 86, 240, 2, Color.new(248, 248, 248), Color.new(80, 80, 80), 1]
[_INTL("Boxes"), 86, 240, 2, Color.new(248, 248, 248), Color.new(80, 80, 80), 1]
])
xvalues = [] # [18, 90, 18, 90, 18, 90]
yvalues = [] # [2, 18, 66, 82, 130, 146]
@@ -4,35 +4,43 @@
class PokemonBoxSprite < SpriteWrapper
attr_accessor :refreshBox
attr_accessor :refreshSprites
def initialize(storage, boxnumber, viewport = nil, fusionsEnabled = true)
attr_accessor :filterProc
attr_reader :boxnumber
def initialize(storage, boxnumber, viewport = nil, fusionsEnabled = true, filter = nil)
super(viewport)
@storage = storage
@boxnumber = boxnumber
@refreshBox = true
@refreshSprites = true
@pokemonsprites = []
@filterProc = filter
for i in 0...PokemonBox::BOX_SIZE
@pokemonsprites[i] = nil
pokemon = @storage[boxnumber, i]
@pokemonsprites[i] = PokemonBoxIcon.new(pokemon, viewport)
@pokemonsprites[i].apply_filter(@filterProc)
end
@contents = BitmapWrapper.new(324, 296)
self.bitmap = @contents
self.x = 184
self.y = 18
@fusions_enabled = fusionsEnabled
refresh
end
def setFilterProc(filter)
@filterProc=filter
end
def disableFusions()
@fusions_enabled = false
#@fusions_enabled = false
@filterProc = proc { |pokemon| pokemon&.isFusion? == false }
refreshAllBoxSprites()
end
def enableFusions()
@fusions_enabled = true
@filterProc = nil
# @fusions_enabled = true
refreshAllBoxSprites()
end
@@ -159,11 +167,13 @@ class PokemonBoxSprite < SpriteWrapper
end
end
def refreshAllBoxSprites
# spriteLoader = BattleSpriteLoader.new
#@filterProc is called on the @pokemon object of each BoxIcon.
# If true, full opacity, selectable, otherwise, low opacity, not selectable
def refreshAllBoxSprites()
for i in 0...PokemonBox::BOX_SIZE
if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
@pokemonsprites[i].refresh(@fusions_enabled)
@pokemonsprites[i].refresh
@pokemonsprites[i].apply_filter(@filterProc)
end
# spriteLoader.preload_sprite_from_pokemon(@pokemonsprites[i].pokemon) if @pokemonsprites[i].pokemon
end
@@ -174,6 +184,7 @@ class PokemonBoxSprite < SpriteWrapper
for i in 0...PokemonBox::BOX_SIZE
if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
@pokemonsprites[i].update
#@pokemonsprites[i].apply_filter(@filterProc)
end
end
end