more fake shiny security

This commit is contained in:
infinitefusion
2022-10-16 12:38:55 -04:00
parent 4c8fc31bde
commit 5f3e975c1e
4 changed files with 16 additions and 1 deletions

View File

@@ -304,6 +304,7 @@ class PokemonSpeciesIconSprite < SpriteWrapper
end
def shiny=(value)
print "wut"
@shiny = value
refresh
end

View File

@@ -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

View File

@@ -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

Binary file not shown.