sovereignx/src/fldeff_strength.c

45 lines
1,009 B
C
Raw Normal View History

2018-02-13 16:22:33 +00:00
#include "global.h"
2018-02-13 17:38:54 +00:00
#include "event_data.h"
#include "event_scripts.h"
2018-02-13 16:22:33 +00:00
#include "field_effect.h"
#include "party_menu.h"
2018-02-13 17:38:54 +00:00
#include "rom6.h"
2018-02-13 16:22:33 +00:00
#include "script.h"
2018-02-13 17:38:54 +00:00
#include "task.h"
2018-02-13 16:22:33 +00:00
2018-02-13 17:38:54 +00:00
void sub_8145E0C(void);
void sub_8145E74(void);
2018-02-13 16:22:33 +00:00
bool8 hm_prepare_rocksmash(void)
{
if (npc_before_player_of_type(87) == TRUE)
{
gSpecialVar_Result = GetCursorSelectionMonId();
gUnknown_03005DB0 = FieldCallback_Teleport;
gUnknown_0203CEEC = sub_8145E0C;
return TRUE;
}
return FALSE;
}
2018-02-13 17:38:54 +00:00
void sub_8145E0C(void)
2018-02-13 16:22:33 +00:00
{
gFieldEffectArguments[0] = GetCursorSelectionMonId();
ScriptContext1_SetupScript(FieryPath_EventScript_2908FD);
}
2018-02-13 17:38:54 +00:00
bool8 sub_8145E2C(void)
2018-02-13 16:22:33 +00:00
{
u8 taskId = oei_task_add();
2018-02-13 17:38:54 +00:00
gTasks[taskId].data[8] = (u32)sub_8145E74 >> 16;
gTasks[taskId].data[9] = (u32)sub_8145E74;
2018-02-13 16:22:33 +00:00
GetMonNickname(&gPlayerParty[gFieldEffectArguments[0]], gStringVar1);
return FALSE;
}
2018-02-13 17:38:54 +00:00
void sub_8145E74(void)
2018-02-13 16:22:33 +00:00
{
2018-02-13 17:38:54 +00:00
FieldEffectActiveListRemove(40);
EnableBothScriptContexts();
2018-02-13 16:22:33 +00:00
}