shinies glitter balls fix

This commit is contained in:
infinitefusion
2022-10-16 13:49:01 -04:00
parent 138d9f78f2
commit 689b1f09df
7 changed files with 11 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

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

View File

@@ -129,8 +129,10 @@ 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?
pbCommonAnimation("Shiny",@battle.battlers[b[0]])
next if !@battle.showAnims ||
if @battle.battlers[b[0]].shiny? || @battle.battlers[b[0]].glitter?
pbCommonAnimation("Shiny",@battle.battlers[b[0]])
end
end
end

View File

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

View File

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