2018-02-13 17:22:33 +01:00
|
|
|
#include "global.h"
|
2018-02-13 18:38:54 +01:00
|
|
|
#include "event_data.h"
|
|
|
|
#include "event_scripts.h"
|
2018-02-13 17:22:33 +01:00
|
|
|
#include "field_effect.h"
|
2018-12-24 21:59:05 +01:00
|
|
|
#include "fldeff.h"
|
2018-02-13 17:22:33 +01:00
|
|
|
#include "party_menu.h"
|
|
|
|
#include "script.h"
|
2018-11-19 18:14:28 +01:00
|
|
|
#include "string_util.h"
|
2018-02-13 18:38:54 +01:00
|
|
|
#include "task.h"
|
2018-06-30 14:26:33 +02:00
|
|
|
#include "constants/event_objects.h"
|
2018-11-13 15:19:04 +01:00
|
|
|
#include "constants/field_effects.h"
|
2018-02-13 17:22:33 +01:00
|
|
|
|
2018-02-27 06:03:23 +01:00
|
|
|
// static functions
|
|
|
|
static void FldEff_UseStrength(void);
|
|
|
|
static void sub_8145E74(void);
|
2018-02-13 17:22:33 +01:00
|
|
|
|
2018-02-27 06:03:23 +01:00
|
|
|
// text
|
2018-02-15 05:17:42 +01:00
|
|
|
bool8 SetUpFieldMove_Strength(void)
|
2018-02-13 17:22:33 +01:00
|
|
|
{
|
2018-07-06 05:33:07 +02:00
|
|
|
if (CheckObjectGraphicsInFrontOfPlayer(EVENT_OBJ_GFX_PUSHABLE_BOULDER) == TRUE)
|
2018-02-13 17:22:33 +01:00
|
|
|
{
|
|
|
|
gSpecialVar_Result = GetCursorSelectionMonId();
|
2018-06-16 00:45:48 +02:00
|
|
|
gFieldCallback2 = FieldCallback_PrepareFadeInFromMenu;
|
|
|
|
gPostMenuFieldCallback = FldEff_UseStrength;
|
2018-02-13 17:22:33 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-02-27 06:03:23 +01:00
|
|
|
static void FldEff_UseStrength(void)
|
2018-02-13 17:22:33 +01:00
|
|
|
{
|
|
|
|
gFieldEffectArguments[0] = GetCursorSelectionMonId();
|
2019-04-05 05:26:53 +02:00
|
|
|
ScriptContext1_SetupScript(EventScript_FldEffStrength);
|
2018-02-13 17:22:33 +01:00
|
|
|
}
|
|
|
|
|
2018-02-13 18:38:54 +01:00
|
|
|
bool8 sub_8145E2C(void)
|
2018-02-13 17:22:33 +01:00
|
|
|
{
|
|
|
|
u8 taskId = oei_task_add();
|
2018-02-13 18:38:54 +01:00
|
|
|
gTasks[taskId].data[8] = (u32)sub_8145E74 >> 16;
|
|
|
|
gTasks[taskId].data[9] = (u32)sub_8145E74;
|
2018-02-13 17:22:33 +01:00
|
|
|
GetMonNickname(&gPlayerParty[gFieldEffectArguments[0]], gStringVar1);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2018-02-27 06:03:23 +01:00
|
|
|
static void sub_8145E74(void)
|
2018-02-13 17:22:33 +01:00
|
|
|
{
|
2018-02-15 05:17:42 +01:00
|
|
|
FieldEffectActiveListRemove(FLDEFF_USE_STRENGTH);
|
2018-02-13 18:38:54 +01:00
|
|
|
EnableBothScriptContexts();
|
2018-02-13 17:22:33 +01:00
|
|
|
}
|