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
|
end
|
||||||
|
|
||||||
def shiny=(value)
|
def shiny=(value)
|
||||||
|
print "wut"
|
||||||
@shiny = value
|
@shiny = value
|
||||||
refresh
|
refresh
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class Pokemon
|
|||||||
attr_accessor :statusCount
|
attr_accessor :statusCount
|
||||||
# This Pokémon's shininess (true, false, nil). Is recalculated if made nil.
|
# This Pokémon's shininess (true, false, nil). Is recalculated if made nil.
|
||||||
# @param value [Boolean, nil] whether this Pokémon is shiny
|
# @param value [Boolean, nil] whether this Pokémon is shiny
|
||||||
attr_writer :shiny
|
#attr_writer :shiny
|
||||||
attr_accessor :head_shiny
|
attr_accessor :head_shiny
|
||||||
attr_accessor :body_shiny
|
attr_accessor :body_shiny
|
||||||
attr_accessor :debug_shiny
|
attr_accessor :debug_shiny
|
||||||
@@ -102,6 +102,8 @@ class Pokemon
|
|||||||
# Maximum number of moves a Pokémon can know at once
|
# Maximum number of moves a Pokémon can know at once
|
||||||
MAX_MOVES = 4
|
MAX_MOVES = 4
|
||||||
|
|
||||||
|
SHINY_CHANCE = 16
|
||||||
|
|
||||||
def self.play_cry(species, form = 0, volume = 90, pitch = 100)
|
def self.play_cry(species, form = 0, volume = 90, pitch = 100)
|
||||||
GameData::Species.play_cry_from_species(species, form, volume, pitch)
|
GameData::Species.play_cry_from_species(species, form, volume, pitch)
|
||||||
end
|
end
|
||||||
@@ -165,6 +167,13 @@ class Pokemon
|
|||||||
return headSpecies == checkSpeciesId
|
return headSpecies == checkSpeciesId
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def shiny=(value)
|
||||||
|
@shiny=value
|
||||||
|
if value && Settings::SHINY_POKEMON_CHANCE != SHINY_CHANCE
|
||||||
|
@debug_shiny=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def debugShiny?
|
def debugShiny?
|
||||||
return @debug_shiny
|
return @debug_shiny
|
||||||
end
|
end
|
||||||
@@ -473,6 +482,9 @@ class Pokemon
|
|||||||
d = b ^ c
|
d = b ^ c
|
||||||
@shiny = d < Settings::SHINY_POKEMON_CHANCE
|
@shiny = d < Settings::SHINY_POKEMON_CHANCE
|
||||||
end
|
end
|
||||||
|
if @shiny && Settings::SHINY_POKEMON_CHANCE != SHINY_CHANCE
|
||||||
|
@debug_shiny=true
|
||||||
|
end
|
||||||
return @shiny
|
return @shiny
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1410,8 +1410,10 @@ def pbUnfuse(pokemon, scene, supersplicers, pcPosition = nil)
|
|||||||
poke2.shiny = true
|
poke2.shiny = true
|
||||||
elsif pokemon.bodyShiny?
|
elsif pokemon.bodyShiny?
|
||||||
pokemon.shiny = true
|
pokemon.shiny = true
|
||||||
|
poke2.shiny = false
|
||||||
elsif pokemon.headShiny?
|
elsif pokemon.headShiny?
|
||||||
poke2.shiny = true
|
poke2.shiny = true
|
||||||
|
pokemon.shiny = false
|
||||||
else #shiny was obtained already fused
|
else #shiny was obtained already fused
|
||||||
if rand(2) == 0
|
if rand(2) == 0
|
||||||
pokemon.shiny = true
|
pokemon.shiny = true
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user