Fixed brace style inconsistencies

This commit is contained in:
Eduardo Quezada
2024-12-05 12:46:50 -03:00
parent 3f98c78297
commit 5483e05db6
37 changed files with 301 additions and 27 deletions

View File

@@ -1769,7 +1769,9 @@ static void Cmd_attackanimation(void)
gActiveBattler = gBattlerAttacker;
if (gBattleMons[gBattlerTarget].status2 & STATUS2_SUBSTITUTE)
{
multihit = gMultiHitCounter;
}
else if (gMultiHitCounter != 0 && gMultiHitCounter != 1)
{
if (gBattleMons[gBattlerTarget].hp <= gBattleMoveDamage)
@@ -1778,7 +1780,9 @@ static void Cmd_attackanimation(void)
multihit = gMultiHitCounter;
}
else
{
multihit = gMultiHitCounter;
}
BtlController_EmitMoveAnimation(BUFFER_A, gCurrentMove, gBattleScripting.animTurn, gBattleMovePower, gBattleMoveDamage, gBattleMons[gBattlerAttacker].friendship, &gDisableStructs[gBattlerAttacker], multihit);
gBattleScripting.animTurn++;
@@ -2276,7 +2280,9 @@ void SetMoveEffect(bool8 primary, u8 certain)
{}
}
else
{
gActiveBattler = gBattlersCount;
}
if (gBattleMons[gEffectBattler].status1)
break;
@@ -2409,7 +2415,9 @@ void SetMoveEffect(bool8 primary, u8 certain)
RESET_RETURN
}
else
{
break;
}
}
if (gBattleMons[gEffectBattler].status1)
break;
@@ -3111,7 +3119,9 @@ static void Cmd_jumpifability(void)
gBattleScripting.battlerWithAbility = battlerId - 1;
}
else
{
gBattlescriptCurrInstr += 7;
}
}
else if (gBattlescriptCurrInstr[1] == BS_NOT_ATTACKER_SIDE)
{
@@ -3124,7 +3134,9 @@ static void Cmd_jumpifability(void)
gBattleScripting.battlerWithAbility = battlerId - 1;
}
else
{
gBattlescriptCurrInstr += 7;
}
}
else
{
@@ -3137,7 +3149,9 @@ static void Cmd_jumpifability(void)
gBattleScripting.battlerWithAbility = battlerId;
}
else
{
gBattlescriptCurrInstr += 7;
}
}
}
@@ -3387,13 +3401,10 @@ static void Cmd_getexp(void)
{
if (gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId && !(gAbsentBattlerFlags & gBitTable[2]))
gBattleStruct->expGetterBattlerId = 2;
else if (!(gAbsentBattlerFlags & gBitTable[0]))
gBattleStruct->expGetterBattlerId = 0;
else
{
if (!(gAbsentBattlerFlags & gBitTable[0]))
gBattleStruct->expGetterBattlerId = 0;
else
gBattleStruct->expGetterBattlerId = 2;
}
gBattleStruct->expGetterBattlerId = 2;
}
else
{
@@ -8558,11 +8569,17 @@ static void Cmd_presentdamagecalculation(void)
s32 rand = Random() & 0xFF;
if (rand < 102)
{
gDynamicBasePower = 40;
}
else if (rand < 178)
{
gDynamicBasePower = 80;
}
else if (rand < 204)
{
gDynamicBasePower = 120;
}
else
{
gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 4;
@@ -8570,10 +8587,15 @@ static void Cmd_presentdamagecalculation(void)
gBattleMoveDamage = 1;
gBattleMoveDamage *= -1;
}
if (rand < 204)
{
gBattlescriptCurrInstr = BattleScript_HitFromCritCalc;
}
else if (gBattleMons[gBattlerTarget].maxHP == gBattleMons[gBattlerTarget].hp)
{
gBattlescriptCurrInstr = BattleScript_AlreadyAtFullHp;
}
else
{
gMoveResultFlags &= ~MOVE_RESULT_DOESNT_AFFECT_FOE;
@@ -8910,6 +8932,7 @@ static void Cmd_trydobeatup(void)
&& !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS))
break;
}
if (gBattleCommunication[0] < PARTY_SIZE)
{
PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBattlerAttacker, gBattleCommunication[0])
@@ -8927,9 +8950,13 @@ static void Cmd_trydobeatup(void)
gBattleCommunication[0]++;
}
else if (beforeLoop != 0)
{
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
}
else
{
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 5);
}
}
}
@@ -9907,7 +9934,9 @@ static void Cmd_handleballthrow(void)
}
}
else
{
ballMultiplier = sBallCatchBonuses[gLastUsedItem - ITEM_ULTRA_BALL];
}
odds = (catchRate * ballMultiplier / 10)
* (gBattleMons[gBattlerTarget].maxHP * 3 - gBattleMons[gBattlerTarget].hp * 2)