Added some Gen 8 item effects, added super shininess

This commit is contained in:
Maruno17
2021-06-23 23:15:15 +01:00
parent 0ad86e6b03
commit feb9e3b2de
20 changed files with 586 additions and 171 deletions

View File

@@ -388,6 +388,24 @@ class Pokemon
return @shiny
end
# @return [Boolean] whether this Pokémon is super shiny (differently colored,
# square sparkles)
def super_shiny?
if @super_shiny.nil?
a = @personalID ^ @owner.id
b = a & 0xFFFF
c = (a >> 16) & 0xFFFF
d = b ^ c
@super_shiny = (d == 0)
end
return @super_shiny
end
def super_shiny=(value)
@super_shiny = value
@shiny = true if @super_shiny
end
#=============================================================================
# Ability
#=============================================================================