From 2976ee93cebf5f13bde8be2c921050fcae19a212 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sun, 3 Jul 2022 17:39:44 +0100 Subject: [PATCH] =?UTF-8?q?Added=20Setting=20that=20makes=20trainer-owned?= =?UTF-8?q?=20Pok=C3=A9mon=20give=20more=20Exp,=20other=20tweaks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data/Scripts/002_BattleSettings.rb | 3 +++ .../010_Data/001_Hardcoded data/007_Evolution.rb | 2 ++ .../010_Data/001_Hardcoded data/011_TerrainTag.rb | 2 ++ .../010_Data/001_Hardcoded data/012_Weather.rb | 2 ++ .../001_Hardcoded data/013_EncounterType.rb | 2 ++ .../001_Battle/003_Battle_ExpAndMoveLearning.rb | 2 +- .../003_Debug menus/002_Debug_MenuCommands.rb | 13 ++++++++++++- 7 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Data/Scripts/002_BattleSettings.rb b/Data/Scripts/002_BattleSettings.rb index 664d2f191..4dce4abee 100644 --- a/Data/Scripts/002_BattleSettings.rb +++ b/Data/Scripts/002_BattleSettings.rb @@ -76,6 +76,9 @@ module Settings # that much Exp (false). This also applies to Exp gained via the Exp Share # (held item version) being distributed to all Exp Share holders. SPLIT_EXP_BETWEEN_GAINERS = (MECHANICS_GENERATION <= 5) + # Whether the Exp gained from beating a Pokémon is multiplied by 1.5 if that + # Pokémon is owned by another trainer. + MORE_EXP_FROM_TRAINER_POKEMON = (MECHANICS_GENERATION <= 6) # Whether a Pokémon holding a Power item gains 8 (true) or 4 (false) EVs in # the relevant stat. MORE_EVS_FROM_POWER_ITEMS = (MECHANICS_GENERATION >= 7) diff --git a/Data/Scripts/010_Data/001_Hardcoded data/007_Evolution.rb b/Data/Scripts/010_Data/001_Hardcoded data/007_Evolution.rb index 054787621..faa941cff 100644 --- a/Data/Scripts/010_Data/001_Hardcoded data/007_Evolution.rb +++ b/Data/Scripts/010_Data/001_Hardcoded data/007_Evolution.rb @@ -32,6 +32,8 @@ module GameData @after_evolution_proc = hash[:after_evolution_proc] end + alias name real_name + def call_level_up(*args) return (@level_up_proc) ? @level_up_proc.call(*args) : nil end diff --git a/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb b/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb index 575dee5ef..4c188fa98 100644 --- a/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb +++ b/Data/Scripts/010_Data/001_Hardcoded data/011_TerrainTag.rb @@ -60,6 +60,8 @@ module GameData @ignore_passability = hash[:ignore_passability] || false end + alias name real_name + def can_surf_freely return @can_surf && !@waterfall && !@waterfall_crest end diff --git a/Data/Scripts/010_Data/001_Hardcoded data/012_Weather.rb b/Data/Scripts/010_Data/001_Hardcoded data/012_Weather.rb index 1fb1a345e..d44cbf365 100644 --- a/Data/Scripts/010_Data/001_Hardcoded data/012_Weather.rb +++ b/Data/Scripts/010_Data/001_Hardcoded data/012_Weather.rb @@ -44,6 +44,8 @@ module GameData @tone_proc = hash[:tone_proc] end + alias name real_name + def has_particles? return @graphics[0] && @graphics[0].length > 0 end diff --git a/Data/Scripts/010_Data/001_Hardcoded data/013_EncounterType.rb b/Data/Scripts/010_Data/001_Hardcoded data/013_EncounterType.rb index 5987e31a7..80eb74f96 100644 --- a/Data/Scripts/010_Data/001_Hardcoded data/013_EncounterType.rb +++ b/Data/Scripts/010_Data/001_Hardcoded data/013_EncounterType.rb @@ -19,6 +19,8 @@ module GameData @type = hash[:type] || :none @trigger_chance = hash[:trigger_chance] || 0 end + + alias name real_name end end diff --git a/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb b/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb index 8617151f2..b2b6ca12e 100644 --- a/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb +++ b/Data/Scripts/011_Battle/001_Battle/003_Battle_ExpAndMoveLearning.rb @@ -121,7 +121,7 @@ class Battle end return if exp <= 0 # Pokémon gain more Exp from trainer battles - exp = (exp * 1.5).floor if trainerBattle? + exp = (exp * 1.5).floor if Settings::MORE_EXP_FROM_TRAINER_POKEMON && trainerBattle? # Scale the gained Exp based on the gainer's level (or not) if Settings::SCALED_EXP_FORMULA exp /= 5 diff --git a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb index 66aabdaf0..befbbca1b 100644 --- a/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb +++ b/Data/Scripts/020_Debug/003_Debug menus/002_Debug_MenuCommands.rb @@ -522,7 +522,18 @@ MenuHandlers.add(:debug_menu, :add_pokemon, { params.setInitialValue(5) params.setCancelValue(0) level = pbMessageChooseNumber(_INTL("Set the Pokémon's level."), params) - pbAddPokemon(species, level) if level > 0 + if level > 0 + goes_to_party = !$player.party_full? + if pbAddPokemonSilent(species, level) + if goes_to_party + pbMessage(_INTL("Added {1} to party.", GameData::Species.get(species).name)) + else + pbMessage(_INTL("Added {1} to Pokémon storage.", GameData::Species.get(species).name)) + end + else + pbMessage(_INTL("Couldn't add Pokémon because party and storage are full.")) + end + end end } })