mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-11-05 09:15:47 +00:00
Hotfix patch 6.9.2: Randomized champion crash fix
This commit is contained in:
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -5,11 +5,11 @@
|
|||||||
#==============================================================================#
|
#==============================================================================#
|
||||||
module Settings
|
module Settings
|
||||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||||
GAME_VERSION_NUMBER = "6.9.1"
|
GAME_VERSION_NUMBER = "6.9.2"
|
||||||
LATEST_GAME_RELEASE = "6.9.1"
|
LATEST_GAME_RELEASE = "6.9.2"
|
||||||
|
|
||||||
HOENN_VERSION_NUMBER = "1.3"
|
HOENN_VERSION_NUMBER = "1.3.1"
|
||||||
HOENN_LATEST_GAME_RELEASE = "1.3.2"
|
HOENN_LATEST_GAME_RELEASE = "1.3.1"
|
||||||
|
|
||||||
SNOW_DAY = true
|
SNOW_DAY = true
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ module Settings
|
|||||||
ANIMATE_REFLECTIONS = false # GAME_ID == :IF_HOENN #true
|
ANIMATE_REFLECTIONS = false # GAME_ID == :IF_HOENN #true
|
||||||
USE_REFLECTIONS = false
|
USE_REFLECTIONS = false
|
||||||
# Infinite fusion settings
|
# Infinite fusion settings
|
||||||
NB_POKEMON = 576
|
NB_POKEMON = 582
|
||||||
TRANSFER_BOX_DISCLAIMER_MESSAGE = ""
|
TRANSFER_BOX_DISCLAIMER_MESSAGE = ""
|
||||||
CUSTOM_BASE_SPRITES_FOLDER = "Graphics/CustomBattlers/local_sprites/BaseSprites/"
|
CUSTOM_BASE_SPRITES_FOLDER = "Graphics/CustomBattlers/local_sprites/BaseSprites/"
|
||||||
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
|
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
|
||||||
|
|||||||
@@ -2,22 +2,7 @@ module Encryption
|
|||||||
ENCRYPTION_KEY = [0x4A, 0x8F, 0x2C, 0xE1, 0x73, 0xB5, 0x96, 0x0D,
|
ENCRYPTION_KEY = [0x4A, 0x8F, 0x2C, 0xE1, 0x73, 0xB5, 0x96, 0x0D,
|
||||||
0x5E, 0xA2, 0x3F, 0xC7, 0x81, 0x14, 0x6B, 0xD9]
|
0x5E, 0xA2, 0x3F, 0xC7, 0x81, 0x14, 0x6B, 0xD9]
|
||||||
|
|
||||||
CHUNK_SIZE = 1 << 20
|
|
||||||
|
|
||||||
def self.xor(data)
|
def self.xor(data)
|
||||||
key = ENCRYPTION_KEY.pack("C*")
|
data.bytes.each_with_index.map { |b, i| b ^ ENCRYPTION_KEY[i % ENCRYPTION_KEY.length] }.pack("C*")
|
||||||
@full_chunk_key ||= (key * (CHUNK_SIZE / key.length)).unpack1("H*").to_i(16)
|
|
||||||
full_chunk_key = @full_chunk_key
|
|
||||||
result = String.new(capacity: data.bytesize, encoding: Encoding::BINARY)
|
|
||||||
offset = 0
|
|
||||||
while offset < data.bytesize
|
|
||||||
chunk = data.byteslice(offset, CHUNK_SIZE)
|
|
||||||
size = chunk.bytesize
|
|
||||||
chunk_key = size == CHUNK_SIZE ? full_chunk_key : (key * (size / key.length + 1)).byteslice(0, size).unpack1("H*").to_i(16)
|
|
||||||
xored = chunk.unpack1("H*").to_i(16) ^ chunk_key
|
|
||||||
result << [xored.to_s(16).rjust(size * 2, "0")].pack("H*")
|
|
||||||
offset += CHUNK_SIZE
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -548,7 +548,7 @@ class Messages
|
|||||||
@messages = [] if !@messages
|
@messages = [] if !@messages
|
||||||
arr = []
|
arr = []
|
||||||
for i in 0...array.length
|
for i in 0...array.length
|
||||||
arr[i] = (array[i] == "") ? nil : array[i]
|
arr[i] = (array[i]) ? array[i] : ""
|
||||||
end
|
end
|
||||||
@messages[type] = arr
|
@messages[type] = arr
|
||||||
end
|
end
|
||||||
@@ -557,8 +557,7 @@ class Messages
|
|||||||
@messages = [] if !@messages
|
@messages = [] if !@messages
|
||||||
arr = (@messages[type]) ? @messages[type] : []
|
arr = (@messages[type]) ? @messages[type] : []
|
||||||
for i in 0...array.length
|
for i in 0...array.length
|
||||||
arr[i] = array[i] if array[i]
|
arr[i] = (array[i]) ? array[i] : (arr[i]) ? arr[i] : ""
|
||||||
arr[i] = nil if arr[i] == ""
|
|
||||||
end
|
end
|
||||||
@messages[type] = arr
|
@messages[type] = arr
|
||||||
end
|
end
|
||||||
@@ -766,10 +765,6 @@ module MessageTypes
|
|||||||
@@messages.loadMessageFile(filename)
|
@@messages.loadMessageFile(filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.loadFallbackMessageFile(filename)
|
|
||||||
@@messagesFallback.loadMessageFile(filename)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.get(type, id)
|
def self.get(type, id)
|
||||||
ret = @@messages.get(type, id)
|
ret = @@messages.get(type, id)
|
||||||
if ret == ""
|
if ret == ""
|
||||||
|
|||||||
@@ -202,7 +202,15 @@ module GameData
|
|||||||
def generateRandomChampionSpecies(old_species)
|
def generateRandomChampionSpecies(old_species)
|
||||||
customsList = getCustomSpeciesList()
|
customsList = getCustomSpeciesList()
|
||||||
bst_range = pbGet(VAR_RANDOMIZER_TRAINER_BST)
|
bst_range = pbGet(VAR_RANDOMIZER_TRAINER_BST)
|
||||||
new_species = $game_switches[SWITCH_RANDOM_GYM_CUSTOMS] ? getSpecies(getNewCustomSpecies(old_species, customsList, bst_range)) : getSpecies(getNewSpecies(old_species, bst_range))
|
|
||||||
|
same_egg_group = $game_switches[SWITCH_RANDOM_WILD_EGG_GROUP]
|
||||||
|
includeLegendaries = $game_switches[SWITCH_RANDOM_WILD_LEGENDARIES]
|
||||||
|
|
||||||
|
if $game_switches[SWITCH_RANDOM_GYM_CUSTOMS]
|
||||||
|
new_species = getSpecies(getNewCustomSpecies(old_species, customsList, bst_range,false,includeLegendaries,same_egg_group))
|
||||||
|
else
|
||||||
|
new_species = getSpecies(getNewSpecies(old_species, bst_range,false,PBSpecies.maxValue,includeLegendaries,same_egg_group))
|
||||||
|
end
|
||||||
#every pokemon should be fully evolved
|
#every pokemon should be fully evolved
|
||||||
evolved_species_id = getEvolution(new_species)
|
evolved_species_id = getEvolution(new_species)
|
||||||
evolved_species_id = getEvolution(evolved_species_id)
|
evolved_species_id = getEvolution(evolved_species_id)
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ def pbStartOver(gameover = false)
|
|||||||
if Settings::HOENN
|
if Settings::HOENN
|
||||||
$game_switches[SWITCH_RIVAL_ON_MT_CHIMNEY] = false
|
$game_switches[SWITCH_RIVAL_ON_MT_CHIMNEY] = false
|
||||||
$game_switches[SWITCH_WAILMER_EGGS_QUEST] = false
|
$game_switches[SWITCH_WAILMER_EGGS_QUEST] = false
|
||||||
$game_variables[]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -419,7 +419,6 @@ end
|
|||||||
# Dive
|
# Dive
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
def pbDive
|
def pbDive
|
||||||
return
|
|
||||||
return false if $game_player.pbFacingEvent
|
return false if $game_player.pbFacingEvent
|
||||||
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
map_metadata = GameData::MapMetadata.try_get($game_map.map_id)
|
||||||
return false if !map_metadata || !map_metadata.dive_map_id
|
return false if !map_metadata || !map_metadata.dive_map_id
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ def new_legendary_cache
|
|||||||
Hash.new { |h, sp| h[sp] = is_legendary_num(sp) }
|
Hash.new { |h, sp| h[sp] = is_legendary_num(sp) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def getNewCustomSpecies(oldSpecies, customSpeciesList, bst_range, ignoreRivalPlaceholder, includeLegendaries, same_egg_group,
|
def getNewCustomSpecies(oldSpecies, customSpeciesList, bst_range, ignoreRivalPlaceholder=false, includeLegendaries=true, same_egg_group=false,
|
||||||
bst_cache = nil, egg_group_cache = nil, legendary_cache = nil, fallback_cache = nil)
|
bst_cache = nil, egg_group_cache = nil, legendary_cache = nil, fallback_cache = nil)
|
||||||
if $game_switches[SWITCH_LEGENDARY_MODE]
|
if $game_switches[SWITCH_LEGENDARY_MODE]
|
||||||
return dexNum(convert_species_to_legendary(oldSpecies))
|
return dexNum(convert_species_to_legendary(oldSpecies))
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ class Movie
|
|||||||
picture.bitmap = pbBitmap(frame)
|
picture.bitmap = pbBitmap(frame)
|
||||||
picture.visible=true
|
picture.visible=true
|
||||||
pbWait(Graphics.frame_rate / 20)
|
pbWait(Graphics.frame_rate / 20)
|
||||||
picture.bitmap&.dispose
|
|
||||||
picture.dispose
|
picture.dispose
|
||||||
@currentFrame += 1
|
@currentFrame += 1
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ end
|
|||||||
def mainFunctionDebug
|
def mainFunctionDebug
|
||||||
begin
|
begin
|
||||||
showLoadingScreen
|
showLoadingScreen
|
||||||
MessageTypes.loadFallbackMessageFile("Data/messages.dat") if safeExists?("Data/messages.dat")
|
MessageTypes.loadMessageFile("Data/messages.dat") if safeExists?("Data/messages.dat")
|
||||||
PluginManager.runPlugins
|
PluginManager.runPlugins
|
||||||
Compiler.main
|
Compiler.main
|
||||||
Game.initialize
|
Game.initialize
|
||||||
|
|||||||
@@ -9,16 +9,15 @@ module Settings
|
|||||||
|
|
||||||
ALTERING_CAVE_ENCOUNTERS =
|
ALTERING_CAVE_ENCOUNTERS =
|
||||||
{
|
{
|
||||||
:MONDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :PHANTUMP],
|
:MONDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :HOUNDOUR],
|
||||||
:TUESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :STANTLER],
|
:TUESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :SCRAGGY],
|
||||||
:WEDNESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :GASTLY],
|
:WEDNESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :PINECO],
|
||||||
:THURSDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :MIMIKYU],
|
:THURSDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :MAREEP],
|
||||||
:FRIDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :HOOTHOOT],
|
:FRIDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :TEDDIURSA],
|
||||||
:SATURDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :PUMPKABOO],
|
:SATURDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :AIPOM],
|
||||||
:SUNDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :MISDREAVUS],
|
:SUNDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :SMEARGLE],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
STARTUP_MESSAGES = "Pokémon Infinite Fusion 2 is now available! Download it from the game's Discord!" #Legacy starting PIF1 6.8
|
STARTUP_MESSAGES = "Pokémon Infinite Fusion 2 is now available! Download it from the game's Discord!" #Legacy starting PIF1 6.8
|
||||||
STARTUP_MESSAGES_KANTO = "Pokémon Infinite Fusion 2 is now available! Download it from the game's Discord!"
|
STARTUP_MESSAGES_KANTO = "Pokémon Infinite Fusion 2 is now available! Download it from the game's Discord!"
|
||||||
STARTUP_MESSAGES_HOENN = "Pokémon Infinite Fusion 2 is still in development. Make sure to restart the game once in a while if you experience any lag issues."
|
STARTUP_MESSAGES_HOENN = "Pokémon Infinite Fusion 2 is still in development. Make sure to restart the game once in a while if you experience any lag issues."
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Reference in New Issue
Block a user