Initial review changes.
This commit is contained in:
parent
12bc93dc78
commit
e861abeff3
4 changed files with 31 additions and 31 deletions
|
@ -14,20 +14,20 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Item config
|
// 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 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 P_KEY_FOSSILS GEN_7 // In Gen4+, all Gen 3 fossils became regular items.
|
#define I_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_KEY_ESCAPE_ROPE GEN_7 // In Gen8, Escape Rope became a Key Item.
|
||||||
|
|
||||||
// Ball config
|
// Ball config
|
||||||
#define P_LURE_BALL_MODIFIER GEN_7 // In Gen7+, Lure Ball's catch multiplier is x5 instead of x3.
|
#define I_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 I_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 I_REPEAT_BALL_MODIFIER GEN_7 // In Gen7+, Repeat 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 I_DUSK_BALL_MODIFIER GEN_7 // In Gen7+, Dusk 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 I_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 I_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 I_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 I_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 I_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_NEST_BALL_MODIFIER GEN_7 // Nest Ball's formula varies depending on the Gen. See Cmd_handleballthrow.
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H
|
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H
|
||||||
|
|
|
@ -9786,14 +9786,14 @@ static void Cmd_handleballthrow(void)
|
||||||
{
|
{
|
||||||
case ITEM_NET_BALL:
|
case ITEM_NET_BALL:
|
||||||
if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_WATER) || IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_BUG))
|
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;
|
ballMultiplier = 50;
|
||||||
#else
|
#else
|
||||||
ballMultiplier = 30;
|
ballMultiplier = 30;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ITEM_DIVE_BALL:
|
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)
|
if (GetCurrentMapType() == MAP_TYPE_UNDERWATER || gIsFishingEncounter || gIsSurfingEncounter)
|
||||||
ballMultiplier = 35;
|
ballMultiplier = 35;
|
||||||
#else
|
#else
|
||||||
|
@ -9802,11 +9802,11 @@ static void Cmd_handleballthrow(void)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ITEM_NEST_BALL:
|
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.
|
//((41 - Pokémon's level) ÷ 10)× if Pokémon's level is between 1 and 29, 1× otherwise.
|
||||||
if (gBattleMons[gBattlerTarget].level < 30)
|
if (gBattleMons[gBattlerTarget].level < 30)
|
||||||
ballMultiplier = 41 - gBattleMons[gBattlerTarget].level;
|
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×
|
//((41 - Pokémon's level) ÷ 10)×, minimum 1×
|
||||||
if (gBattleMons[gBattlerTarget].level < 31)
|
if (gBattleMons[gBattlerTarget].level < 31)
|
||||||
ballMultiplier = 41 - gBattleMons[gBattlerTarget].level;
|
ballMultiplier = 41 - gBattleMons[gBattlerTarget].level;
|
||||||
|
@ -9822,14 +9822,14 @@ static void Cmd_handleballthrow(void)
|
||||||
break;
|
break;
|
||||||
case ITEM_REPEAT_BALL:
|
case ITEM_REPEAT_BALL:
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), FLAG_GET_CAUGHT))
|
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;
|
ballMultiplier = 35;
|
||||||
#else
|
#else
|
||||||
ballMultiplier = 30;
|
ballMultiplier = 30;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ITEM_TIMER_BALL:
|
case ITEM_TIMER_BALL:
|
||||||
#if P_TIMER_BALL_MODIFIER >= GEN_5
|
#if I_TIMER_BALL_MODIFIER >= GEN_5
|
||||||
ballMultiplier = (gBattleResults.battleTurnCounter * 3) + 10;
|
ballMultiplier = (gBattleResults.battleTurnCounter * 3) + 10;
|
||||||
#else
|
#else
|
||||||
ballMultiplier = gBattleResults.battleTurnCounter + 10;
|
ballMultiplier = gBattleResults.battleTurnCounter + 10;
|
||||||
|
@ -9857,7 +9857,7 @@ static void Cmd_handleballthrow(void)
|
||||||
break;
|
break;
|
||||||
case ITEM_LURE_BALL:
|
case ITEM_LURE_BALL:
|
||||||
if (gIsFishingEncounter)
|
if (gIsFishingEncounter)
|
||||||
#if P_LURE_BALL_MODIFIER >= GEN_7
|
#if I_LURE_BALL_MODIFIER >= GEN_7
|
||||||
ballMultiplier = 50;
|
ballMultiplier = 50;
|
||||||
#else
|
#else
|
||||||
ballMultiplier = 30;
|
ballMultiplier = 30;
|
||||||
|
@ -9883,7 +9883,7 @@ static void Cmd_handleballthrow(void)
|
||||||
break;
|
break;
|
||||||
case ITEM_HEAVY_BALL:
|
case ITEM_HEAVY_BALL:
|
||||||
i = GetPokedexHeightWeight(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), 1);
|
i = GetPokedexHeightWeight(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), 1);
|
||||||
#if P_HEAVY_BALL_MODIFIER >= GEN_7
|
#if I_HEAVY_BALL_MODIFIER >= GEN_7
|
||||||
if (i < 1000)
|
if (i < 1000)
|
||||||
ballMultiplier = 5;
|
ballMultiplier = 5;
|
||||||
else if (i < 2000)
|
else if (i < 2000)
|
||||||
|
@ -9911,7 +9911,7 @@ static void Cmd_handleballthrow(void)
|
||||||
break;
|
break;
|
||||||
case ITEM_QUICK_BALL:
|
case ITEM_QUICK_BALL:
|
||||||
if (gBattleResults.battleTurnCounter == 0)
|
if (gBattleResults.battleTurnCounter == 0)
|
||||||
#if P_QUICK_BALL_MODIFIER >= GEN_5
|
#if I_QUICK_BALL_MODIFIER >= GEN_5
|
||||||
ballMultiplier = 50;
|
ballMultiplier = 50;
|
||||||
#else
|
#else
|
||||||
ballMultiplier = 40;
|
ballMultiplier = 40;
|
||||||
|
@ -9920,14 +9920,14 @@ static void Cmd_handleballthrow(void)
|
||||||
case ITEM_DUSK_BALL:
|
case ITEM_DUSK_BALL:
|
||||||
RtcCalcLocalTime();
|
RtcCalcLocalTime();
|
||||||
if ((gLocalTime.hours >= 20 && gLocalTime.hours <= 3) || gMapHeader.cave || gMapHeader.mapType == MAP_TYPE_UNDERGROUND)
|
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;
|
ballMultiplier = 30;
|
||||||
#else
|
#else
|
||||||
ballMultiplier = 35;
|
ballMultiplier = 35;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ITEM_DREAM_BALL:
|
case ITEM_DREAM_BALL:
|
||||||
#if P_DREAM_BALL_MODIFIER >= GEN_8
|
#if I_DREAM_BALL_MODIFIER >= GEN_8
|
||||||
if (gBattleMons[gBattlerTarget].status1 & STATUS1_SLEEP)
|
if (gBattleMons[gBattlerTarget].status1 & STATUS1_SLEEP)
|
||||||
ballMultiplier = 40;
|
ballMultiplier = 40;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1282,7 +1282,7 @@ const struct Item gItems[] =
|
||||||
.name = _("Escape Rope"),
|
.name = _("Escape Rope"),
|
||||||
.itemId = ITEM_ESCAPE_ROPE,
|
.itemId = ITEM_ESCAPE_ROPE,
|
||||||
.description = sEscapeRopeDesc,
|
.description = sEscapeRopeDesc,
|
||||||
#if P_KEY_ESCAPE_ROPE >= GEN_8
|
#if I_KEY_ESCAPE_ROPE >= GEN_8
|
||||||
.price = 0,
|
.price = 0,
|
||||||
.importance = 1,
|
.importance = 1,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
|
@ -4820,7 +4820,7 @@ const struct Item gItems[] =
|
||||||
.itemId = ITEM_OLD_AMBER,
|
.itemId = ITEM_OLD_AMBER,
|
||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sOldAmberDesc,
|
.description = sOldAmberDesc,
|
||||||
#if P_KEY_FOSSILS >= GEN_4
|
#if I_KEY_FOSSILS >= GEN_4
|
||||||
.importance = 1,
|
.importance = 1,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
#else
|
#else
|
||||||
|
@ -4890,7 +4890,7 @@ const struct Item gItems[] =
|
||||||
.itemId = ITEM_HELIX_FOSSIL,
|
.itemId = ITEM_HELIX_FOSSIL,
|
||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sHelixFossilDesc,
|
.description = sHelixFossilDesc,
|
||||||
#if P_KEY_FOSSILS >= GEN_4
|
#if I_KEY_FOSSILS >= GEN_4
|
||||||
.importance = 1,
|
.importance = 1,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
#else
|
#else
|
||||||
|
@ -4908,7 +4908,7 @@ const struct Item gItems[] =
|
||||||
.itemId = ITEM_DOME_FOSSIL,
|
.itemId = ITEM_DOME_FOSSIL,
|
||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sDomeFossilDesc,
|
.description = sDomeFossilDesc,
|
||||||
#if P_KEY_FOSSILS >= GEN_4
|
#if I_KEY_FOSSILS >= GEN_4
|
||||||
.importance = 1,
|
.importance = 1,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
#else
|
#else
|
||||||
|
@ -4926,7 +4926,7 @@ const struct Item gItems[] =
|
||||||
.itemId = ITEM_ROOT_FOSSIL,
|
.itemId = ITEM_ROOT_FOSSIL,
|
||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sRootFossilDesc,
|
.description = sRootFossilDesc,
|
||||||
#if P_KEY_FOSSILS >= GEN_4
|
#if I_KEY_FOSSILS >= GEN_4
|
||||||
.importance = 1,
|
.importance = 1,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
#else
|
#else
|
||||||
|
@ -4944,7 +4944,7 @@ const struct Item gItems[] =
|
||||||
.itemId = ITEM_CLAW_FOSSIL,
|
.itemId = ITEM_CLAW_FOSSIL,
|
||||||
.price = 0,
|
.price = 0,
|
||||||
.description = sClawFossilDesc,
|
.description = sClawFossilDesc,
|
||||||
#if P_KEY_FOSSILS >= GEN_4
|
#if I_KEY_FOSSILS >= GEN_4
|
||||||
.importance = 1,
|
.importance = 1,
|
||||||
.pocket = POCKET_KEY_ITEMS,
|
.pocket = POCKET_KEY_ITEMS,
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -2233,7 +2233,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||||
personality = Random32();
|
personality = Random32();
|
||||||
shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality);
|
shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality);
|
||||||
rolls++;
|
rolls++;
|
||||||
} while (shinyValue >= SHINY_ODDS && rolls < P_SHINY_CHARM_REROLLS);
|
} while (shinyValue >= SHINY_ODDS && rolls < I_SHINY_CHARM_REROLLS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue