summaryrefslogtreecommitdiff
path: root/src/battle_script_commands.c
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2017-11-12 00:16:46 +0100
committerDizzyEggg <jajkodizzy@wp.pl>2017-11-12 00:16:46 +0100
commitc3f6f528e865155f359ca2ff10b68ace1cc99edb (patch)
tree188cb76860004fdf8d859203d1027055ade714a3 /src/battle_script_commands.c
parentb1abe40230f2815c58a08b02eabf831317a68f15 (diff)
come closer maybe
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r--src/battle_script_commands.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index 72bef41f1..a619ee778 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -9526,22 +9526,22 @@ static void atkC0_recoverbasedonsunlight(void)
#ifdef NONMATCHING
static void atkC1_hidden_power_calc(void)
{
- s32 powerBits;
- s32 typeBits;
-
- powerBits = ((gBattleMons[gBankAttacker].hpIV & 2) >> 1)
- | ((gBattleMons[gBankAttacker].attackIV & 2) << 0)
- | ((gBattleMons[gBankAttacker].defenseIV & 2) << 1)
- | ((gBattleMons[gBankAttacker].speedIV & 2) << 2)
- | ((gBattleMons[gBankAttacker].spAttackIV & 2) << 3)
- | ((gBattleMons[gBankAttacker].spDefenseIV & 2) << 4);
-
- typeBits = ((gBattleMons[gBankAttacker].hpIV & 1) << 0)
- | ((gBattleMons[gBankAttacker].attackIV & 1) << 1)
- | ((gBattleMons[gBankAttacker].defenseIV & 1) << 2)
- | ((gBattleMons[gBankAttacker].speedIV & 1) << 3)
- | ((gBattleMons[gBankAttacker].spAttackIV & 1) << 4)
- | ((gBattleMons[gBankAttacker].spDefenseIV & 1) << 5);
+ u32 powerBits = 0;
+ u32 typeBits = 0;
+
+ powerBits |= ((gBattleMons[gBankAttacker].hpIV & 2) >> 1);
+ powerBits |= ((gBattleMons[gBankAttacker].attackIV & 2) << 0);
+ powerBits |= ((gBattleMons[gBankAttacker].defenseIV & 2) << 1);
+ powerBits |= ((gBattleMons[gBankAttacker].speedIV & 2) << 2);
+ powerBits |= ((gBattleMons[gBankAttacker].spAttackIV & 2) << 3);
+ powerBits |= ((gBattleMons[gBankAttacker].spDefenseIV & 2) << 4);
+
+ typeBits |= ((gBattleMons[gBankAttacker].hpIV & 1) << 0);
+ typeBits |= ((gBattleMons[gBankAttacker].attackIV & 1) << 1);
+ typeBits |= ((gBattleMons[gBankAttacker].defenseIV & 1) << 2);
+ typeBits |= ((gBattleMons[gBankAttacker].speedIV & 1) << 3);
+ typeBits |= ((gBattleMons[gBankAttacker].spAttackIV & 1) << 4);
+ typeBits |= ((gBattleMons[gBankAttacker].spDefenseIV & 1) << 5);
gDynamicBasePower = (40 * powerBits) / 63 + 30;