shiny fusion fixes + custom starters option (events)

This commit is contained in:
infinitefusion
2022-10-08 13:52:17 -04:00
parent b3addeb867
commit 749cdff356
13 changed files with 87 additions and 22 deletions

View File

@@ -54,9 +54,9 @@ class PokemonSprite < SpriteWrapper
changeOrigin
end
def setPokemonBitmapFromId(id, back = false)
def setPokemonBitmapFromId(id, back = false, shiny=false, bodyShiny=false, headShiny=false)
@_iconbitmap.dispose if @_iconbitmap
@_iconbitmap = GameData::Species.sprite_bitmap_from_pokemon_id(id, back)
@_iconbitmap = GameData::Species.sprite_bitmap_from_pokemon_id(id, back,shiny, bodyShiny,headShiny)
self.bitmap = (@_iconbitmap) ? @_iconbitmap.bitmap : nil
self.color = Color.new(0, 0, 0, 0)
changeOrigin

View File

@@ -31,6 +31,8 @@ class Pokemon
# This Pokémon's shininess (true, false, nil). Is recalculated if made nil.
# @param value [Boolean, nil] whether this Pokémon is shiny
attr_writer :shiny
attr_accessor :head_shiny
attr_accessor :body_shiny
# The index of this Pokémon's ability (0, 1 are natural abilities, 2+ are
# hidden abilities)as defined for its species/form. An ability may not be
# defined at this index. Is recalculated (as 0 or 1) if made nil.
@@ -162,6 +164,13 @@ class Pokemon
return headSpecies == checkSpeciesId
end
def bodyShiny?
return @body_shiny
end
def headShiny?
return @head_shiny
end
def isFusionOf(check_species)
return hasBodyOf?(check_species) || hasHeadOf?(check_species)
@@ -444,6 +453,8 @@ class Pokemon
return [:AlwaysMale, :AlwaysFemale, :Genderless].include?(gender_ratio)
end
#=============================================================================
# Shininess
#=============================================================================