Skip to content

Commit

Permalink
Merge branch 'master' into daynight
Browse files Browse the repository at this point in the history
  • Loading branch information
citrusbolt committed Mar 23, 2021
2 parents a3ee2ea + 31958e1 commit 95d063f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 10 deletions.
6 changes: 3 additions & 3 deletions data/maps/Route113/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ Route113_Text_RouteSignFallarbor: @ 81F2456

Route113_Text_TrainerTipsRegisterKeyItems: @ 81F2471
.string "TRAINER TIPS\p"
.string "You may register one of the KEY ITEMS\n"
.string "in your BAG as SELECT.\p"
.string "Simply press SELECT to use\n"
.string "You may register three of the KEY ITEMS\n"
.string "in your BAG as SELECT, L, or R.\p"
.string "Simply press SELECT, L, or R to use\n"
.string "the registered item conveniently.$"

Route113_Text_GlassWorkshopSign: @ 81F24F8
Expand Down
8 changes: 4 additions & 4 deletions data/maps/SouthernIsland_Interior/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SouthernIsland_Interior_EventScript_TryRemoveLati:: @ 8242A5A
return

SouthernIsland_Interior_OnTransition: @ 8242A6E
call_if_unset FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatios
call_if_set FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatias
call_if_unset FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatias
call_if_set FLAG_ROAMER_QUEST, SouthernIsland_Interior_EventScript_SetUpLatios
call SouthernIsland_Interior_EventScript_SetUpPlayerGfx
end

Expand Down Expand Up @@ -77,8 +77,8 @@ SouthernIsland_Interior_EventScript_Lati:: @ 8242AD0
delay 50
special RemoveCameraObject
setvar VAR_LAST_TALKED, LOCALID_LATI
call_if_unset FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiosBattleVars
call_if_set FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiasBattleVars
call_if_unset FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiasBattleVars
call_if_set FLAG_ROAMER_QUEST SouthernIsland_Interior_EventScript_SetLatiosBattleVars
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLatiBattle
waitstate
Expand Down
2 changes: 1 addition & 1 deletion src/data/wild_encounters.json
Original file line number Diff line number Diff line change
Expand Up @@ -3414,7 +3414,7 @@
{
"min_level": 6,
"max_level": 6,
"species": "SPECIES_TAILLOW"
"species": "SPECIES_SHROOMISH"
},
{
"min_level": 6,
Expand Down
2 changes: 2 additions & 0 deletions src/field_player_avatar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,8 @@ bool8 PartyHasMonWithSurf(void)
break;
if (MonKnowsMove(&gPlayerParty[i], MOVE_SURF))
return TRUE;
if (CanMonLearnTMHM(&gPlayerParty[i], 53))
return TRUE;
}
}
return FALSE;
Expand Down
2 changes: 1 addition & 1 deletion src/pokemon_summary_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -3111,7 +3111,7 @@ static void BufferMonTrainerMemo(void)
{
GetMapNameGeneric(metLocationString, MAPSEC_MIRAGE_ISLAND);
}
else if (DidMonComeFromJohto && sum->metLocation < KANTO_MAPSEC_START) //Johto maps in CrystalDust as well as gameID 8 in case anyone uses it
else if (DidMonComeFromJohto() && sum->metLocation < KANTO_MAPSEC_START) //Johto maps in CrystalDust as well as gameID 8 in case anyone uses it
{
GetMapNameGeneric(metLocationString, (sum->metLocation + JOHTO_MAPSEC_START));
}
Expand Down
2 changes: 1 addition & 1 deletion src/region_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ u8 *GetMapNameExtended(u8 *dest, u16 regionMapId, u16 padLength)
{
str = GetSecretBaseMapName(dest);
}
else if (regionMapId < MAPSEC_END)
else if (regionMapId < MAPSEC_END && gRegionMapEntries[regionMapId].name != 0)
{
str = StringCopy(dest, gRegionMapEntries[regionMapId].name);
}
Expand Down
25 changes: 25 additions & 0 deletions src/scrcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,17 @@ static const u8 sScriptConditionTable[6][3] =
1, 0, 1, // !=
};

static const u16 sTMHMMoves[] =
{
[42] = MOVE_SECRET_POWER,
[50] = MOVE_CUT,
[52] = MOVE_SURF,
[53] = MOVE_STRENGTH,
[55] = MOVE_ROCK_SMASH,
[56] = MOVE_WATERFALL,
[57] = MOVE_DIVE,
};

static u8 * const sScriptStringVars[] =
{
gStringVar1,
Expand Down Expand Up @@ -1728,6 +1739,7 @@ bool8 ScrCmd_setmonmove(struct ScriptContext *ctx)
bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
{
u8 i;
u8 j;
u16 moveId = ScriptReadHalfword(ctx);

gSpecialVar_Result = PARTY_SIZE;
Expand All @@ -1742,6 +1754,19 @@ bool8 ScrCmd_checkpartymove(struct ScriptContext *ctx)
gSpecialVar_0x8004 = species;
break;
}
for (j = 0; j < 58; j++)
{
if (sTMHMMoves[j] == moveId)
{
if (CanMonLearnTMHM(&gPlayerParty[i], j))
{
gSpecialVar_Result = i;
gSpecialVar_0x8004 = species;
break;
}
}
}

}
return FALSE;
}
Expand Down

0 comments on commit 95d063f

Please sign in to comment.