src/field/world_map_encounter_rules.c
Where the World Map's random battles come from: each region of the map, on foot and aboard the ship, takes its own encounter zone, and each Djinni battle its zone and slot.
#include "djinn_ids.h"#include "flags.h"#include "field/map_grid.h"#include "field/script_commands.h"#include "field/world_map_encounter_rules.h"
Enumerations
| Name | Description | |
|---|---|---|
enum | WORLD_MAP_ENCOUNTER_REGION { WORLD_MAP_REGION_DAILA, WORLD_MAP_REGION_OSENIA, WORLD_MAP_R … } | The World Map's encounter regions, the region number of the ground underfoot modulo 20 (WORLD_MAP_ENCOUNTER_REGIONS), named by where they lie. |
enum | WORLD_MAP_ENCOUNTER_ZONE { ENCOUNTER_ZONE_WORLD_MAP_DAILA_FOREST, ENCOUNTER_ZONE_WORLD_ … } | The World Map's other encounter zones, rows of EncounterZones: one for a region's open ground, beaches and shallows, one for its forest (Daila's open ground takes ENCOUNTER_ZONE_WORLD_MAP_BEACH_AND_GRASSLAND). |
Variables
| Name | Description | |
|---|---|---|
const WORLD_MAP_ENCOUNTER_RULE | WorldMapEncounterRules [] | The World Map's encounter zones on foot: {encounter region, battle environment, flag (-1 for always), zone (a row of EncounterZones)}, ended by region -1. |
const WORLD_MAP_ENCOUNTER_RULE | WorldMapShipEncounterRules [] | The same aboard the ship (LEADER_MOVEMENT_SHIP). |
const Uint16 | EncounterDjinnBattles [][2] | The encounter of each Djinni battle (fdEncounterGetDjinnFormation): {zone, slot}, by Djinni number, as The Broken Seal's EncounterDjinnBattles. |
Description
Where the World Map's random battles come from: each region of the map, on foot and aboard the ship, takes its own encounter zone, and each Djinni battle its zone and slot.
Enumerations in detail
WORLD_MAP_ENCOUNTER_REGION
enum WORLD_MAP_ENCOUNTER_REGION
The World Map's encounter regions, the region number of the ground underfoot
modulo 20 (WORLD_MAP_ENCOUNTER_REGIONS), named by where they lie.
| Enumerator | Value | Description |
|---|---|---|
WORLD_MAP_REGION_DAILA | 1 | Indra's north: Daila, the Kandorean Temple. |
WORLD_MAP_REGION_OSENIA | 2 | Osenia: Mikasalla, Alhafra, Garoh. |
WORLD_MAP_REGION_GONDOWAN | 3 | Gondowan: Naribwe and the Kibombo Mountains. |
WORLD_MAP_REGION_EASTERN_SEA_LANDS | 4 | The lands around the Eastern Sea: Yallam, Taopo Swamp, Champa, the Ankohl Ruins, Izumo and the islets; the Apojii Islands (24) and the East Tundaria Islet's snow (44) take them too. |
WORLD_MAP_REGION_ATTEKA_AND_HESPERIA | 5 | Atteka and Hesperia: Contigo, the Shaman Village and the Gondowan Settlement, and also Loho and Treasure Isle; Kalt Island (45) and the SW Atteka Islet (25) take them too. |
WORLD_MAP_REGION_EASTERN_SEA | 7 | Aboard the ship. |
WORLD_MAP_REGION_WESTERN_SEA | 8 | |
WORLD_MAP_REGION_SEA_OF_TIME | 9 | |
WORLD_MAP_REGION_MADRA | 11 | Indra's south: Madra, the Dehkan Plateau, the Osenia Cliffs' west. |
WORLD_MAP_REGION_AIRS_ROCK | 12 | Around Air's Rock. |
WORLD_MAP_REGION_ABOVE_SHAMAN_VILLAGE | 15 | A strip of land north of the Shaman Village. |
WORLD_MAP_REGION_PROX | 16 | Prox and Mars Lighthouse, in the blizzard (region 36). |
WORLD_MAP_REGION_KIBOMBO | 18 | Around Kibombo: dark, and without battles, until the Gabomba ceremony ends. |
Definition at line 13 of file world_map_encounter_rules.c.
WORLD_MAP_ENCOUNTER_ZONE
enum WORLD_MAP_ENCOUNTER_ZONE
The World Map's other encounter zones, rows of EncounterZones: one for a
region's open ground, beaches and shallows, one for its forest (Daila's open
ground takes ENCOUNTER_ZONE_WORLD_MAP_BEACH_AND_GRASSLAND).
| Enumerator | Value | Description |
|---|---|---|
ENCOUNTER_ZONE_WORLD_MAP_DAILA_FOREST | 15 | |
ENCOUNTER_ZONE_WORLD_MAP_MADRA | 25 | |
ENCOUNTER_ZONE_WORLD_MAP_MADRA_FOREST | 26 | |
ENCOUNTER_ZONE_WORLD_MAP_OSENIA | 29 | |
ENCOUNTER_ZONE_WORLD_MAP_OSENIA_FOREST | 30 | |
ENCOUNTER_ZONE_WORLD_MAP_GONDOWAN | 42 | |
ENCOUNTER_ZONE_WORLD_MAP_GONDOWAN_FOREST | 43 | |
ENCOUNTER_ZONE_WORLD_MAP_EASTERN_SEA | 52 | Aboard the ship. |
ENCOUNTER_ZONE_WORLD_MAP_EASTERN_SEA_LANDS | 53 | |
ENCOUNTER_ZONE_WORLD_MAP_EASTERN_SEA_LANDS_FOREST | 54 | |
ENCOUNTER_ZONE_WORLD_MAP_WESTERN_SEA | 77 | Aboard the ship. |
ENCOUNTER_ZONE_WORLD_MAP_ATTEKA_AND_HESPERIA | 78 | |
ENCOUNTER_ZONE_WORLD_MAP_ATTEKA_AND_HESPERIA_FOREST | 79 | |
ENCOUNTER_ZONE_WORLD_MAP_EASTERN_SEA_LANDS_SNOW | 107 | The East Tundaria Islet's snowfield and its forest. |
Definition at line 54 of file world_map_encounter_rules.c.
Variables in detail
WorldMapEncounterRules
const WORLD_MAP_ENCOUNTER_RULE WorldMapEncounterRules[]
The World Map's encounter zones on foot: {encounter region, battle
environment, flag (-1 for always), zone (a row of EncounterZones)}, ended by
region -1.
Referenced by fdEncounterResolveWorldMapZoneAndBackdrop().
Definition at line 79 of file world_map_encounter_rules.c.
WorldMapShipEncounterRules
const WORLD_MAP_ENCOUNTER_RULE WorldMapShipEncounterRules[]
The same aboard the ship (LEADER_MOVEMENT_SHIP).
Referenced by fdEncounterResolveWorldMapZoneAndBackdrop().
Definition at line 162 of file world_map_encounter_rules.c.
EncounterDjinnBattles
const Uint16 EncounterDjinnBattles[][2]
The encounter of each Djinni battle (fdEncounterGetDjinnFormation): {zone, slot}, by Djinni
number, as The Broken Seal's EncounterDjinnBattles. The Broken Seal's seven of each element
(Flint to Bane) have no battle of their own here and share the slots of this game's (Flint's is
Iron's).
Referenced by fdEncounterGetDjinnFormation().
Definition at line 176 of file world_map_encounter_rules.c.