Initial review changes.

This commit is contained in:
Eduardo Quezada 2020-10-23 22:19:37 -03:00
parent 12bc93dc78
commit e861abeff3
4 changed files with 31 additions and 31 deletions

View file

@ -14,20 +14,20 @@
#endif
// Item config
#define P_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects.
#define P_KEY_FOSSILS GEN_7 // In Gen4+, all Gen 3 fossils became regular items.
#define P_KEY_ESCAPE_ROPE GEN_7 // In Gen8, Escape Rope became a Key Item.
#define I_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects.
#define I_KEY_FOSSILS GEN_7 // In Gen4+, all Gen 3 fossils became regular items.
#define I_KEY_ESCAPE_ROPE GEN_7 // In Gen8, Escape Rope became a Key Item.
// Ball config
#define P_LURE_BALL_MODIFIER GEN_7 // In Gen7+, Lure Ball's catch multiplier is x5 instead of x3.
#define P_NET_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x5 instead of x3.
#define P_REPEAT_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x3.5 instead of x3.
#define P_DUSK_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x3 instead of x3.5.
#define P_QUICK_BALL_MODIFIER GEN_7 // In Gen5+, Quick Ball's catch multiplier is x5 instead of x4.
#define P_DREAM_BALL_MODIFIER GEN_8 // In Gen8+, Dream Ball's catch multiplier is x4 when the target is asleep.
#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_7 // In Gen4+, Dive Ball's effectiveness increases by when Surfing or Fishing.
#define P_HEAVY_BALL_MODIFIER GEN_7 // In Gen7+, Heavy Ball's ranges change. See Cmd_handleballthrow.
#define P_NEST_BALL_MODIFIER GEN_7 // Nest Ball's formula varies depending on the Gen. See Cmd_handleballthrow.
#define I_LURE_BALL_MODIFIER GEN_7 // In Gen7+, Lure Ball's catch multiplier is x5 instead of x3.
#define I_NET_BALL_MODIFIER GEN_7 // In Gen7+, Net Ball's catch multiplier is x5 instead of x3.
#define I_REPEAT_BALL_MODIFIER GEN_7 // In Gen7+, Repeat Ball's catch multiplier is x3.5 instead of x3.
#define I_DUSK_BALL_MODIFIER GEN_7 // In Gen7+, Dusk Ball's catch multiplier is x3 instead of x3.5.
#define I_QUICK_BALL_MODIFIER GEN_7 // In Gen5+, Quick Ball's catch multiplier is x5 instead of x4.
#define I_DREAM_BALL_MODIFIER GEN_8 // In Gen8+, Dream Ball's catch multiplier is x4 when the target is asleep.
#define I_TIMER_BALL_MODIFIER GEN_7 // In Gen5+, Timer Ball's effectiveness increases by x0.3 per turn instead of x0.1
#define I_DIVE_BALL_MODIFIER GEN_7 // In Gen4+, Dive Ball's effectiveness increases by when Surfing or Fishing.
#define I_HEAVY_BALL_MODIFIER GEN_7 // In Gen7+, Heavy Ball's ranges change. See Cmd_handleballthrow.
#define I_NEST_BALL_MODIFIER GEN_7 // Nest Ball's formula varies depending on the Gen. See Cmd_handleballthrow.
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H

View file

@ -9786,14 +9786,14 @@ static void Cmd_handleballthrow(void)
{
case ITEM_NET_BALL:
if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_WATER) || IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_BUG))
#if P_NET_BALL_MODIFIER >= GEN_7
#if I_NET_BALL_MODIFIER >= GEN_7
ballMultiplier = 50;
#else
ballMultiplier = 30;
#endif
break;
case ITEM_DIVE_BALL:
#if P_DIVE_BALL_MODIFIER >= GEN_4
#if I_DIVE_BALL_MODIFIER >= GEN_4
if (GetCurrentMapType() == MAP_TYPE_UNDERWATER || gIsFishingEncounter || gIsSurfingEncounter)
ballMultiplier = 35;
#else
@ -9802,11 +9802,11 @@ static void Cmd_handleballthrow(void)
#endif
break;
case ITEM_NEST_BALL:
#if P_NEST_BALL_MODIFIER >= GEN_6
#if I_NEST_BALL_MODIFIER >= GEN_6
//((41 - Pokémon's level) ÷ 10)× if Pokémon's level is between 1 and 29, 1× otherwise.
if (gBattleMons[gBattlerTarget].level < 30)
ballMultiplier = 41 - gBattleMons[gBattlerTarget].level;
#elif P_NEST_BALL_MODIFIER == GEN_5
#elif I_NEST_BALL_MODIFIER == GEN_5
//((41 - Pokémon's level) ÷ 10)×, minimum 1×
if (gBattleMons[gBattlerTarget].level < 31)
ballMultiplier = 41 - gBattleMons[gBattlerTarget].level;
@ -9822,14 +9822,14 @@ static void Cmd_handleballthrow(void)
break;
case ITEM_REPEAT_BALL:
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), FLAG_GET_CAUGHT))
#if P_REPEAT_BALL_MODIFIER >= GEN_7
#if I_REPEAT_BALL_MODIFIER >= GEN_7
ballMultiplier = 35;
#else
ballMultiplier = 30;
#endif
break;
case ITEM_TIMER_BALL:
#if P_TIMER_BALL_MODIFIER >= GEN_5
#if I_TIMER_BALL_MODIFIER >= GEN_5
ballMultiplier = (gBattleResults.battleTurnCounter * 3) + 10;
#else
ballMultiplier = gBattleResults.battleTurnCounter + 10;
@ -9857,7 +9857,7 @@ static void Cmd_handleballthrow(void)
break;
case ITEM_LURE_BALL:
if (gIsFishingEncounter)
#if P_LURE_BALL_MODIFIER >= GEN_7
#if I_LURE_BALL_MODIFIER >= GEN_7
ballMultiplier = 50;
#else
ballMultiplier = 30;
@ -9883,7 +9883,7 @@ static void Cmd_handleballthrow(void)
break;
case ITEM_HEAVY_BALL:
i = GetPokedexHeightWeight(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), 1);
#if P_HEAVY_BALL_MODIFIER >= GEN_7
#if I_HEAVY_BALL_MODIFIER >= GEN_7
if (i < 1000)
ballMultiplier = 5;
else if (i < 2000)
@ -9911,7 +9911,7 @@ static void Cmd_handleballthrow(void)
break;
case ITEM_QUICK_BALL:
if (gBattleResults.battleTurnCounter == 0)
#if P_QUICK_BALL_MODIFIER >= GEN_5
#if I_QUICK_BALL_MODIFIER >= GEN_5
ballMultiplier = 50;
#else
ballMultiplier = 40;
@ -9920,14 +9920,14 @@ static void Cmd_handleballthrow(void)
case ITEM_DUSK_BALL:
RtcCalcLocalTime();
if ((gLocalTime.hours >= 20 && gLocalTime.hours <= 3) || gMapHeader.cave || gMapHeader.mapType == MAP_TYPE_UNDERGROUND)
#if P_DUSK_BALL_MODIFIER >= GEN_7
#if I_DUSK_BALL_MODIFIER >= GEN_7
ballMultiplier = 30;
#else
ballMultiplier = 35;
#endif
break;
case ITEM_DREAM_BALL:
#if P_DREAM_BALL_MODIFIER >= GEN_8
#if I_DREAM_BALL_MODIFIER >= GEN_8
if (gBattleMons[gBattlerTarget].status1 & STATUS1_SLEEP)
ballMultiplier = 40;
#else

View file

@ -1282,7 +1282,7 @@ const struct Item gItems[] =
.name = _("Escape Rope"),
.itemId = ITEM_ESCAPE_ROPE,
.description = sEscapeRopeDesc,
#if P_KEY_ESCAPE_ROPE >= GEN_8
#if I_KEY_ESCAPE_ROPE >= GEN_8
.price = 0,
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
@ -4820,7 +4820,7 @@ const struct Item gItems[] =
.itemId = ITEM_OLD_AMBER,
.price = 0,
.description = sOldAmberDesc,
#if P_KEY_FOSSILS >= GEN_4
#if I_KEY_FOSSILS >= GEN_4
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
#else
@ -4890,7 +4890,7 @@ const struct Item gItems[] =
.itemId = ITEM_HELIX_FOSSIL,
.price = 0,
.description = sHelixFossilDesc,
#if P_KEY_FOSSILS >= GEN_4
#if I_KEY_FOSSILS >= GEN_4
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
#else
@ -4908,7 +4908,7 @@ const struct Item gItems[] =
.itemId = ITEM_DOME_FOSSIL,
.price = 0,
.description = sDomeFossilDesc,
#if P_KEY_FOSSILS >= GEN_4
#if I_KEY_FOSSILS >= GEN_4
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
#else
@ -4926,7 +4926,7 @@ const struct Item gItems[] =
.itemId = ITEM_ROOT_FOSSIL,
.price = 0,
.description = sRootFossilDesc,
#if P_KEY_FOSSILS >= GEN_4
#if I_KEY_FOSSILS >= GEN_4
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
#else
@ -4944,7 +4944,7 @@ const struct Item gItems[] =
.itemId = ITEM_CLAW_FOSSIL,
.price = 0,
.description = sClawFossilDesc,
#if P_KEY_FOSSILS >= GEN_4
#if I_KEY_FOSSILS >= GEN_4
.importance = 1,
.pocket = POCKET_KEY_ITEMS,
#else

View file

@ -2233,7 +2233,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
personality = Random32();
shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality);
rolls++;
} while (shinyValue >= SHINY_ODDS && rolls < P_SHINY_CHARM_REROLLS);
} while (shinyValue >= SHINY_ODDS && rolls < I_SHINY_CHARM_REROLLS);
}
}