mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
more fake shiny security
This commit is contained in:
@@ -304,6 +304,7 @@ class PokemonSpeciesIconSprite < SpriteWrapper
|
||||
end
|
||||
|
||||
def shiny=(value)
|
||||
print "wut"
|
||||
@shiny = value
|
||||
refresh
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user