diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-06-29 15:54:20 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-06-29 15:54:20 -0400 |
commit | 0882b456934e87b3b5fa1415ca6ab34087c68a4a (patch) | |
tree | faeb206b7d5bc7445ed2cf3c6bbd03cb7996da05 /src | |
parent | 0dccfbbd447e6c3764c123a048e75e3085e58771 (diff) |
Clean up some ewram refs inside gBattleStruct
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_script_commands.c | 6 | ||||
-rw-r--r-- | src/pokemon_1.c | 6 | ||||
-rw-r--r-- | src/pokemon_item_effect.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d1143d764..a98a0eae0 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5181,7 +5181,7 @@ static void atk1E_jumpifability(void) gLastUsedAbility = ability; gBattlescriptCurrInstr = jumpPtr; RecordAbilityBattle(battlerId -1, gLastUsedAbility); - ewram160F8 = battlerId - 1; + gBattleStruct->unk160F8 = battlerId - 1; } else gBattlescriptCurrInstr += 7; @@ -5194,7 +5194,7 @@ static void atk1E_jumpifability(void) gLastUsedAbility = ability; gBattlescriptCurrInstr = jumpPtr; RecordAbilityBattle(battlerId - 1, gLastUsedAbility); - ewram160F8 = battlerId - 1; + gBattleStruct->unk160F8 = battlerId - 1; } else gBattlescriptCurrInstr += 7; @@ -5207,7 +5207,7 @@ static void atk1E_jumpifability(void) gLastUsedAbility = ability; gBattlescriptCurrInstr = jumpPtr; RecordAbilityBattle(battlerId, gLastUsedAbility); - ewram160F8 = battlerId; + gBattleStruct->unk160F8 = battlerId; } else gBattlescriptCurrInstr += 7; diff --git a/src/pokemon_1.c b/src/pokemon_1.c index aeeb6080d..4670f188f 100644 --- a/src/pokemon_1.c +++ b/src/pokemon_1.c @@ -1731,9 +1731,9 @@ void CalculateMonStats(struct Pokemon *mon) newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10; } - eStatHp = newMaxHP - oldMaxHP; - if (eStatHp == 0) - eStatHp = 1; + gBattleStruct->levelUpHP = newMaxHP - oldMaxHP; + if (gBattleStruct->levelUpHP == 0) + gBattleStruct->levelUpHP = 1; SetMonData(mon, MON_DATA_MAX_HP, &newMaxHP); diff --git a/src/pokemon_item_effect.c b/src/pokemon_item_effect.c index 3ab351367..b84f69878 100644 --- a/src/pokemon_item_effect.c +++ b/src/pokemon_item_effect.c @@ -311,7 +311,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *pkmn, u16 item, u8 partyIndex, u8 mo data = 1; break; case 0xFD: - data = eStatHp; + data = gBattleStruct->levelUpHP; break; } if (GetMonData(pkmn, MON_DATA_MAX_HP, NULL) != GetMonData(pkmn, MON_DATA_HP, NULL)) |