summaryrefslogtreecommitdiff
path: root/src/field_poison.c
diff options
context:
space:
mode:
authorYamaArashi <YamaArashi@users.noreply.github.com>2017-01-17 08:11:32 -0800
committerGitHub <noreply@github.com>2017-01-17 08:11:32 -0800
commit90c7299e519783fe1e22d9ec8d3351d08bda65f6 (patch)
treeb24d8bdcd6809c5465c6aa18f6d3109af2aad915 /src/field_poison.c
parent4f9aab81ffdfedc84dfeafb88b4248dc6c7c2068 (diff)
parent46cf490edd4fd5971d3a3511516beb0910e33c32 (diff)
Merge pull request #193 from marijnvdwerf/clean/cleanup-1
Clean up various things
Diffstat (limited to 'src/field_poison.c')
-rw-r--r--src/field_poison.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/field_poison.c b/src/field_poison.c
index 6a243c280..dff5abd31 100644
--- a/src/field_poison.c
+++ b/src/field_poison.c
@@ -5,6 +5,7 @@
#include "script.h"
#include "string_util.h"
#include "task.h"
+#include "text.h"
extern struct Pokemon gPlayerParty[6];
extern u16 gScriptResult;
@@ -14,7 +15,7 @@ bool32 CheckMonIsValid(struct Pokemon *pkmn)
{
// UB: Too few arguments for function 'GetMonData'
u16 species2 = GetMonData(pkmn, MON_DATA_SPECIES2);
-
+
if (species2 == 0 || species2 == 0x19C)
return FALSE;
else
@@ -25,7 +26,7 @@ bool32 AllMonsFainted(void)
{
struct Pokemon *pkmn = &gPlayerParty[0];
int i;
-
+
for (i = 0; i < 6; i++, pkmn++)
{
// UB: Too few arguments for function 'GetMonData'
@@ -39,7 +40,7 @@ void MonFaintFromPoisonOnField(u8 partyMember)
{
struct Pokemon *pkmn = &gPlayerParty[partyMember];
u32 val = 0;
-
+
AdjustFriendship(pkmn, 7);
SetMonData(pkmn, MON_DATA_STATUS, (u8*)&val);
GetMonData(pkmn, MON_DATA_NICKNAME, gStringVar1);
@@ -49,7 +50,7 @@ void MonFaintFromPoisonOnField(u8 partyMember)
bool32 CheckMonFaintedFromPoison(u8 partyMember)
{
struct Pokemon *pkmn = &gPlayerParty[partyMember];
-
+
// UB: Too few arguments for function 'GetMonData'
if (CheckMonIsValid(pkmn) && GetMonData(pkmn, MON_DATA_HP) == 0
&& pokemon_ailments_get_primary(GetMonData(pkmn, MON_DATA_STATUS)) == 1)
@@ -68,7 +69,7 @@ enum
void Task_WhiteOut(u8 taskId)
{
s16 *taskData = gTasks[taskId].data;
-
+
switch (taskData[TD_STATE])
{
case 0: //Check if Pokemon have fainted due to poison
@@ -112,11 +113,11 @@ s32 overworld_poison(void)
u32 numPoisoned = 0;
u32 numFainting = 0;
int i;
-
+
for(i = 0; i < 6; i++)
{
u32 hp;
-
+
// UB: Too few arguments for function 'GetMonData'
if (GetMonData(pkmn, MON_DATA_SANITY_BIT2) != 0
&& pokemon_ailments_get_primary(GetMonData(pkmn, MON_DATA_STATUS)) == 1)