add field info to wild pokemon json

This commit is contained in:
garak
2019-06-30 12:05:45 -04:00
parent f3c7e1cc81
commit adb0a44457
4 changed files with 88 additions and 30 deletions

View File

@@ -3,6 +3,32 @@
{
"label": "gWildMonHeaders",
"for_maps": true,
"fields": [
{
"type": "land_mons",
"encounter_rates": [
20, 20, 10, 10, 10, 10, 5, 5, 4, 4, 1, 1
]
},
{
"type": "water_mons",
"encounter_rates": [
60, 30, 5, 4, 1
]
},
{
"type": "rock_smash_mons",
"encounter_rates": [
60, 30, 5, 4, 1
]
},
{
"type": "fishing_mons",
"encounter_rates": [
70, 30, 60, 20, 20, 40, 40, 15, 4, 1
]
}
],
"encounters": [
{
"map": "MAP_ROUTE101",

View File

@@ -1,5 +1,16 @@
{{ doNotModifyHeader }}
## for wild_encounter_group in wild_encounter_groups
{% if wild_encounter_group.for_maps %}
## for wild_encounter_field in wild_encounter_group.fields
## for encounter_rate in wild_encounter_field.encounter_rates
{% if trackVar(encounter_rate, 100) %}
#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_INDEX_{{ loop.index }} {{ encounter_rate }} {% else %}#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_INDEX_{{ loop.index }} ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_INDEX_{{ subtract(loop.index, 1) }} + {{ encounter_rate }}{% endif %}
## endfor
## endfor
{% endif %}
## for encounter in wild_encounter_group.encounters
{% if existsIn(encounter, "land_mons") %}
const struct WildPokemon {{ encounter.base_label }}_LandMons[] =