randomized trainers moves fixes

This commit is contained in:
infinitefusion
2022-05-09 17:35:27 -04:00
parent ad112a4b27
commit 8c87f763a3
11 changed files with 33 additions and 10 deletions

View File

@@ -216,6 +216,8 @@ module GameData
end
def apply_metrics_to_sprite(sprite, index, shadow = false)
front_sprite_y = self.is_fusion ? GameData::Species.get(getBodyID(@id_number)).front_sprite_y: @front_sprite_y
if shadow
if (index & 1) == 1 # Foe Pokémon
sprite.x += @shadow_x * 2
@@ -227,15 +229,15 @@ module GameData
else
# Foe Pokémon
sprite.x += @front_sprite_x * 2
sprite.y += (@front_sprite_y * 2) + Settings::FRONTSPRITE_POSITION_OFFSET
sprite.y += (front_sprite_y * 2) + Settings::FRONTSPRITE_POSITION_OFFSET
sprite.y -= @front_sprite_altitude * 2
end
end
end
def shows_shadow?
return true
# return @front_sprite_altitude > 0
#return true
return @front_sprite_altitude > 0
end
def get_evolutions(exclude_invalid = false)

View File

@@ -247,6 +247,7 @@ module GameData
@pokemon.each do |pkmn_data|
#replace placeholder species infinite fusion edit
species = GameData::Species.get(pkmn_data[:species]).species
original_species = species
if placeholder_species.include?(species)
species = replace_species_with_placeholder(species)
else
@@ -292,7 +293,7 @@ module GameData
else
pkmn.item = pkmn_data[:item]
end
if pkmn_data[:moves] && pkmn_data[:moves].length > 0
if pkmn_data[:moves] && pkmn_data[:moves].length > 0 && original_species == species
pkmn_data[:moves].each { |move| pkmn.learn_move(move) }
else
pkmn.reset_moves