summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/battle_script_commands.c6
-rw-r--r--src/pokemon_1.c6
-rw-r--r--src/pokemon_item_effect.c2
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))