adds fused species abilities & fixes pokedex issue

This commit is contained in:
infinitefusion
2023-08-06 10:49:26 -04:00
parent 9f44271b99
commit b8a27ff6e3
21 changed files with 102 additions and 47 deletions

View File

@@ -180,7 +180,6 @@ class PokemonIconSprite < SpriteWrapper
bodyPoke_number = getBodyID(pokemon.species)
headPoke_number = getHeadID(pokemon.species, bodyPoke_number)
bodyPoke = GameData::Species.get(bodyPoke_number).species
headPoke = GameData::Species.get(headPoke_number).species

View File

@@ -45,7 +45,6 @@ class Pokemon
attr_accessor :body_original_ability_index
attr_accessor :head_original_ability_index
# @return [Array<Pokemon::Move>] the moves known by this Pokémon
attr_accessor :moves
# @return [Array<Integer>] the IDs of moves known by this Pokémon when it was obtained
@@ -126,7 +125,9 @@ class Pokemon
end
def species_data
@species_data = GameData::Species.get(@species) if ! @species_data
if !@species_data || @species != @species_data.species
@species_data = GameData::Species.get(@species)
end
return @species_data #GameData::Species.get(@species)
end
@@ -163,7 +164,7 @@ class Pokemon
return isSpecies?(check_species)
end
bodySpecies = getBodyID(species)
checkSpeciesId = getID(nil,check_species)
checkSpeciesId = getID(nil, check_species)
return bodySpecies == checkSpeciesId
end
@@ -172,14 +173,14 @@ class Pokemon
return isSpecies?(check_species)
end
headSpecies = getHeadID(species)
checkSpeciesId = getID(nil,check_species)
checkSpeciesId = getID(nil, check_species)
return headSpecies == checkSpeciesId
end
def shiny=(value)
@shiny=value
@shiny = value
if value && Settings::SHINY_POKEMON_CHANCE != S_CHANCE_VALIDATOR
@debug_shiny=true
@debug_shiny = true
end
end
@@ -480,8 +481,6 @@ class Pokemon
return [:AlwaysMale, :AlwaysFemale, :Genderless].include?(gender_ratio)
end
#=============================================================================
# Shininess
#=============================================================================
@@ -496,13 +495,13 @@ class Pokemon
is_shiny = d < Settings::SHINY_POKEMON_CHANCE
if is_shiny
@shiny = true
@natural_shiny=true
@natural_shiny = true
end
end
if @shiny && Settings::SHINY_POKEMON_CHANCE != S_CHANCE_VALIDATOR
@debug_shiny=true
@natural_shiny=false
@debug_shiny = true
@natural_shiny = false
end
return @shiny
end
@@ -789,9 +788,9 @@ class Pokemon
body_species_id = getBasePokemonID(species)
head_species = GameData::Species.get(head_species_id)
body_species = GameData::Species.get(body_species_id)
return move_data && (pokemon_can_learn_move(head_species,move_data) || pokemon_can_learn_move(body_species,move_data))
return move_data && (pokemon_can_learn_move(head_species, move_data) || pokemon_can_learn_move(body_species, move_data))
else
return move_data && pokemon_can_learn_move(species_data,move_data)
return move_data && pokemon_can_learn_move(species_data, move_data)
end
end
@@ -1262,7 +1261,7 @@ class Pokemon
@ivMaxed = {}
@ev = {}
@hiddenPowerType = nil
@glitter=nil
@glitter = nil
GameData::Stat.each_main do |s|
@iv[s.id] = rand(IV_STAT_LIMIT + 1)
@ev[s.id] = 0