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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -6,7 +6,7 @@
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 = '5.0.0' GAME_VERSION = '5.0.0'
GAME_VERSION_NUMBER = "5.0.21 - beta" GAME_VERSION_NUMBER = "5.0.22 - beta"
POKERADAR_LIGHT_ANIMATION_RED_ID = 17 POKERADAR_LIGHT_ANIMATION_RED_ID = 17
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18 POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
@@ -20,11 +20,12 @@ module Settings
NB_POKEMON = 420 NB_POKEMON = 420
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/" CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
BATTLERS_FOLDER = "Graphics/Battlers/" BATTLERS_FOLDER = "Graphics/Battlers/"
FRONTSPRITE_POSITION_OFFSET = 15 FRONTSPRITE_POSITION_OFFSET = 20
FRONTSPRITE_SCALE = 0.6666666 FRONTSPRITE_SCALE = 0.6666666
BACKRPSPRITE_SCALE = 1 BACKRPSPRITE_SCALE = 1
EGGSPRITE_SCALE = 1 EGGSPRITE_SCALE = 1
BACKSPRITE_POSITION_OFFSET = 20 BACKSPRITE_POSITION_OFFSET = 20
FRONTSPRITE_POSITION = 200
RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW) RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW)
VAR_1_PLACEHOLDER_SPECIES = :DIALGA VAR_1_PLACEHOLDER_SPECIES = :DIALGA

View File

@@ -91,11 +91,11 @@ class Scene_Map
$game_player.straighten $game_player.straighten
$game_map.update $game_map.update
#disposeSpritesets disposeSpritesets
if RPG::Cache.need_clearing if RPG::Cache.need_clearing
RPG::Cache.clear RPG::Cache.clear
end end
#createSpritesets createSpritesets
if $game_temp.transition_processing if $game_temp.transition_processing
$game_temp.transition_processing = false $game_temp.transition_processing = false
Graphics.transition(20) Graphics.transition(20)

View File

@@ -216,6 +216,8 @@ module GameData
end end
def apply_metrics_to_sprite(sprite, index, shadow = false) 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 shadow
if (index & 1) == 1 # Foe Pokémon if (index & 1) == 1 # Foe Pokémon
sprite.x += @shadow_x * 2 sprite.x += @shadow_x * 2
@@ -227,15 +229,15 @@ module GameData
else else
# Foe Pokémon # Foe Pokémon
sprite.x += @front_sprite_x * 2 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 sprite.y -= @front_sprite_altitude * 2
end end
end end
end end
def shows_shadow? def shows_shadow?
return true #return true
# return @front_sprite_altitude > 0 return @front_sprite_altitude > 0
end end
def get_evolutions(exclude_invalid = false) def get_evolutions(exclude_invalid = false)

View File

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

View File

@@ -466,3 +466,22 @@ def Kernel.getPlateType(item)
return :FAIRY if item == PBItems::PIXIEPLATE return :FAIRY if item == PBItems::PIXIEPLATE
return -1 return -1
end end
def get_default_moves_at_level(species,level)
moveset = GameData::Species.get(species).moves
knowable_moves = []
moveset.each { |m| knowable_moves.push(m[1]) if m[0] <= level }
# Remove duplicates (retaining the latest copy of each move)
knowable_moves = knowable_moves.reverse
knowable_moves |= []
knowable_moves = knowable_moves.reverse
# Add all moves
moves = []
first_move_index = knowable_moves.length - MAX_MOVES
first_move_index = 0 if first_move_index < 0
for i in first_move_index...knowable_moves.length
#moves.push(Pokemon::Move.new(knowable_moves[i]))
moves << knowable_moves[i]
end
p moves
return moves
end

View File

@@ -1461,8 +1461,8 @@ def pbDNASplicing(pokemon, scene, supersplicers = false, superSplicer = false)
end end
#On ajoute l'autre dans le pokedex aussi #On ajoute l'autre dans le pokedex aussi
# $Trainer.pokedex.set_seen(poke1.species) $Trainer.pokedex.set_seen(poke1.species)
# $Trainer.pokedex.set_owned(poke1.species) $Trainer.pokedex.set_owned(poke1.species)
pokemon.species = poke1.species pokemon.species = poke1.species
pokemon.level = poke1.level pokemon.level = poke1.level

Binary file not shown.