mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 11:43:37 +01:00
Dive Ball config.
This commit is contained in:
parent
14c243b273
commit
ce3b877666
@ -25,5 +25,6 @@
|
||||
#define P_NEST_BALL_MODIFIER GEN_7 // Nest Ball's formula varies depending on the Gen. See Cmd_handleballthrow.
|
||||
#define P_REPEAT_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x3.5 instead of x3.
|
||||
#define P_TIMER_BALL_MODIFIER GEN_7 // In Gen5+, Timer Ball's effectiveness increases by x0.3 per turn instead of x0.1
|
||||
#define P_DIVE_BALL_MODIFIER GEN_3 // In Gen4+, Dive Ball's effectiveness increases by when Surfing or Fishing.
|
||||
|
||||
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H
|
||||
|
@ -30,6 +30,7 @@ struct WildPokemonHeader
|
||||
};
|
||||
|
||||
extern bool8 gIsFishingEncounter;
|
||||
extern bool8 gIsSurfingEncounter;
|
||||
|
||||
extern const struct WildPokemonHeader gWildMonHeaders[];
|
||||
|
||||
|
@ -5073,6 +5073,7 @@ static void FreeResetData_ReturnToOvOrDoEvolutions(void)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
gIsFishingEncounter = FALSE;
|
||||
gIsSurfingEncounter = FALSE;
|
||||
ResetSpriteData();
|
||||
if (gLeveledUpInBattle == 0 || gBattleOutcome != B_OUTCOME_WON)
|
||||
{
|
||||
|
@ -9793,8 +9793,13 @@ static void Cmd_handleballthrow(void)
|
||||
#endif
|
||||
break;
|
||||
case ITEM_DIVE_BALL:
|
||||
if (GetCurrentMapType() == MAP_TYPE_UNDERWATER)
|
||||
ballMultiplier = 35;
|
||||
#if P_DIVE_BALL_MODIFIER >= GEN_4
|
||||
if (GetCurrentMapType() == MAP_TYPE_UNDERWATER || gIsFishingEncounter || gIsSurfingEncounter)
|
||||
ballMultiplier = 35;
|
||||
#else
|
||||
if (GetCurrentMapType() == MAP_TYPE_UNDERWATER)
|
||||
ballMultiplier = 35;
|
||||
#endif
|
||||
break;
|
||||
case ITEM_NEST_BALL:
|
||||
#if P_NEST_BALL_MODIFIER >= GEN_6
|
||||
|
@ -39,6 +39,7 @@ static bool8 IsAbilityAllowingEncounter(u8 level);
|
||||
// EWRAM vars
|
||||
EWRAM_DATA static u8 sWildEncountersDisabled = 0;
|
||||
EWRAM_DATA bool8 gIsFishingEncounter = 0;
|
||||
EWRAM_DATA bool8 gIsSurfingEncounter = 0;
|
||||
EWRAM_DATA static u32 sFeebasRngValue = 0;
|
||||
|
||||
#include "data/wild_encounters.h"
|
||||
@ -615,6 +616,7 @@ bool8 StandardWildEncounter(u16 currMetaTileBehavior, u16 previousMetaTileBehavi
|
||||
{
|
||||
if (TryGenerateWildMon(gWildMonHeaders[headerId].waterMonsInfo, WILD_AREA_WATER, WILD_CHECK_REPEL | WILD_CHECK_KEEN_EYE) == TRUE)
|
||||
{
|
||||
gIsSurfingEncounter = TRUE;
|
||||
BattleSetup_StartWildBattle();
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user