From 5f3e975c1e69154fb9f9cd9607a88465f8448a1f Mon Sep 17 00:00:00 2001 From: infinitefusion Date: Sun, 16 Oct 2022 12:38:55 -0400 Subject: [PATCH] more fake shiny security --- .../003_Pokemon_Sprites.rb | 1 + Data/Scripts/014_Pokemon/001_Pokemon.rb | 14 +++++++++++++- Data/Scripts/050_AddOns/New Items effects.rb | 2 ++ Data/System.rxdata | Bin 28878 -> 28878 bytes 4 files changed, 16 insertions(+), 1 deletion(-) 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 79e7a4c5fd7139ddb65e220947db6e50a2845aa6..829c078de641dd75c27e5994198f650afaae10fa 100644 GIT binary patch delta 18 acmX^2kn!9@#tqRD%)jIhZ;q2FhyVaq;s{g# delta 18 acmX^2kn!9@#tqRD%$vXFZH|*DhyVash6s)T