From ca761640f802ce7e8cafa31f15b67d9f89785f14 Mon Sep 17 00:00:00 2001 From: Joni Savolainen Date: Thu, 24 Sep 2020 08:34:23 +0300 Subject: [PATCH] Revert rename of Pokemon#publicID & #obtainLevel These changes should be done in their own branch. --- Data/Scripts/016_Pokemon/001_Pokemon.rb | 13 +++++++------ Data/Scripts/016_Pokemon/009_Pokemon_Deprecated.rb | 3 --- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Data/Scripts/016_Pokemon/001_Pokemon.rb b/Data/Scripts/016_Pokemon/001_Pokemon.rb index 66fc31e8d..0feb2cefe 100644 --- a/Data/Scripts/016_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/016_Pokemon/001_Pokemon.rb @@ -109,20 +109,20 @@ class Pokemon attr_writer :cool,:beauty,:cute,:smart,:tough,:sheen # Max total IVs - IV_STAT_LIMIT = 31 + IV_STAT_LIMIT = 31 # Max total EVs - EV_LIMIT = 510 + EV_LIMIT = 510 # Max EVs that a single stat can have - EV_STAT_LIMIT = 252 + EV_STAT_LIMIT = 252 # Maximum length a Pokémon's nickname can be - MAX_NAME_SIZE = 10 + MAX_NAME_SIZE = 10 #============================================================================= # Ownership, obtained information #============================================================================= # @return [Integer] the public portion of the original trainer's ID - def public_id + def publicID return @trainerID & 0xFFFF end @@ -131,6 +131,7 @@ class Pokemon def foreign?(trainer) return @trainerID != trainer.id || @ot != trainer.name end + alias isForeign? foreign? # @return [0, 1, 2] the gender of this Pokémon original trainer (0 = male, 1 = female, 2 = unknown) def otgender @@ -138,7 +139,7 @@ class Pokemon end # @return [Integer] this Pokémon's level when it was obtained - def obtain_level + def obtainLevel return @obtainLevel || 0 end diff --git a/Data/Scripts/016_Pokemon/009_Pokemon_Deprecated.rb b/Data/Scripts/016_Pokemon/009_Pokemon_Deprecated.rb index 12dfe2b97..8f89c4b55 100644 --- a/Data/Scripts/016_Pokemon/009_Pokemon_Deprecated.rb +++ b/Data/Scripts/016_Pokemon/009_Pokemon_Deprecated.rb @@ -12,9 +12,6 @@ PokeBattle_Pokemon = Pokemon class Pokemon # @deprecated Use {MAX_NAME_SIZE} instead. This alias is slated to be removed in vXX. MAX_POKEMON_NAME_SIZE = MAX_NAME_SIZE - - deprecated_instance_method_alias :publicID, :public_id, 'vXX' - deprecated_instance_method_alias :isForeign?, :foreign?, 'vXX' end # (see Pokemon#initialize)