Fixes movesets reset bug

This commit is contained in:
infinitefusion
2022-11-01 19:08:31 -04:00
parent cd906e7f1c
commit cddcf22096
32 changed files with 56 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Data/Map769.rxdata Normal file

Binary file not shown.

BIN
Data/Map770.rxdata Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -297,7 +297,7 @@ module GameData
if isRematch if isRematch
nbRematch = getNumberRematch(rematchId) nbRematch = getNumberRematch(rematchId)
level = getRematchLevel(level, nbRematch) level = getRematchLevel(level, nbRematch)
species = evolveRematchPokemon(nbRematch, species) species = getSpecies(evolveRematchPokemon(nbRematch, species)).id
end end
pkmn = Pokemon.new(species, level, trainer, false) pkmn = Pokemon.new(species, level, trainer, false)

View File

@@ -173,7 +173,7 @@ def pbChangeLevel(pkmn, newlevel, scene)
pbLearnMove(pkmn, i[1], true) { scene.pbUpdate } pbLearnMove(pkmn, i[1], true) { scene.pbUpdate }
end end
# Check for evolution # Check for evolution
newspecies = pkmn.check_evolution_on_level_up(scene) newspecies = pkmn.check_evolution_on_level_up
if newspecies if newspecies
pbFadeOutInWithMusic { pbFadeOutInWithMusic {
evo = PokemonEvolutionScene.new evo = PokemonEvolutionScene.new

View File

@@ -491,7 +491,6 @@ class PokemonEvolutionScene
def pbStartScreen(pokemon,newspecies,reversing=false) def pbStartScreen(pokemon,newspecies,reversing=false)
@pokemon = pokemon @pokemon = pokemon
@newspecies = newspecies @newspecies = newspecies
@sprites = {} @sprites = {}
@bgviewport = Viewport.new(0,0,Graphics.width,Graphics.height) @bgviewport = Viewport.new(0,0,Graphics.width,Graphics.height)

View File

@@ -86,6 +86,54 @@ def extract_custom_sprites_that_evolve_into_non_customs(includeOnlyNextEvos=true
end end
def extract_pokes_with_non_custom_final_evos(includeOnlyNextEvos=true)
outfile = "nonCustomFinals.csv"
customSpecies = getCustomSpeciesList()
alreadyWritten = []
File.open(outfile,"wb") { |f|
for dexNum in customSpecies
species = GameData::Species.get(dexNum)
dex_body = getBodyID(species)
dex_head = getHeadID(species,dex_body)
evolutions = species.get_evolutions
nextEvolutions=evolutions
if includeOnlyNextEvos
nextEvolutions = getNextEvolutions(species,evolutions)
end
next if nextEvolutions.empty?
for evolution in nextEvolutions
evoSpecies = evolution[0]
isFinalEvo = GameData::Species.get(evoSpecies).get_evolutions.empty?
if !customSpriteExists(evoSpecies) && !alreadyWritten.include?(evoSpecies) && isFinalEvo
body = getBodyID(evoSpecies)
head = getHeadID(evoSpecies,body)
f.write((evoSpecies.to_s) +";")
f.write((head.to_s) +";")
f.write(".;")
f.write((body.to_s) +";")
f.write("evolves from ;")
f.write(species.id.to_s) + ";"
f.write((dex_head.to_s) +";")
f.write(".;")
f.write((dex_body.to_s) +";")
f.write("\n")
alreadyWritten << evoSpecies
end
end
end
}
end
def extract_incomplete_evolution_lines def extract_incomplete_evolution_lines
outfile = "incompleteLines.txt" outfile = "incompleteLines.txt"

View File

@@ -229,7 +229,7 @@ def convertAllPokemon()
end end
} }
Kernel.initRandomTypeArray() Kernel.initRandomTypeArray()
if $game_switches[987] #randomized trainers if $game_switches[SWITCH_RANDOM_TRAINERS] #randomized trainers
Kernel.pbShuffleTrainers() Kernel.pbShuffleTrainers()
end end
if $game_switches[956] #randomized pokemon if $game_switches[956] #randomized pokemon
@@ -265,7 +265,7 @@ end
def convertTrainers() def convertTrainers()
if ($game_switches[987]) if ($game_switches[SWITCH_RANDOM_TRAINERS])
Kernel.pbShuffleTrainers() Kernel.pbShuffleTrainers()
end end
end end

View File

@@ -97,7 +97,7 @@ module UnrealTime
# Initial date. In sequence: Year, month, day, hour and minutes. # Initial date. In sequence: Year, month, day, hour and minutes.
# Method UnrealTime.reset resets time back to this time. # Method UnrealTime.reset resets time back to this time.
def self.initial_date def self.initial_date
return Time.local(2000,1,1, 12,0) return Time.local(2000,1,1, 4,0)
end end
# Advance to next time. If time already passed, advance # Advance to next time. If time already passed, advance

View File

@@ -80,6 +80,7 @@ module MapExporter
for z in 0..2 for z in 0..2
tile_id = @@map.data[x, y, z] || 0 tile_id = @@map.data[x, y, z] || 0
priority = @@map.priorities[tile_id] priority = @@map.priorities[tile_id]
next if priority == nil
next if priority != 1 next if priority != 1
tag_data = GameData::TerrainTag.try_get(@@map.terrain_tags[tile_id]) tag_data = GameData::TerrainTag.try_get(@@map.terrain_tags[tile_id])
next if !tag_data || tag_data.shows_reflections next if !tag_data || tag_data.shows_reflections
@@ -158,6 +159,7 @@ module MapExporter
for z in 0..2 for z in 0..2
tile_id = @@map.data[x, y, z] || 0 tile_id = @@map.data[x, y, z] || 0
priority = @@map.priorities[tile_id] priority = @@map.priorities[tile_id]
next if priority == nil
next if priority >= 1 next if priority >= 1
tag_data = GameData::TerrainTag.try_get(@@map.terrain_tags[tile_id]) tag_data = GameData::TerrainTag.try_get(@@map.terrain_tags[tile_id])
next if !tag_data || tag_data.shows_reflections next if !tag_data || tag_data.shows_reflections
@@ -188,6 +190,7 @@ module MapExporter
for z in 0..2 for z in 0..2
tile_id = @@map.data[x, y, z] || 0 tile_id = @@map.data[x, y, z] || 0
priority = @@map.priorities[tile_id] priority = @@map.priorities[tile_id]
next if priority == nil
next if priority < 2 next if priority < 2
tag_data = GameData::TerrainTag.try_get(@@map.terrain_tags[tile_id]) tag_data = GameData::TerrainTag.try_get(@@map.terrain_tags[tile_id])
next if !tag_data || tag_data.shows_reflections next if !tag_data || tag_data.shows_reflections

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.