This commit is contained in:
khbsd 2026-03-21 08:02:48 +01:00 committed by GitHub
commit 518852a5de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -331,7 +331,7 @@
#define B_ANIMATE_MON_AFTER_KO TRUE // If set to TRUE, if a Pokémon on the opposite site faints, the non-fainted Pokemon will display a victory animation.
#define B_ANIMATE_MON_AFTER_FAILED_POKEBALL TRUE // If set to TRUE, if a Pokémon on the opposite side breaks out of a thrown Poké Ball, the wild Pokémon will display its animation.
#define B_SHOW_DYNAMAX_MESSAGE FALSE // If set to TRUE, an additional battle message is shown after completing Dynamaxing/Gigantamaxing.
#define B_HPBAR_COLOR_THRESHOLD GEN_LATEST // In Gen 5+, HP bar color thresholds were changed to be based on the actual HP values instead of the pixel length of the HP bar, leading to more accurate HP bar colors.
#define B_HPBAR_COLOR_THRESHOLD GEN_LATEST // In Gen 5+, HP bar color thresholds were changed to be based on the actual HP values instead of the pixel length of the HP bar, leading to more accurate HP bar colors. If Gens earlier than 8 are picked, the HP bars of Pokémon with 1 Max HP (ie Shedinja) will turn red before depleting. If Gens 8 or later are picked, they will stay green while depleting.
// Catching settings
#define B_SEMI_INVULNERABLE_CATCH GEN_LATEST // In Gen4+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)

View File

@ -2117,10 +2117,12 @@ static void MoveBattleBarGraphically(enum BattlerId battler, u8 whichBar)
break;
default:
case HP_BAR_RED:
if (maxValue > 1) // handling for wonder guard
if (maxValue > 1)
barElementId = HEALTHBOX_GFX_HP_BAR_RED;
else
else if (B_HPBAR_COLOR_THRESHOLD >= GEN_8) // handling for mons with 1 max HP, ie Shedinja
barElementId = HEALTHBOX_GFX_HP_BAR_GREEN;
else
barElementId = HEALTHBOX_GFX_HP_BAR_RED;
break;
}