summaryrefslogtreecommitdiff
path: root/src/battle_script_commands.c
diff options
context:
space:
mode:
authorCameron Hall <camthesaxman@users.noreply.github.com>2017-12-05 12:05:06 -0600
committerGitHub <noreply@github.com>2017-12-05 12:05:06 -0600
commitfd75493bc6f4a3c91158d8158edbb4cf964d08bc (patch)
treee7bd995f2647be3ae049d643814fa0377be2366d /src/battle_script_commands.c
parent7597433af6bb89986cf7c69617923cabcbec17c1 (diff)
parent790df7159ec26194a71ed57216de27358999a061 (diff)
Merge pull request #129 from DizzyEggg/dumb_naming
Name some battle labels
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r--src/battle_script_commands.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index f91a52480..ae4703512 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -1053,7 +1053,7 @@ static void atk00_attackcanceler(void)
if (!(gHitMarker & HITMARKER_OBEYS) && !(gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS))
{
- i = IsPokeDisobedient(); // why use the 'i' variable...?
+ i = IsMonDisobedient(); // why use the 'i' variable...?
switch (i)
{
case 0:
@@ -3040,7 +3040,7 @@ static void atk15_seteffectwithchance(void)
}
gBattleCommunication[MOVE_EFFECT_BYTE] = 0;
- gBattleScripting.field_16 = 0;
+ gBattleScripting.multihitMoveEffect = 0;
}
static void atk16_seteffectprimary(void)
@@ -3064,7 +3064,7 @@ static void atk18_clearstatusfromeffect(void)
gBattleCommunication[MOVE_EFFECT_BYTE] = 0;
gBattlescriptCurrInstr += 2;
- gBattleScripting.field_16 = 0;
+ gBattleScripting.multihitMoveEffect = 0;
}
static void atk19_tryfaintmon(void)
@@ -3221,7 +3221,7 @@ static void atk1E_jumpifability(void)
gLastUsedAbility = ability;
gBattlescriptCurrInstr = jumpPtr;
RecordAbilityBattle(bank - 1, gLastUsedAbility);
- gBattleScripting.field_15 = bank - 1;
+ gBattleScripting.bankWithAbility = bank - 1;
}
else
gBattlescriptCurrInstr += 7;
@@ -3234,7 +3234,7 @@ static void atk1E_jumpifability(void)
gLastUsedAbility = ability;
gBattlescriptCurrInstr = jumpPtr;
RecordAbilityBattle(bank - 1, gLastUsedAbility);
- gBattleScripting.field_15 = bank - 1;
+ gBattleScripting.bankWithAbility = bank - 1;
}
else
gBattlescriptCurrInstr += 7;
@@ -3247,7 +3247,7 @@ static void atk1E_jumpifability(void)
gLastUsedAbility = ability;
gBattlescriptCurrInstr = jumpPtr;
RecordAbilityBattle(bank, gLastUsedAbility);
- gBattleScripting.field_15 = bank;
+ gBattleScripting.bankWithAbility = bank;
}
else
gBattlescriptCurrInstr += 7;
@@ -6383,7 +6383,7 @@ static void atk62(void)
static void atk63_jumptorandomattack(void)
{
- if (gBattlescriptCurrInstr[1] != 0)
+ if (gBattlescriptCurrInstr[1])
gCurrentMove = gRandomMove;
else
gChosenMove = gCurrentMove = gRandomMove;
@@ -7790,7 +7790,7 @@ static void atk8E_initmultihitstring(void)
gBattlescriptCurrInstr++;
}
-static bool8 sub_8051064(void)
+static bool8 TryDoForceSwitchOut(void)
{
if (gBattleMons[gBankAttacker].level >= gBattleMons[gBankTarget].level)
{
@@ -7807,7 +7807,7 @@ static bool8 sub_8051064(void)
*(gBattleStruct->field_58 + gBankTarget) = gBattlePartyID[gBankTarget];
}
- gBattlescriptCurrInstr = BattleScript_82DADD8;
+ gBattlescriptCurrInstr = BattleScript_SuccessForceOut;
return TRUE;
}
@@ -7935,7 +7935,7 @@ static void atk8F_forcerandomswitch(void)
}
else
{
- if (sub_8051064())
+ if (TryDoForceSwitchOut())
{
do
{
@@ -7968,7 +7968,7 @@ static void atk8F_forcerandomswitch(void)
}
else
{
- sub_8051064();
+ TryDoForceSwitchOut();
}
}
@@ -9306,7 +9306,7 @@ static void atkBA_jumpifnopursuitswitchdmg(void)
gBankTarget = GetBankByIdentity(IDENTITY_PLAYER_MON2);
}
- if (gActionForBanks[gBankTarget] == 0
+ if (gActionForBanks[gBankTarget] == ACTION_USE_MOVE
&& gBankAttacker == *(gBattleStruct->moveTarget + gBankTarget)
&& !(gBattleMons[gBankTarget].status1 & (STATUS_SLEEP | STATUS_FREEZE))
&& gBattleMons[gBankAttacker].hp