From 5d63d27124c2ab5fe723c9473390e1d64357c207 Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 17 Jun 2021 15:34:11 -0600 Subject: [PATCH] add hidden encounters to wild_encounters json --- src/data/wild_encounters.json.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/data/wild_encounters.json.txt b/src/data/wild_encounters.json.txt index bf848249f0..b00681467c 100755 --- a/src/data/wild_encounters.json.txt +++ b/src/data/wild_encounters.json.txt @@ -64,8 +64,19 @@ const struct WildPokemon {{ encounter.base_label }}_FishingMons[] = const struct WildPokemonInfo {{ encounter.base_label }}_FishingMonsInfo = { {{encounter.fishing_mons.encounter_rate}}, {{ encounter.base_label }}_FishingMons }; {% endif %} -## endfor +{% if existsIn(encounter, "hidden_mons") %} +const struct WildPokemon {{ encounter.base_label }}_HiddenMons[] = +{ +## for wild_mon in encounter.hidden_mons.mons + { {{ wild_mon.min_level }}, {{ wild_mon.max_level }}, {{ wild_mon.species }} }, +## endfor +}; + +const struct WildPokemonInfo {{ encounter.base_label }}_HiddenMonsInfo = { {{encounter.hidden_mons.encounter_rate}}, {{ encounter.base_label }}_HiddenMons }; +{% endif %} + +## endfor const struct WildPokemonHeader {{ wild_encounter_group.label }}[] = { ## for encounter in wild_encounter_group.encounters @@ -76,6 +87,7 @@ const struct WildPokemonHeader {{ wild_encounter_group.label }}[] = .waterMonsInfo = {% if existsIn(encounter, "water_mons") %}&{{ encounter.base_label }}_WaterMonsInfo{% else %}NULL{% endif %}, .rockSmashMonsInfo = {% if existsIn(encounter, "rock_smash_mons") %}&{{ encounter.base_label }}_RockSmashMonsInfo{% else %}NULL{% endif %}, .fishingMonsInfo = {% if existsIn(encounter, "fishing_mons") %}&{{ encounter.base_label }}_FishingMonsInfo{% else %}NULL{% endif %}, + .hiddenMonsInfo = {% if existsIn(encounter, "hidden_mons") %}&{{ encounter.base_label }}_HiddenMonsInfo{% else %}NULL{% endif %}, }, ## endfor { @@ -85,6 +97,7 @@ const struct WildPokemonHeader {{ wild_encounter_group.label }}[] = .waterMonsInfo = NULL, .rockSmashMonsInfo = NULL, .fishingMonsInfo = NULL, + .hiddenMonsInfo = NULL, }, }; ## endfor