mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-03-12 19:32:03 +00:00
shiny fusion fixes + custom starters option (events)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
#=============================================================================
|
||||
|
||||
Reference in New Issue
Block a user