mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user