diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-09-24 10:17:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 10:17:34 -0400 |
commit | 42d2fefe0218f529f9c22f3b6b4230ca91a00de5 (patch) | |
tree | db4ae87659baced2022e440109306266c1c80e3b /src/pokemon.c | |
parent | f8f7617946e150514313267ba52a35ebd9052936 (diff) | |
parent | 09fd4fc4c57796036905cdc5caaa53fb96c436f8 (diff) |
Merge branch 'master' into tag-none
Diffstat (limited to 'src/pokemon.c')
-rw-r--r-- | src/pokemon.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pokemon.c b/src/pokemon.c index 840d3770a..9e1e84aee 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4879,7 +4879,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov temp2 = itemEffect[itemEffectParam]; dataSigned = GetMonData(mon, sGetMonDataEVConstants[temp1], NULL); evChange = temp2; - + if (evChange > 0) // Increasing EV (HP or Atk) { // Has EV increase limit already been reached? @@ -4977,7 +4977,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov { if (!usedByAI) { - // Restore HP + // Restore HP dataUnsigned = GetMonData(mon, MON_DATA_HP, NULL) + dataUnsigned; if (dataUnsigned > GetMonData(mon, MON_DATA_MAX_HP, NULL)) dataUnsigned = GetMonData(mon, MON_DATA_MAX_HP, NULL); @@ -5056,7 +5056,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov dataUnsigned = CalculatePPWithBonus(moveId, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); } SetMonData(mon, MON_DATA_PP1 + moveIndex, &dataUnsigned); - + // Heal battler PP too (if applicable) if (gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && !(gBattleMons[battlerId].status2 & STATUS2_TRANSFORMED) @@ -5093,7 +5093,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov case 5: effectFlags = itemEffect[i]; temp1 = 0; - + // Loop through and try each of the ITEM5 effects while (effectFlags != 0) { |