diff options
author | garak <garakmon@gmail.com> | 2019-07-29 20:02:43 -0400 |
---|---|---|
committer | garak <garakmon@gmail.com> | 2019-07-29 20:02:43 -0400 |
commit | 08a3ff77dd845a7b1d6debfeb7bd8408aacd12f4 (patch) | |
tree | 4d0c3b69fdab43cd31dbb5c6f7db4bbc6233db86 /src | |
parent | 2580693ea5331c13496d6e22803deea21eb5e423 (diff) |
index to slot in c file
Diffstat (limited to 'src')
-rw-r--r-- | src/wild_encounter.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 5a11396d9..332bbfb99 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -145,27 +145,27 @@ static u8 ChooseWildMonIndex_Land(void) { u8 rand = Random() % ENCOUNTER_CHANCE_LAND_MONS_TOTAL; - if (rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_0) + if (rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_0) return 0; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_0 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_1) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_0 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_1) return 1; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_1 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_2) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_1 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_2) return 2; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_2 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_3) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_2 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_3) return 3; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_3 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_4) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_3 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_4) return 4; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_4 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_5) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_4 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_5) return 5; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_5 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_6) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_5 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_6) return 6; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_6 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_7) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_6 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_7) return 7; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_7 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_8) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_7 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_8) return 8; - else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_INDEX_8 && rand < ENCOUNTER_CHANCE_LAND_MONS_INDEX_9) + else if (rand >= ENCOUNTER_CHANCE_LAND_MONS_SLOT_8 && rand < ENCOUNTER_CHANCE_LAND_MONS_SLOT_9) return 9; - else if (rand == ENCOUNTER_CHANCE_LAND_MONS_INDEX_9) + else if (rand == ENCOUNTER_CHANCE_LAND_MONS_SLOT_9) return 10; else return 11; @@ -175,13 +175,13 @@ static u8 ChooseWildMonIndex_WaterRock(void) { u8 rand = Random() % ENCOUNTER_CHANCE_WATER_MONS_TOTAL; - if (rand < ENCOUNTER_CHANCE_WATER_MONS_INDEX_0) + if (rand < ENCOUNTER_CHANCE_WATER_MONS_SLOT_0) return 0; - else if (rand >= ENCOUNTER_CHANCE_WATER_MONS_INDEX_0 && rand < ENCOUNTER_CHANCE_WATER_MONS_INDEX_1) + else if (rand >= ENCOUNTER_CHANCE_WATER_MONS_SLOT_0 && rand < ENCOUNTER_CHANCE_WATER_MONS_SLOT_1) return 1; - else if (rand >= ENCOUNTER_CHANCE_WATER_MONS_INDEX_1 && rand < ENCOUNTER_CHANCE_WATER_MONS_INDEX_2) + else if (rand >= ENCOUNTER_CHANCE_WATER_MONS_SLOT_1 && rand < ENCOUNTER_CHANCE_WATER_MONS_SLOT_2) return 2; - else if (rand >= ENCOUNTER_CHANCE_WATER_MONS_INDEX_2 && rand < ENCOUNTER_CHANCE_WATER_MONS_INDEX_3) + else if (rand >= ENCOUNTER_CHANCE_WATER_MONS_SLOT_2 && rand < ENCOUNTER_CHANCE_WATER_MONS_SLOT_3) return 3; else return 4; @@ -202,29 +202,29 @@ static u8 ChooseWildMonIndex_Fishing(u8 rod) switch (rod) { case OLD_ROD: - if (rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_0) + if (rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_0) wildMonIndex = 0; else wildMonIndex = 1; break; case GOOD_ROD: - if (rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_2) + if (rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_2) wildMonIndex = 2; - if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_INDEX_2 && rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_3) + if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_2 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_3) wildMonIndex = 3; - if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_INDEX_3 && rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_4) + if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_3 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_4) wildMonIndex = 4; break; case SUPER_ROD: - if (rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_5) + if (rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_5) wildMonIndex = 5; - if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_INDEX_5 && rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_6) + if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_5 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_6) wildMonIndex = 6; - if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_INDEX_6 && rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_7) + if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_6 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_7) wildMonIndex = 7; - if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_INDEX_7 && rand < ENCOUNTER_CHANCE_FISHING_MONS_INDEX_8) + if (rand >= ENCOUNTER_CHANCE_FISHING_MONS_SLOT_7 && rand < ENCOUNTER_CHANCE_FISHING_MONS_SLOT_8) wildMonIndex = 8; - if (rand == ENCOUNTER_CHANCE_FISHING_MONS_INDEX_8) + if (rand == ENCOUNTER_CHANCE_FISHING_MONS_SLOT_8) wildMonIndex = 9; break; } |