Pokemon Emerald: Randomize rock smash encounters (#3912)

* Pokemon Emerald: WIP add rock smash encounter randomization

* Pokemon Emerald: Refactor encounter data on maps

* Pokemon Emerald: Remove unused import

* Pokemon Emerald: Swap StrEnum for regular Enum and use .value
This commit is contained in:
Bryce Wilson
2025-03-08 08:57:16 -08:00
committed by GitHub
parent 5662da6f7d
commit 3986f6f11a
7 changed files with 179 additions and 181 deletions

View File

@@ -1,7 +1,7 @@
import orjson
from typing import Any, Dict, List, Optional, Tuple, Iterable
from .data import NATIONAL_ID_TO_SPECIES_ID, data
from .data import NATIONAL_ID_TO_SPECIES_ID, EncounterType, data
CHARACTER_DECODING_MAP = {
@@ -86,6 +86,28 @@ def decode_string(string_data: Iterable[int]) -> str:
return string
def get_encounter_type_label(encounter_type: EncounterType, slot: int) -> str:
if encounter_type == EncounterType.FISHING:
return {
0: "Old Rod",
1: "Old Rod",
2: "Good Rod",
3: "Good Rod",
4: "Good Rod",
5: "Super Rod",
6: "Super Rod",
7: "Super Rod",
8: "Super Rod",
9: "Super Rod",
}[slot]
return {
EncounterType.LAND: 'Land',
EncounterType.WATER: 'Water',
EncounterType.ROCK_SMASH: 'Rock Smash',
}[encounter_type]
def get_easter_egg(easter_egg: str) -> Tuple[int, int]:
easter_egg = easter_egg.upper()
result1 = 0