Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tile encounter name #325

Merged
merged 1 commit into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/global.fieldmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ enum
enum
{
TILE_ENCOUNTER_NONE,
TILE_ENCOUNTER_GRASS,
TILE_ENCOUNTER_LAND,
TILE_ENCOUNTER_WATER,
};

Expand Down
6 changes: 3 additions & 3 deletions src/wild_encounter.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ bool8 StandardWildEncounter(u32 currMetatileBehavior, u16 previousMetatileBehavi
headerId = GetCurrentMapWildMonHeaderId();
if (headerId != 0xFFFF)
{
if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_GRASS)
if (GetMetatileAttributeFromRawMetatileBehavior(currMetatileBehavior, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_LAND)
{
if (gWildMonHeaders[headerId].landMonsInfo == NULL)
return FALSE;
Expand Down Expand Up @@ -474,7 +474,7 @@ bool8 SweetScentWildEncounter(void)
headerId = GetCurrentMapWildMonHeaderId();
if (headerId != 0xFFFF)
{
if (MapGridGetMetatileAttributeAt(x, y, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_GRASS)
if (MapGridGetMetatileAttributeAt(x, y, METATILE_ATTRIBUTE_ENCOUNTER_TYPE) == TILE_ENCOUNTER_LAND)
{
if (TryStartRoamerEncounter() == TRUE)
{
Expand Down Expand Up @@ -680,7 +680,7 @@ static u8 GetMapBaseEncounterCooldown(u8 encounterType)
u16 headerIdx = GetCurrentMapWildMonHeaderId();
if (headerIdx == 0xFFFF)
return 0xFF;
if (encounterType == TILE_ENCOUNTER_GRASS)
if (encounterType == TILE_ENCOUNTER_LAND)
{
if (gWildMonHeaders[headerIdx].landMonsInfo == NULL)
return 0xFF;
Expand Down