-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Allow Feebas to be caught on any Valid Fishing Spot in Route 119 rather than only Three
voloved edited this page Dec 25, 2022
·
3 revisions
In Wild_encounter.c, add the below lines CheckFeebas
function.
You can remove feebasCatchAllTiles
and set set the function to always be true. I just wanted to show how a variable or flag can be there to turn this feature off.
Also, the odds of catching Feebas on any tile is 50, which is the original. That's high now that it's allowed on any tile. lowering the 49 in Random() % 100 > 49
will fix that if you care.
static bool8 CheckFeebas(void)
{
u8 i;
u16 feebasSpots[NUM_FEEBAS_SPOTS];
s16 x, y;
u8 route119Section = 0;
u16 spotId;
+ bool8 feebasCatchAllTiles = TRUE;
if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(ROUTE119)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(ROUTE119))
{
+ if(feebasCatchAllTiles){
+ if(Random() % 100 > 49)
+ return TRUE;
+ else
+ return FALSE;
+ }
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
x -= MAP_OFFSET;
y -= MAP_OFFSET;
// Get which third of the map the player is in
if (y >= sRoute119WaterTileData[3 * 0 + 0] && y <= sRoute119WaterTileData[3 * 0 + 1])
route119Section = 0;
if (y >= sRoute119WaterTileData[3 * 1 + 0] && y <= sRoute119WaterTileData[3 * 1 + 1])
route119Section = 1;
if (y >= sRoute119WaterTileData[3 * 2 + 0] && y <= sRoute119WaterTileData[3 * 2 + 1])
route119Section = 2;
// 50% chance of encountering Feebas (assuming this is a Feebas spot)
if (Random() % 100 > 49)
return FALSE;
FeebasSeedRng(gSaveBlock1Ptr->dewfordTrends[0].rand);
// Assign each Feebas spot to a random fishing spot.
// Randomness is fixed depending on the seed above.
for (i = 0; i != NUM_FEEBAS_SPOTS;)
{
feebasSpots[i] = FeebasRandom() % NUM_FISHING_SPOTS;
if (feebasSpots[i] == 0)
feebasSpots[i] = NUM_FISHING_SPOTS;
// < 1 below is a pointless check, it will never be TRUE.
// >= 4 to skip fishing spots 1-3, because these are inaccessible
// spots at the top of the map, at (9,7), (7,13), and (15,16).
// The first accessible fishing spot is spot 4 at (18,18).
if (feebasSpots[i] < 1 || feebasSpots[i] >= 4)
i++;
}
// Check which fishing spot the player is at, and see if
// it matches any of the Feebas spots.
spotId = GetFeebasFishingSpotId(x, y, route119Section);
for (i = 0; i < NUM_FEEBAS_SPOTS; i++)
{
if (spotId == feebasSpots[i])
return TRUE;
}
}
return FALSE;
}