Rename a palace battle field

This commit is contained in:
DizzyEggg 2019-01-29 22:22:02 +01:00
parent 14641e916e
commit d46e60765d
4 changed files with 12 additions and 12 deletions

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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)
{

View File

@ -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
{