Added Gen 8's shiny chance increase with number battled, fixed other shiny chance-boosting effects not working

This commit is contained in:
Maruno17
2021-08-31 16:54:03 +01:00
parent 3c88c897f0
commit 218307d993
12 changed files with 172 additions and 40 deletions

View File

@@ -42,7 +42,8 @@ module PokeBattle_BattleCommon
# Register all caught Pokémon in the Pokédex, and store them.
def pbRecordAndStoreCaughtPokemon
@caughtPokemon.each do |pkmn|
pbPlayer.pokedex.register(pkmn) # In case the form changed upon leaving battle
pbSetCaught(pkmn)
pbSetSeen(pkmn) # In case the form changed upon leaving battle
# Record the Pokémon's species as owned in the Pokédex
if !pbPlayer.owned?(pkmn.species)
pbPlayer.pokedex.set_owned(pkmn.species)

View File

@@ -628,7 +628,29 @@ class PokeBattle_Battle
def pbSetSeen(battler)
return if !battler || !@internalBattle
pbPlayer.pokedex.register(battler.displaySpecies,battler.displayGender,battler.displayForm)
if battler.is_a?(PokeBattle_Battler)
pbPlayer.pokedex.register(battler.displaySpecies,battler.displayGender,battler.displayForm)
else
pbPlayer.pokedex.register(battler)
end
end
def pbSetCaught(battler)
return if !battler || !@internalBattle
if battler.is_a?(PokeBattle_Battler)
pbPlayer.pokedex.register_caught(battler.displaySpecies)
else
pbPlayer.pokedex.register_caught(battler.species)
end
end
def pbSetDefeated(battler)
return if !battler || !@internalBattle
if battler.is_a?(PokeBattle_Battler)
pbPlayer.pokedex.register_defeated(battler.displaySpecies)
else
pbPlayer.pokedex.register_defeated(battler.species)
end
end
def nextPickupUse