Merge branch 'followers-expanded-id' of https://github.com/aarant/pokeemerald into merrpmerge1210
This commit is contained in:
commit
8dba27249c
4 changed files with 23 additions and 3 deletions
|
@ -368,6 +368,23 @@ EventScript_EndSurface::
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
EventScript_DigCommon:
|
||||||
|
isfollowerfieldmoveuser VAR_0x8004
|
||||||
|
setfieldeffectargument 3, VAR_0x8004 @ skip pose if true
|
||||||
|
dofieldeffect FLDEFF_USE_DIG
|
||||||
|
waitstate
|
||||||
|
EventScript_DigSealedChamber:: @ fallthrough
|
||||||
|
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
|
||||||
|
call_if_eq VAR_0x8004, TRUE, EventScript_FollowerFieldMove
|
||||||
|
callnative DoBrailleDigEffect
|
||||||
|
releaseall
|
||||||
|
end
|
||||||
|
|
||||||
|
@ Use Dig from party menu
|
||||||
|
EventScript_UseDig::
|
||||||
|
lockall
|
||||||
|
goto EventScript_DigCommon
|
||||||
|
|
||||||
Text_CantDive:
|
Text_CantDive:
|
||||||
.string "The sea is deep here. A POKéMON\n"
|
.string "The sea is deep here. A POKéMON\n"
|
||||||
.string "may be able to go underwater.$"
|
.string "may be able to go underwater.$"
|
||||||
|
|
|
@ -404,6 +404,7 @@ extern const u8 EventScript_FailSweetScent[];
|
||||||
extern const u8 EventScript_UseFlash[];
|
extern const u8 EventScript_UseFlash[];
|
||||||
extern const u8 EventScript_UseCut[];
|
extern const u8 EventScript_UseCut[];
|
||||||
extern const u8 EventScript_UseRockSmash[];
|
extern const u8 EventScript_UseRockSmash[];
|
||||||
|
extern const u8 EventScript_UseDig[];
|
||||||
|
|
||||||
//player pc
|
//player pc
|
||||||
extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[];
|
extern const u8 LittlerootTown_BrendansHouse_2F_EventScript_TurnOffPlayerPC[];
|
||||||
|
|
|
@ -87,7 +87,6 @@ void DoBrailleDigEffect(void)
|
||||||
DrawWholeMapView();
|
DrawWholeMapView();
|
||||||
PlaySE(SE_BANG);
|
PlaySE(SE_BANG);
|
||||||
FlagSet(FLAG_SYS_BRAILLE_DIG);
|
FlagSet(FLAG_SYS_BRAILLE_DIG);
|
||||||
UnlockPlayerFieldControls();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 CheckRelicanthWailord(void)
|
bool8 CheckRelicanthWailord(void)
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "braille_puzzles.h"
|
#include "braille_puzzles.h"
|
||||||
|
#include "event_scripts.h"
|
||||||
#include "field_effect.h"
|
#include "field_effect.h"
|
||||||
#include "field_player_avatar.h"
|
#include "field_player_avatar.h"
|
||||||
#include "fldeff.h"
|
#include "fldeff.h"
|
||||||
#include "item_use.h"
|
#include "item_use.h"
|
||||||
#include "overworld.h"
|
#include "overworld.h"
|
||||||
#include "party_menu.h"
|
#include "party_menu.h"
|
||||||
|
#include "script.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
#include "constants/field_effects.h"
|
#include "constants/field_effects.h"
|
||||||
|
|
||||||
|
@ -31,8 +33,8 @@ bool8 SetUpFieldMove_Dig(void)
|
||||||
static void FieldCallback_Dig(void)
|
static void FieldCallback_Dig(void)
|
||||||
{
|
{
|
||||||
Overworld_ResetStateAfterDigEscRope();
|
Overworld_ResetStateAfterDigEscRope();
|
||||||
FieldEffectStart(FLDEFF_USE_DIG);
|
|
||||||
gFieldEffectArguments[0] = GetCursorSelectionMonId();
|
gFieldEffectArguments[0] = GetCursorSelectionMonId();
|
||||||
|
ScriptContext_SetupScript(EventScript_UseDig);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 FldEff_UseDig(void)
|
bool8 FldEff_UseDig(void)
|
||||||
|
@ -53,7 +55,8 @@ static void StartDigFieldEffect(void)
|
||||||
FieldEffectActiveListRemove(FLDEFF_USE_DIG);
|
FieldEffectActiveListRemove(FLDEFF_USE_DIG);
|
||||||
if (ShouldDoBrailleDigEffect())
|
if (ShouldDoBrailleDigEffect())
|
||||||
{
|
{
|
||||||
DoBrailleDigEffect();
|
// EventScript_DigSealedChamber handles DoBrailleDigEffect call
|
||||||
|
ScriptContext_Enable();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue