mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Renamed class PlayerTrainer to class Player, implemented class Player#Pokedex
This commit is contained in:
@@ -42,20 +42,17 @@ module PokeBattle_BattleCommon
|
||||
# Register all caught Pokémon in the Pokédex, and store them.
|
||||
def pbRecordAndStoreCaughtPokemon
|
||||
@caughtPokemon.each do |pkmn|
|
||||
pbSeenForm(pkmn) # In case the form changed upon leaving battle
|
||||
pbPlayer.pokedex.register(pkmn) # In case the form changed upon leaving battle
|
||||
# Record the Pokémon's species as owned in the Pokédex
|
||||
if !pbPlayer.hasOwned?(pkmn.species)
|
||||
pbPlayer.set_owned(pkmn.species)
|
||||
if $Trainer.pokedex
|
||||
pbPlayer.pokedex.set_owned(pkmn.species)
|
||||
if $Trainer.has_pokedex
|
||||
pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.",pkmn.name))
|
||||
@scene.pbShowPokedex(pkmn.species)
|
||||
end
|
||||
end
|
||||
# Record a Shadow Pokémon's species as having been caught
|
||||
if pkmn.shadowPokemon?
|
||||
pbPlayer.owned_shadow = {} if !pbPlayer.owned_shadow
|
||||
pbPlayer.owned_shadow[pkmn.species] = true
|
||||
end
|
||||
pbPlayer.pokedex.set_shadow_pokemon_owned(pkmn.species) if pkmn.shadowPokemon?
|
||||
# Store caught Pokémon
|
||||
pbStorePokemon(pkmn)
|
||||
end
|
||||
@@ -194,7 +191,7 @@ module PokeBattle_BattleCommon
|
||||
# Critical capture check
|
||||
if Settings::ENABLE_CRITICAL_CAPTURES
|
||||
c = 0
|
||||
numOwned = $Trainer.owned_count
|
||||
numOwned = $Trainer.pokedex.owned_count
|
||||
if numOwned>600; c = x*5/12
|
||||
elsif numOwned>450; c = x*4/12
|
||||
elsif numOwned>300; c = x*3/12
|
||||
|
||||
@@ -115,7 +115,7 @@ class PokeBattle_Battle
|
||||
@caughtPokemon = []
|
||||
player = [player] if !player.nil? && !player.is_a?(Array)
|
||||
opponent = [opponent] if !opponent.nil? && !opponent.is_a?(Array)
|
||||
@player = player # Array of PlayerTrainer/NPCTrainer objects, or nil
|
||||
@player = player # Array of Player/NPCTrainer objects, or nil
|
||||
@opponent = opponent # Array of NPCTrainer objects, or nil
|
||||
@items = nil
|
||||
@endSpeeches = []
|
||||
@@ -622,8 +622,7 @@ class PokeBattle_Battle
|
||||
|
||||
def pbSetSeen(battler)
|
||||
return if !battler || !@internalBattle
|
||||
pbPlayer.set_seen(battler.displaySpecies)
|
||||
pbSeenForm(battler.displaySpecies,battler.displayGender,battler.displayForm)
|
||||
pbPlayer.pokedex.register(battler.displaySpecies,battler.displayGender,battler.displayForm)
|
||||
end
|
||||
|
||||
def nextPickupUse
|
||||
|
||||
Reference in New Issue
Block a user