summaryrefslogtreecommitdiff
path: root/src/battle_script_commands.c
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2017-12-16 01:08:55 +0100
committerDizzyEggg <jajkodizzy@wp.pl>2017-12-16 01:08:55 +0100
commit44abbae60b6a39e2a1432426005e1860be196abb (patch)
treef2405db72863761afcdcda57a88cf6ab0346e4fd /src/battle_script_commands.c
parent039c9f4bd8ee6bfb299d4422372804c569eddebd (diff)
parent224fdbf026cfb0ff88aac519875a39fb038e4bb1 (diff)
nerge with master, fix conflicts
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r--src/battle_script_commands.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c
index d9b35c053..ecdbb4d90 100644
--- a/src/battle_script_commands.c
+++ b/src/battle_script_commands.c
@@ -1,22 +1,22 @@
#include "global.h"
#include "battle.h"
-#include "battle_move_effects.h"
+#include "constants/battle_move_effects.h"
#include "battle_message.h"
#include "battle_ai_script_commands.h"
#include "battle_scripts.h"
-#include "moves.h"
-#include "abilities.h"
+#include "constants/moves.h"
+#include "constants/abilities.h"
#include "item.h"
-#include "items.h"
-#include "hold_effects.h"
+#include "constants/items.h"
+#include "constants/hold_effects.h"
#include "util.h"
#include "pokemon.h"
#include "calculate_base_damage.h"
-#include "rng.h"
+#include "random.h"
#include "battle_controllers.h"
#include "battle_interface.h"
-#include "species.h"
-#include "songs.h"
+#include "constants/species.h"
+#include "constants/songs.h"
#include "text.h"
#include "sound.h"
#include "pokedex.h"
@@ -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;
@@ -6782,8 +6782,8 @@ static bool8 sub_804F344(void)
return (gBattle_BG2_X != 0x1A0);
}
-#define sDestroy data0
-#define sSavedLvlUpBoxXPosition data1
+#define sDestroy data[0]
+#define sSavedLvlUpBoxXPosition data[1]
static void PutMonIconOnLvlUpBox(void)
{
@@ -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
@@ -10334,7 +10334,7 @@ static void atkE4_getsecretpowereffect(void)
case BATTLE_TERRAIN_POND:
gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_SPD_MINUS_1;
break;
- case BATTLE_TERRAIN_ROCK:
+ case BATTLE_TERRAIN_MOUNTAIN:
gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_CONFUSION;
break;
case BATTLE_TERRAIN_CAVE: