fire; update constants
This commit is contained in:
+10
-10
@@ -2365,25 +2365,25 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
|
||||
{
|
||||
if (FlagGet(FLAG_BADGE01_GET)
|
||||
&& !GetBattlerSide(battlerIdAtk))
|
||||
&& GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER)
|
||||
attack = (110 * attack) / 100;
|
||||
}
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
|
||||
{
|
||||
if (FlagGet(FLAG_BADGE05_GET)
|
||||
&& !GetBattlerSide(battlerIdDef))
|
||||
&& GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER)
|
||||
defense = (110 * defense) / 100;
|
||||
}
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
|
||||
{
|
||||
if (FlagGet(FLAG_BADGE07_GET)
|
||||
&& !GetBattlerSide(battlerIdAtk))
|
||||
&& GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER)
|
||||
spAttack = (110 * spAttack) / 100;
|
||||
}
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER)))
|
||||
{
|
||||
if (FlagGet(FLAG_BADGE07_GET)
|
||||
&& !GetBattlerSide(battlerIdDef))
|
||||
&& GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER)
|
||||
spDefense = (110 * spDefense) / 100;
|
||||
}
|
||||
|
||||
@@ -3917,7 +3917,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
if (gMain.inBattle)
|
||||
{
|
||||
gActiveBattler = gBattlerInMenuId;
|
||||
cmdIndex = (GetBattlerSide(gActiveBattler) != 0);
|
||||
cmdIndex = (GetBattlerSide(gActiveBattler) != B_SIDE_PLAYER);
|
||||
while (cmdIndex < gBattlersCount)
|
||||
{
|
||||
if (gBattlerPartyIndexes[cmdIndex] == partyIndex)
|
||||
@@ -4118,13 +4118,13 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
{
|
||||
gAbsentBattlerFlags &= ~gBitTable[sp34];
|
||||
CopyPlayerPartyMonToBattleData(sp34, pokemon_order_func(gBattlerPartyIndexes[sp34]));
|
||||
if (GetBattlerSide(gActiveBattler) == 0 && gBattleResults.numRevivesUsed < 255)
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255)
|
||||
gBattleResults.numRevivesUsed++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gAbsentBattlerFlags &= ~gBitTable[gActiveBattler ^ 2];
|
||||
if (GetBattlerSide(gActiveBattler) == 0 && gBattleResults.numRevivesUsed < 255)
|
||||
if (GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER && gBattleResults.numRevivesUsed < 255)
|
||||
gBattleResults.numRevivesUsed++;
|
||||
}
|
||||
}
|
||||
@@ -4163,7 +4163,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
if (gMain.inBattle && sp34 != 4)
|
||||
{
|
||||
gBattleMons[sp34].hp = data;
|
||||
if (!(r10 & 0x10) && GetBattlerSide(gActiveBattler) == 0)
|
||||
if (!(r10 & 0x10) && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER)
|
||||
{
|
||||
if (gBattleResults.numHealingItemsUsed < 255)
|
||||
gBattleResults.numHealingItemsUsed++;
|
||||
@@ -6039,11 +6039,11 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality)
|
||||
}
|
||||
}
|
||||
|
||||
bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 bank)
|
||||
bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 battlerId)
|
||||
{
|
||||
u8 buffer[12];
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_GHOST && GetBattlerSide(bank))
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_GHOST && GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
{
|
||||
GetMonData(mon, MON_DATA_NICKNAME, buffer);
|
||||
StringGetEnd10(buffer);
|
||||
|
||||
Reference in New Issue
Block a user