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

@@ -6,7 +6,7 @@
module Settings
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
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_GREEN_ID = 18
@@ -20,11 +20,12 @@ module Settings
NB_POKEMON = 420
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
BATTLERS_FOLDER = "Graphics/Battlers/"
FRONTSPRITE_POSITION_OFFSET = 15
FRONTSPRITE_POSITION_OFFSET = 20
FRONTSPRITE_SCALE = 0.6666666
BACKRPSPRITE_SCALE = 1
EGGSPRITE_SCALE = 1
BACKSPRITE_POSITION_OFFSET = 20
FRONTSPRITE_POSITION = 200
RIVAL_STARTER_PLACEHOLDER_SPECIES = :MEW #(MEW)
VAR_1_PLACEHOLDER_SPECIES = :DIALGA

View File

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

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

View File

@@ -465,4 +465,23 @@ def Kernel.getPlateType(item)
return :DARK if item == PBItems::DREADPLATE
return :FAIRY if item == PBItems::PIXIEPLATE
return -1
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
#On ajoute l'autre dans le pokedex aussi
# $Trainer.pokedex.set_seen(poke1.species)
# $Trainer.pokedex.set_owned(poke1.species)
$Trainer.pokedex.set_seen(poke1.species)
$Trainer.pokedex.set_owned(poke1.species)
pokemon.species = poke1.species
pokemon.level = poke1.level