diff --git a/include/battle.h b/include/battle.h index 0ed09caada..9295a35481 100644 --- a/include/battle.h +++ b/include/battle.h @@ -168,7 +168,7 @@ struct ProtectStruct u32 helpingHand:1; u32 bounceMove:1; u32 stealMove:1; - u32 flag0Unknown:1; + u32 flag0Unknown:1; // Only set to 0 once. u32 prlzImmobility:1; u32 confusionSelfDmg:1; u32 targetNotAffected:1; @@ -178,10 +178,10 @@ struct ProtectStruct u32 loveImmobility:1; u32 usedDisabledMove:1; u32 usedTauntedMove:1; - u32 flag2Unknown:1; + u32 flag2Unknown:1; // Only set to 0 once. Checked in 'WasUnableToUseMove' function. u32 flinchImmobility:1; u32 notFirstStrike:1; - u32 palaceAbleToUseMove:1; + u32 palaceUnableToUseMove:1; u32 physicalDmg; u32 specialDmg; u8 physicalBattlerId; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 089d095582..7c6b743042 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -205,13 +205,13 @@ u16 ChooseMoveAndTargetInBattlePalace(void) if (Random() % 100 > 49) { - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; return 0; } } else { - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; return 0; } } diff --git a/src/battle_main.c b/src/battle_main.c index 6d04103e54..09ea3dfc9a 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5492,7 +5492,7 @@ static void HandleAction_UseMove(void) // choose battlescript if (gBattleTypeFlags & BATTLE_TYPE_PALACE - && gProtectStructs[gBattlerAttacker].palaceAbleToUseMove) + && gProtectStructs[gBattlerAttacker].palaceUnableToUseMove) { if (gBattleMons[gBattlerAttacker].hp == 0) { diff --git a/src/battle_util.c b/src/battle_util.c index 04659571ed..2f583a9c7e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -321,7 +321,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingDisabledMoveInPalace; - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; } else { @@ -336,7 +336,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingTormentedMoveInPalace; - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; } else { @@ -351,7 +351,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedMoveTauntInPalace; - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; } else { @@ -366,7 +366,7 @@ u8 TrySetCantSelectMoveBattleScript(void) if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingImprisionedMoveInPalace; - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; } else { @@ -388,7 +388,7 @@ u8 TrySetCantSelectMoveBattleScript(void) gLastUsedItem = gBattleMons[gActiveBattler].item; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; } else { @@ -401,7 +401,7 @@ u8 TrySetCantSelectMoveBattleScript(void) { if (gBattleTypeFlags & BATTLE_TYPE_PALACE) { - gProtectStructs[gActiveBattler].palaceAbleToUseMove = 1; + gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1; } else {