forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
3,180 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
EventScript_StartDexNavBattle:: | ||
lock | ||
playse SE_PIN | ||
applymovement OBJ_EVENT_ID_PLAYER Common_Movement_ExclamationMark | ||
waitmovement 0 | ||
waitse | ||
dowildbattle | ||
release | ||
end | ||
|
||
EventScript_NotFoundNearby:: | ||
msgbox sText_NotFoundNearby, MSGBOX_SIGN | ||
end | ||
|
||
EventScript_MovedTooFast:: | ||
msgbox sText_TryMovingSlower, MSGBOX_SIGN | ||
end | ||
|
||
EventScript_PokemonGotAway:: | ||
msgbox sText_PokemonGotAway, MSGBOX_SIGN | ||
end | ||
|
||
EventScript_LostSignal:: | ||
msgbox sText_LostSignal, MSGBOX_SIGN | ||
end | ||
|
||
EventScript_TooDark:: | ||
msgbox sText_TooDark, MSGBOX_SIGN | ||
end | ||
|
||
sText_NotFoundNearby: | ||
.string "It couldn't be found nearby.\n" | ||
.string "Try looking in a different area!$" | ||
|
||
sText_TryMovingSlower: | ||
.string "The Pokémon got away!\n" | ||
.string "Try moving more slowly.$" | ||
|
||
sText_PokemonGotAway: | ||
.string "The Pokémon got away!$" | ||
|
||
sText_LostSignal: | ||
.string "There is no reaction.\n" | ||
.string "The signal was lost!$" | ||
|
||
sText_TooDark: | ||
.string "It's too dark to search\nfor a Pokémon!$" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
JASC-PAL | ||
0100 | ||
16 | ||
0 0 0 | ||
255 255 255 | ||
217 73 73 | ||
4 4 4 | ||
1 81 113 | ||
1 121 193 | ||
119 177 75 | ||
93 97 101 | ||
91 179 211 | ||
153 32 32 | ||
111 141 81 | ||
173 173 173 | ||
187 217 167 | ||
75 147 189 | ||
177 219 235 | ||
105 22 22 |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
JASC-PAL | ||
0100 | ||
16 | ||
255 1 255 | ||
159 122 85 | ||
207 189 157 | ||
199 181 149 | ||
114 88 61 | ||
132 101 70 | ||
199 173 141 | ||
225 209 193 | ||
189 165 133 | ||
181 149 115 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
JASC-PAL | ||
0100 | ||
16 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 6 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
0 0 0 | ||
46 46 46 | ||
0 0 0 | ||
255 255 255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#ifndef GUARD_CONFIG_DEXNAV_H | ||
#define GUARD_CONFIG_DEXNAV_H | ||
|
||
#define DEXNAV_ENABLED FALSE // Whether or not DexNav is enabled. If TRUE, flags/vars below must all be non-zero | ||
#define USE_DEXNAV_SEARCH_LEVELS FALSE /* WARNING: POSSIBLY EXCEEDS SAVEBLOCK SPACE! REQUIRES 1 BYTE PER SPECIES */ | ||
|
||
// Flag/var defines | ||
#define FLAG_SYS_DEXNAV_SEARCH 0 // Searching for mon | ||
#define FLAG_SYS_DEXNAV_GET 0 // DexNav shows in start menu | ||
#define FLAG_SYS_DETECTOR_MODE 0 // Allow player to find hidden mons | ||
#define VAR_DEXNAV_SPECIES 0 // Registered DexNav species | ||
#define VAR_DEXNAV_STEP_COUNTER 0 // Steps for finding hidden pokemon | ||
|
||
// Search parameters | ||
#define DEXNAV_TIMEOUT 15 // 15 seconds is the time out. Max of 1092 seconds allowed | ||
#define SNEAKING_PROXIMITY 4 // Tile amount | ||
#define CREEPING_PROXIMITY 2 | ||
#define MAX_PROXIMITY 20 | ||
|
||
#define DEXNAV_CHAIN_MAX 100 // maximum chain value | ||
|
||
// hidden pokemon options - an approximation of values to due to lack of available data | ||
#define HIDDEN_MON_STEP_COUNT 100 // Look for hidden pokemon every x steps | ||
#define HIDDEN_MON_SEARCH_RATE 25 // x% chance of finding hidden pokemon every x steps | ||
#define HIDDEN_MON_PROBABILTY 15 // x% chance of finding hidden mon compared to regular encounter data | ||
|
||
//// SEARCH PROBABILITIES | ||
// See https://bulbapedia.bulbagarden.net/wiki/DexNav#Benefits | ||
// Chance of encountering egg move at search levels | ||
#define SEARCHLEVEL0_MOVECHANCE 0 | ||
#define SEARCHLEVEL5_MOVECHANCE 21 | ||
#define SEARCHLEVEL10_MOVECHANCE 46 | ||
#define SEARCHLEVEL25_MOVECHANCE 58 | ||
#define SEARCHLEVEL50_MOVECHANCE 63 | ||
#define SEARCHLEVEL100_MOVECHANCE 83 | ||
// Chance of encountering Hidden Abilities at search levels | ||
#define SEARCHLEVEL0_ABILITYCHANCE 0 | ||
#define SEARCHLEVEL5_ABILITYCHANCE 0 | ||
#define SEARCHLEVEL10_ABILITYCHANCE 5 | ||
#define SEARCHLEVEL25_ABILITYCHANCE 15 | ||
#define SEARCHLEVEL50_ABILITYCHANCE 20 | ||
#define SEARCHLEVEL100_ABILITYCHANCE 23 | ||
// Chance of encountering held item | ||
#define SEARCHLEVEL0_ITEM 0 | ||
#define SEARCHLEVEL5_ITEM 0 | ||
#define SEARCHLEVEL10_ITEM 1 | ||
#define SEARCHLEVEL25_ITEM 7 | ||
#define SEARCHLEVEL50_ITEM 6 | ||
#define SEARCHLEVEL100_ITEM 12 | ||
// Chance of encountering one star potential | ||
#define SEARCHLEVEL0_ONESTAR 0 | ||
#define SEARCHLEVEL5_ONESTAR 14 | ||
#define SEARCHLEVEL10_ONESTAR 17 | ||
#define SEARCHLEVEL25_ONESTAR 17 | ||
#define SEARCHLEVEL50_ONESTAR 15 | ||
#define SEARCHLEVEL100_ONESTAR 8 | ||
// Chance of encountering two star potential | ||
#define SEARCHLEVEL0_TWOSTAR 0 | ||
#define SEARCHLEVEL5_TWOSTAR 1 | ||
#define SEARCHLEVEL10_TWOSTAR 9 | ||
#define SEARCHLEVEL25_TWOSTAR 16 | ||
#define SEARCHLEVEL50_TWOSTAR 17 | ||
#define SEARCHLEVEL100_TWOSTAR 24 | ||
// Chance of encountering three star potential | ||
#define SEARCHLEVEL0_THREESTAR 0 | ||
#define SEARCHLEVEL5_THREESTAR 0 | ||
#define SEARCHLEVEL10_THREESTAR 1 | ||
#define SEARCHLEVEL25_THREESTAR 7 | ||
#define SEARCHLEVEL50_THREESTAR 6 | ||
#define SEARCHLEVEL100_THREESTAR 12 | ||
|
||
#endif // GUARD_CONFIG_DEXNAV_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#ifndef GUARD_DEXNAV_H | ||
#define GUARD_DEXNAV_H | ||
|
||
#include "config/dexnav.h" | ||
|
||
// GUI Info | ||
#define ROW_WATER 0 | ||
#define ROW_LAND_TOP 1 | ||
#define ROW_LAND_BOT 2 | ||
#define ROW_HIDDEN 3 | ||
#define ROWS_COUNT 4 | ||
|
||
#define ROW_WATER_ICON_X 30 | ||
#define ROW_WATER_ICON_Y 35 | ||
|
||
#define ROW_LAND_ICON_X 20 | ||
#define ROW_LAND_TOP_ICON_Y 72 | ||
#define ROW_LAND_BOT_ICON_Y (ROW_LAND_TOP_ICON_Y + 28) | ||
|
||
#define ROW_HIDDEN_ICON_X 52 | ||
#define ROW_HIDDEN_ICON_Y 138 | ||
|
||
#define ENCOUNTER_TYPE_LAND 0 | ||
#define ENCOUNTER_TYPE_WATER 1 | ||
#define ENCOUNTER_TYPE_HIDDEN 2 // Get from species | ||
|
||
#define COL_WATER_COUNT 5 | ||
#define COL_LAND_COUNT 6 | ||
#define COL_HIDDEN_COUNT 3 | ||
|
||
#define COL_WATER_MAX (COL_WATER_COUNT - 1) | ||
#define COL_LAND_MAX (COL_LAND_COUNT - 1) | ||
#define COL_HIDDEN_MAX (COL_HIDDEN_COUNT - 1) | ||
|
||
// SEARCH INFO | ||
#define SCANSTART_X 0 | ||
#define SCANSTART_Y 0 | ||
#define SCANSIZE_X 12 | ||
#define SCANSIZE_Y 12 | ||
|
||
#define SPECIES_INFO_Y 5 | ||
#define TYPE_ICONS_Y (SPECIES_INFO_Y + 24) | ||
#define SEARCH_LEVEL_Y (TYPE_ICONS_Y + 24) | ||
#define HA_INFO_Y (SEARCH_LEVEL_Y + 24) | ||
#define CHAIN_BONUS_Y (HA_INFO_Y + 24) | ||
|
||
#define MON_LEVEL_NONEXISTENT 255 // If mon not in area GetEncounterLevel returns this to exit the search | ||
|
||
// GUI tags | ||
#define ICON_PAL_TAG 56000 | ||
#define ICON_GFX_TAG 55130 | ||
#define SELECTION_CURSOR_TAG 0x4005 | ||
#define CAPTURED_ALL_TAG 0x4002 | ||
|
||
// Search tags | ||
#define OWNED_ICON_TAG 0x4003 | ||
#define HIDDEN_SEARCH_TAG SELECTION_CURSOR_TAG | ||
#define HIDDEN_MON_ICON_TAG 0x4006 | ||
#define LIT_STAR_TILE_TAG 0x4010 | ||
#define HELD_ITEM_TAG 0xd750 | ||
|
||
// DexNav search variable | ||
#define DEXNAV_MASK_SPECIES 0x3FFF // First 14 bits | ||
#define DEXNAV_MASK_ENVIRONMENT 0xC000 // Last two bit | ||
|
||
void EndDexNavSearch(u8 taskId); | ||
void Task_OpenDexNavFromStartMenu(u8 taskId); | ||
bool8 TryStartDexNavSearch(void); | ||
void TryIncrementSpeciesSearchLevel(u16 dexNum); | ||
void ResetDexNavSearch(void); | ||
bool8 TryFindHiddenPokemon(void); | ||
u32 CalculateDexNavShinyRolls(void); | ||
void IncrementDexNavChain(void); | ||
|
||
extern bool8 gDexNavBattle; | ||
|
||
#endif // GUARD_DEXNAV_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.