mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Free up two status3 flags
This commit is contained in:
parent
da33c38183
commit
df9e6a6889
@ -130,6 +130,8 @@ struct UnknownFlags
|
||||
#define RESOURCE_FLAG_FLASH_FIRE 0x1
|
||||
#define RESOURCE_FLAG_ROOST 0x2
|
||||
#define RESOURCE_FLAG_UNBURDEN 0x4
|
||||
#define RESOURCE_FLAG_INTIMIDATED 0x8
|
||||
#define RESOURCE_FLAG_TRACED 0x10
|
||||
|
||||
struct DisableStruct
|
||||
{
|
||||
|
@ -150,8 +150,7 @@
|
||||
#define STATUS3_GASTRO_ACID 0x10000
|
||||
#define STATUS3_EMBARGO 0x20000
|
||||
#define STATUS3_UNDERWATER 0x40000
|
||||
#define STATUS3_INTIMIDATE_POKES 0x80000
|
||||
#define STATUS3_TRACE 0x100000
|
||||
|
||||
#define STATUS3_SMACKED_DOWN 0x200000
|
||||
#define STATUS3_ME_FIRST 0x400000
|
||||
#define STATUS3_TELEKINESIS 0x800000
|
||||
|
@ -2842,7 +2842,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
case ABILITY_INTIMIDATE:
|
||||
if (!(gSpecialStatuses[battler].intimidatedMon))
|
||||
{
|
||||
gStatuses3[battler] |= STATUS3_INTIMIDATE_POKES;
|
||||
gBattleResources->flags->flags[battler] |= RESOURCE_FLAG_INTIMIDATED;
|
||||
gSpecialStatuses[battler].intimidatedMon = 1;
|
||||
}
|
||||
break;
|
||||
@ -2858,7 +2858,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
case ABILITY_TRACE:
|
||||
if (!(gSpecialStatuses[battler].traced))
|
||||
{
|
||||
gStatuses3[battler] |= STATUS3_TRACE;
|
||||
gBattleResources->flags->flags[battler] |= RESOURCE_FLAG_TRACED;
|
||||
gSpecialStatuses[battler].traced = 1;
|
||||
}
|
||||
break;
|
||||
@ -3454,10 +3454,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
case ABILITYEFFECT_INTIMIDATE1: // 9
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (gBattleMons[i].ability == ABILITY_INTIMIDATE && gStatuses3[i] & STATUS3_INTIMIDATE_POKES)
|
||||
if (gBattleMons[i].ability == ABILITY_INTIMIDATE && gBattleResources->flags->flags[i] & RESOURCE_FLAG_INTIMIDATED)
|
||||
{
|
||||
gLastUsedAbility = ABILITY_INTIMIDATE;
|
||||
gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES);
|
||||
gBattleResources->flags->flags[i] &= ~(RESOURCE_FLAG_INTIMIDATED);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_IntimidateActivatesEnd3);
|
||||
gBattlerAbility = gBattleStruct->intimidateBattler = i;
|
||||
effect++;
|
||||
@ -3468,7 +3468,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
case ABILITYEFFECT_TRACE: // 11
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (gBattleMons[i].ability == ABILITY_TRACE && (gStatuses3[i] & STATUS3_TRACE))
|
||||
if (gBattleMons[i].ability == ABILITY_TRACE && (gBattleResources->flags->flags[i] & RESOURCE_FLAG_TRACED))
|
||||
{
|
||||
u8 target2;
|
||||
side = (GetBattlerPosition(i) ^ BIT_SIDE) & BIT_SIDE; // side of the opposing pokemon
|
||||
@ -3512,7 +3512,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
if (effect)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_TraceActivates);
|
||||
gStatuses3[i] &= ~(STATUS3_TRACE);
|
||||
gBattleResources->flags->flags[i] &= ~(RESOURCE_FLAG_TRACED);
|
||||
gBattlerAbility = gBattleScripting.battler = i;
|
||||
|
||||
PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gActiveBattler, gBattlerPartyIndexes[gActiveBattler])
|
||||
@ -3525,10 +3525,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
case ABILITYEFFECT_INTIMIDATE2: // 10
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (gBattleMons[i].ability == ABILITY_INTIMIDATE && (gStatuses3[i] & STATUS3_INTIMIDATE_POKES))
|
||||
if (gBattleMons[i].ability == ABILITY_INTIMIDATE && (gBattleResources->flags->flags[i] & RESOURCE_FLAG_INTIMIDATED))
|
||||
{
|
||||
gLastUsedAbility = ABILITY_INTIMIDATE;
|
||||
gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES);
|
||||
gBattleResources->flags->flags[i] &= ~(RESOURCE_FLAG_INTIMIDATED);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_IntimidateActivates;
|
||||
gBattleStruct->intimidateBattler = i;
|
||||
|
Loading…
Reference in New Issue
Block a user