diff --git a/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb b/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb index 243575ae3..4d44eeae7 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon-related/003_Pokemon_Sprites.rb @@ -304,6 +304,7 @@ class PokemonSpeciesIconSprite < SpriteWrapper end def shiny=(value) + print "wut" @shiny = value refresh end diff --git a/Data/Scripts/014_Pokemon/001_Pokemon.rb b/Data/Scripts/014_Pokemon/001_Pokemon.rb index acc522b32..4d1e48e8e 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon.rb @@ -30,7 +30,7 @@ class Pokemon attr_accessor :statusCount # 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_writer :shiny attr_accessor :head_shiny attr_accessor :body_shiny attr_accessor :debug_shiny @@ -102,6 +102,8 @@ class Pokemon # Maximum number of moves a Pokémon can know at once MAX_MOVES = 4 + SHINY_CHANCE = 16 + def self.play_cry(species, form = 0, volume = 90, pitch = 100) GameData::Species.play_cry_from_species(species, form, volume, pitch) end @@ -165,6 +167,13 @@ class Pokemon return headSpecies == checkSpeciesId end + def shiny=(value) + @shiny=value + if value && Settings::SHINY_POKEMON_CHANCE != SHINY_CHANCE + @debug_shiny=true + end + end + def debugShiny? return @debug_shiny end @@ -473,6 +482,9 @@ class Pokemon d = b ^ c @shiny = d < Settings::SHINY_POKEMON_CHANCE end + if @shiny && Settings::SHINY_POKEMON_CHANCE != SHINY_CHANCE + @debug_shiny=true + end return @shiny end diff --git a/Data/Scripts/050_AddOns/New Items effects.rb b/Data/Scripts/050_AddOns/New Items effects.rb index ef60919f5..970c969d4 100644 --- a/Data/Scripts/050_AddOns/New Items effects.rb +++ b/Data/Scripts/050_AddOns/New Items effects.rb @@ -1410,8 +1410,10 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil) poke2.shiny = true elsif pokemon.bodyShiny? pokemon.shiny = true + poke2.shiny = false elsif pokemon.headShiny? poke2.shiny = true + pokemon.shiny = false else #shiny was obtained already fused if rand(2) == 0 pokemon.shiny = true diff --git a/Data/System.rxdata b/Data/System.rxdata index 79e7a4c5f..829c078de 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ