mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
shinies glitter balls fix
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -189,6 +189,10 @@ class PokeBattle_Battler
|
||||
end
|
||||
alias isShiny? shiny?
|
||||
|
||||
def glitter?
|
||||
return @pokemon.glitter
|
||||
end
|
||||
|
||||
def owned?
|
||||
return false if !@battle.wildBattle?
|
||||
return $Trainer.owned?(displaySpecies)
|
||||
|
||||
@@ -129,10 +129,12 @@ class PokeBattle_Scene
|
||||
sendOutAnims.each { |a| a[0].dispose; a[1].dispose }
|
||||
# Play shininess animations for shiny Pokémon
|
||||
sendOuts.each do |b|
|
||||
next if !@battle.showAnims || !@battle.battlers[b[0]].shiny?
|
||||
next if !@battle.showAnims ||
|
||||
if @battle.battlers[b[0]].shiny? || @battle.battlers[b[0]].glitter?
|
||||
pbCommonAnimation("Shiny",@battle.battlers[b[0]])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Animates a Pokémon being recalled into its Poké Ball and its data box hiding
|
||||
|
||||
@@ -31,6 +31,7 @@ class Pokemon
|
||||
# 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_accessor :glitter
|
||||
attr_accessor :head_shiny
|
||||
attr_accessor :body_shiny
|
||||
attr_accessor :debug_shiny
|
||||
@@ -1221,7 +1222,7 @@ class Pokemon
|
||||
@ivMaxed = {}
|
||||
@ev = {}
|
||||
@hiddenPowerType = nil
|
||||
|
||||
@glitter=nil
|
||||
GameData::Stat.each_main do |s|
|
||||
@iv[s.id] = rand(IV_STAT_LIMIT + 1)
|
||||
@ev[s.id] = 0
|
||||
|
||||
@@ -50,7 +50,7 @@ BallHandlers::ModifyCatchRate.add(:SHINYBALL,proc{|ball,catchRate,battle,pokemon
|
||||
next catchRate
|
||||
})
|
||||
BallHandlers::OnCatch.add(:SHINYBALL,proc{|ball,battle,pokemon|
|
||||
pokemon.makeShiny
|
||||
pokemon.glitter=true
|
||||
})
|
||||
|
||||
#PERFECTBALL 29
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user