Misc. documentation and move some data into .c files
This commit is contained in:
+8
-8
@@ -5242,14 +5242,14 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
{
|
||||
gAbsentBattlerFlags &= ~gBitTable[battlerId];
|
||||
CopyPlayerPartyMonToBattleData(battlerId, pokemon_order_func(gBattlerPartyIndexes[battlerId]));
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.unk4 < 255)
|
||||
gBattleResults.unk4++;
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255)
|
||||
gBattleResults.numRevivesUsed++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gAbsentBattlerFlags &= ~gBitTable[gActiveBattler ^ 2];
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.unk4 < 255)
|
||||
gBattleResults.unk4++;
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255)
|
||||
gBattleResults.numRevivesUsed++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5289,8 +5289,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
gBattleMons[battlerId].hp = dataUnsigned;
|
||||
if (!(r10 & 0x10) && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
{
|
||||
if (gBattleResults.unk3 < 255)
|
||||
gBattleResults.unk3++;
|
||||
if (gBattleResults.numHealingItemsUsed < 255)
|
||||
gBattleResults.numHealingItemsUsed++;
|
||||
// I have to re-use this variable to match.
|
||||
r5 = gActiveBattler;
|
||||
gActiveBattler = battlerId;
|
||||
@@ -5329,7 +5329,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
SetMonData(mon, MON_DATA_PP1 + r5, &dataUnsigned);
|
||||
if (gMain.inBattle
|
||||
&& battlerId != 4 && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED)
|
||||
&& !(gDisableStructs[battlerId].unk18_b & gBitTable[r5]))
|
||||
&& !(gDisableStructs[battlerId].mimickedMoves & gBitTable[r5]))
|
||||
gBattleMons[battlerId].pp[r5] = dataUnsigned;
|
||||
retVal = FALSE;
|
||||
}
|
||||
@@ -5354,7 +5354,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
SetMonData(mon, MON_DATA_PP1 + moveIndex, &dataUnsigned);
|
||||
if (gMain.inBattle
|
||||
&& battlerId != 4 && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED)
|
||||
&& !(gDisableStructs[battlerId].unk18_b & gBitTable[moveIndex]))
|
||||
&& !(gDisableStructs[battlerId].mimickedMoves & gBitTable[moveIndex]))
|
||||
gBattleMons[battlerId].pp[moveIndex] = dataUnsigned;
|
||||
retVal = FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user