Renamed class PlayerTrainer to class Player, implemented class Player#Pokedex

This commit is contained in:
Maruno17
2021-04-11 20:45:44 +01:00
parent dcd0fe8b21
commit e49ddde198
32 changed files with 637 additions and 475 deletions

View File

@@ -25,8 +25,7 @@ class PokemonGlobalMetadata
attr_accessor :snagMachine
attr_accessor :creditsPlayed
# Pokédex
attr_accessor :pokedexUnlocked # Array storing which Dexes are unlocked
attr_accessor :pokedexViable # All Dexes of non-zero length and unlocked
attr_accessor :pokedexUnlocked # Deprecated, replaced with Player::Pokedex#unlocked_dexes
attr_accessor :pokedexDex # Dex currently looking at (-1 is National Dex)
attr_accessor :pokedexIndex # Last species viewed per Dex
attr_accessor :pokedexMode # Search mode
@@ -86,14 +85,11 @@ class PokemonGlobalMetadata
@creditsPlayed = false
# Pokédex
numRegions = pbLoadRegionalDexes.length
@pokedexUnlocked = []
@pokedexViable = []
@pokedexDex = (numRegions==0) ? -1 : 0
@pokedexIndex = []
@pokedexMode = 0
for i in 0...numRegions+1 # National Dex isn't a region, but is included
@pokedexIndex[i] = 0
@pokedexUnlocked[i] = (i==0)
end
# Day Care
@daycare = [[nil,0],[nil,0]]