format fixes

This commit is contained in:
ghoulslash 2021-09-16 17:10:41 -04:00
parent 801ba039d6
commit 806be64935
2 changed files with 9 additions and 22 deletions

View File

@ -4913,7 +4913,7 @@ static void Cmd_moveend(void)
else else
gBattleScripting.moveendState++; gBattleScripting.moveendState++;
break; break;
case MOVEEND_KINGSROCK: // King's rock and shell bell case MOVEEND_KINGSROCK: // King's rock
// These effects will occur at each hit in a multi-strike move // These effects will occur at each hit in a multi-strike move
if (ItemBattleEffects(ITEMEFFECT_KINGSROCK, 0, FALSE)) if (ItemBattleEffects(ITEMEFFECT_KINGSROCK, 0, FALSE))
effect = TRUE; effect = TRUE;
@ -9499,7 +9499,6 @@ static void Cmd_forcerandomswitch(void)
} }
} }
} }
// Swapping pokemon happens in: // Swapping pokemon happens in:
// trainer battles // trainer battles
@ -9516,7 +9515,6 @@ static void Cmd_forcerandomswitch(void)
|| redCardForcedSwitch || redCardForcedSwitch
) )
{ {
if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER) if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER)
party = gPlayerParty; party = gPlayerParty;
else else

View File

@ -4646,7 +4646,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
{ {
if (gBattleMoves[gCurrentMove].effect == EFFECT_HIT_ESCAPE && CanBattlerSwitch(gBattlerAttacker)) if (gBattleMoves[gCurrentMove].effect == EFFECT_HIT_ESCAPE && CanBattlerSwitch(gBattlerAttacker))
gProtectStructs[battler].disableEjectPack = 1; // Set flag for target gProtectStructs[battler].disableEjectPack = 1; // Set flag for target
BattleScriptPushCursor(); BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_WeakArmorActivates; gBattlescriptCurrInstr = BattleScript_WeakArmorActivates;
effect++; effect++;
@ -5491,7 +5491,6 @@ static u8 RandomStatRaiseBerry(u32 battlerId, u32 itemId, bool32 end2)
PREPARE_STAT_BUFFER(gBattleTextBuff1, i + 1); PREPARE_STAT_BUFFER(gBattleTextBuff1, i + 1);
stringId = (GetBattlerAbility(battlerId) == ABILITY_CONTRARY) ? STRINGID_STATFELL : STRINGID_STATROSE; stringId = (GetBattlerAbility(battlerId) == ABILITY_CONTRARY) ? STRINGID_STATFELL : STRINGID_STATROSE;
gBattleTextBuff2[0] = B_BUFF_PLACEHOLDER_BEGIN; gBattleTextBuff2[0] = B_BUFF_PLACEHOLDER_BEGIN;
gBattleTextBuff2[1] = B_BUFF_STRING; gBattleTextBuff2[1] = B_BUFF_STRING;
gBattleTextBuff2[2] = STRINGID_STATSHARPLY; gBattleTextBuff2[2] = STRINGID_STATSHARPLY;
@ -5500,9 +5499,7 @@ static u8 RandomStatRaiseBerry(u32 battlerId, u32 itemId, bool32 end2)
gBattleTextBuff2[5] = stringId; gBattleTextBuff2[5] = stringId;
gBattleTextBuff2[6] = stringId >> 8; gBattleTextBuff2[6] = stringId >> 8;
gBattleTextBuff2[7] = EOS; gBattleTextBuff2[7] = EOS;
gEffectBattler = battlerId; gEffectBattler = battlerId;
if (GetBattlerAbility(battlerId) == ABILITY_RIPEN) if (GetBattlerAbility(battlerId) == ABILITY_RIPEN)
SET_STATCHANGER(i + 1, 4, FALSE); SET_STATCHANGER(i + 1, 4, FALSE);
else else
@ -5510,7 +5507,6 @@ static u8 RandomStatRaiseBerry(u32 battlerId, u32 itemId, bool32 end2)
gBattleScripting.animArg1 = 0x21 + i + 6; gBattleScripting.animArg1 = 0x21 + i + 6;
gBattleScripting.animArg2 = 0; gBattleScripting.animArg2 = 0;
if (end2) if (end2)
{ {
BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); BattleScriptExecute(BattleScript_BerryStatRaiseEnd2);
@ -5520,6 +5516,7 @@ static u8 RandomStatRaiseBerry(u32 battlerId, u32 itemId, bool32 end2)
BattleScriptPushCursor(); BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_BerryStatRaiseRet; gBattlescriptCurrInstr = BattleScript_BerryStatRaiseRet;
} }
return ITEM_STATS_CHANGE; return ITEM_STATS_CHANGE;
} }
return 0; return 0;
@ -8992,33 +8989,25 @@ bool32 CompareStat(u8 battlerId, u8 statId, u8 cmpTo, u8 cmpKind)
void BufferStatChange(u8 battlerId, u8 statId, u8 stringId) void BufferStatChange(u8 battlerId, u8 statId, u8 stringId)
{ {
bool8 hasContrary = (GetBattlerAbility(battlerId) == ABILITY_CONTRARY); bool8 hasContrary = (GetBattlerAbility(battlerId) == ABILITY_CONTRARY);
PREPARE_STAT_BUFFER(gBattleTextBuff1, statId); PREPARE_STAT_BUFFER(gBattleTextBuff1, statId);
if (stringId == STRINGID_STATFELL) if (stringId == STRINGID_STATFELL)
{ {
if (hasContrary) if (hasContrary)
{ PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATROSE)
PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATROSE);
}
else else
{ PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATFELL)
PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATFELL);
}
} }
else if (stringId == STRINGID_STATROSE) else if (stringId == STRINGID_STATROSE)
{ {
if (hasContrary) if (hasContrary)
{ PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATFELL)
PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATFELL);
}
else else
{ PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATROSE)
PREPARE_STRING_BUFFER(gBattleTextBuff2, STRINGID_STATROSE);
}
} }
else else
{ {
PREPARE_STRING_BUFFER(gBattleTextBuff2, stringId); PREPARE_STRING_BUFFER(gBattleTextBuff2, stringId)
} }
} }