From 9dffb6f99d1c78bdf2e26130b45437e0d77bcff6 Mon Sep 17 00:00:00 2001 From: chardub Date: Thu, 10 Apr 2025 19:52:56 -0400 Subject: [PATCH] Adds debug option to set a pokemon's level to current level cap --- Data/Scripts/052_AddOns/GeneralUtils.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Data/Scripts/052_AddOns/GeneralUtils.rb b/Data/Scripts/052_AddOns/GeneralUtils.rb index 867f199d7..bbc042989 100644 --- a/Data/Scripts/052_AddOns/GeneralUtils.rb +++ b/Data/Scripts/052_AddOns/GeneralUtils.rb @@ -481,10 +481,15 @@ def get_difficulty_text end end -def pokemonExceedsLevelCap(pokemon) - return false if $Trainer.badge_count >= Settings::NB_BADGES +def getCurrentLevelCap() current_max_level = Settings::LEVEL_CAPS[$Trainer.badge_count] current_max_level *= Settings::HARD_MODE_LEVEL_MODIFIER if $game_switches[SWITCH_GAME_DIFFICULTY_HARD] + return current_max_level +end + +def pokemonExceedsLevelCap(pokemon) + return false if $Trainer.badge_count >= Settings::NB_BADGES + current_max_level = getCurrentLevelCap() return pokemon.level >= current_max_level end