From 9b9b14ad0a711288446f9ba863eb0e3fe956ddd4 Mon Sep 17 00:00:00 2001 From: garak Date: Mon, 14 Oct 2019 12:57:42 -0400 Subject: [PATCH] remove empty groups from wild encounter fields json objects --- src/data/wild_encounters.json | 9 +++------ src/data/wild_encounters.json.txt | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/data/wild_encounters.json b/src/data/wild_encounters.json index 85f1e73aa..19aa40b00 100755 --- a/src/data/wild_encounters.json +++ b/src/data/wild_encounters.json @@ -8,22 +8,19 @@ "type": "land_mons", "encounter_rates": [ 20, 20, 10, 10, 10, 10, 5, 5, 4, 4, 1, 1 - ], - "groups": {} + ] }, { "type": "water_mons", "encounter_rates": [ 60, 30, 5, 4, 1 - ], - "groups": {} + ] }, { "type": "rock_smash_mons", "encounter_rates": [ 60, 30, 5, 4, 1 - ], - "groups": {} + ] }, { "type": "fishing_mons", diff --git a/src/data/wild_encounters.json.txt b/src/data/wild_encounters.json.txt index 9dbed7169..bf848249f 100755 --- a/src/data/wild_encounters.json.txt +++ b/src/data/wild_encounters.json.txt @@ -3,7 +3,7 @@ ## for wild_encounter_group in wild_encounter_groups {% if wild_encounter_group.for_maps %} ## for wild_encounter_field in wild_encounter_group.fields -{% if isEmpty(wild_encounter_field.groups) %} +{% if not existsIn(wild_encounter_field, "groups") %} ## for encounter_rate in wild_encounter_field.encounter_rates {% if loop.index == 0 %} #define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} {{ encounter_rate }} {% else %}#define ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ loop.index }} ENCOUNTER_CHANCE_{{ upper(wild_encounter_field.type) }}_SLOT_{{ subtract(loop.index, 1) }} + {{ encounter_rate }}{% endif %} {{ setVarInt(wild_encounter_field.type, loop.index) }}