Fixed non-regional forms breeding incorrectly (#4985)
This commit is contained in:
parent
ddff2def40
commit
fe41f9eaf5
21
include/constants/regions.h
Normal file
21
include/constants/regions.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef GUARD_CONSTANTS_REGIONS_H
|
||||
#define GUARD_CONSTANTS_REGIONS_H
|
||||
|
||||
// Core-series regions
|
||||
enum Region
|
||||
{
|
||||
REGION_NONE,
|
||||
REGION_KANTO,
|
||||
REGION_JOHTO,
|
||||
REGION_HOENN,
|
||||
REGION_SINNOH,
|
||||
REGION_UNOVA,
|
||||
REGION_KALOS,
|
||||
REGION_ALOLA,
|
||||
REGION_GALAR,
|
||||
REGION_HISUI,
|
||||
REGION_PALDEA,
|
||||
REGIONS_COUNT,
|
||||
};
|
||||
|
||||
#endif // GUARD_CONSTANTS_REGIONS_H
|
||||
@ -34,5 +34,6 @@ void ShowDaycareLevelMenu(void);
|
||||
void ChooseSendDaycareMon(void);
|
||||
u8 GetEggMovesBySpecies(u16 species, u16 *eggMoves);
|
||||
bool8 SpeciesCanLearnEggMove(u16 species, u16 move);
|
||||
void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycareMon);
|
||||
|
||||
#endif // GUARD_DAYCARE_H
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "sprite.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/regions.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/map_groups.h"
|
||||
#include "contest_effect.h"
|
||||
@ -912,5 +913,7 @@ void UpdateDaysPassedSinceFormChange(u16 days);
|
||||
void TrySetDayLimitToFormChange(struct Pokemon *mon);
|
||||
u32 CheckDynamicMoveType(struct Pokemon *mon, u32 move, u32 battler);
|
||||
uq4_12_t GetDynamaxLevelHPMultiplier(u32 dynamaxLevel, bool32 inverseMultiplier);
|
||||
u32 GetRegionalFormByRegion(u32 species, u32 region);
|
||||
bool32 IsSpeciesForeignRegionalForm(u32 species, u32 currentRegion);
|
||||
|
||||
#endif // GUARD_POKEMON_H
|
||||
|
||||
12
include/regions.h
Normal file
12
include/regions.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef GUARD_REGIONS_H
|
||||
#define GUARD_REGIONS_H
|
||||
|
||||
#include "constants/regions.h"
|
||||
|
||||
static inline u32 GetCurrentRegion(void)
|
||||
{
|
||||
// TODO: Since there's no current multi-region support, we have this constant for the purposes of regional form comparisons.
|
||||
return REGION_HOENN;
|
||||
}
|
||||
|
||||
#endif // GUARD_REGIONS_H
|
||||
@ -21,6 +21,7 @@
|
||||
#include "list_menu.h"
|
||||
#include "overworld.h"
|
||||
#include "item.h"
|
||||
#include "regions.h"
|
||||
#include "constants/form_change_types.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/hold_effects.h"
|
||||
@ -244,7 +245,7 @@ static void TransferEggMoves(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycareMon)
|
||||
void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycareMon)
|
||||
{
|
||||
if (MonHasMail(mon))
|
||||
{
|
||||
@ -979,9 +980,12 @@ STATIC_ASSERT(P_SCATTERBUG_LINE_FORM_BREED == SPECIES_SCATTERBUG_ICY_SNOW || (P_
|
||||
|
||||
static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parentSlots)
|
||||
{
|
||||
u16 i;
|
||||
u16 species[DAYCARE_MON_COUNT];
|
||||
u16 eggSpecies;
|
||||
u32 i;
|
||||
u32 species[DAYCARE_MON_COUNT];
|
||||
u32 eggSpecies, parentSpecies;
|
||||
bool32 hasMotherEverstone, hasFatherEverstone, motherIsForeign, fatherIsForeign;
|
||||
bool32 motherEggSpecies, fatherEggSpecies;
|
||||
u32 currentRegion = GetCurrentRegion();
|
||||
|
||||
for (i = 0; i < DAYCARE_MON_COUNT; i++)
|
||||
{
|
||||
@ -998,7 +1002,24 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
|
||||
}
|
||||
}
|
||||
|
||||
eggSpecies = GetEggSpecies(species[parentSlots[0]]);
|
||||
motherEggSpecies = GetEggSpecies(species[parentSlots[0]]);
|
||||
fatherEggSpecies = GetEggSpecies(species[parentSlots[1]]);
|
||||
hasMotherEverstone = ItemId_GetHoldEffect(GetBoxMonData(&daycare->mons[parentSlots[0]].mon, MON_DATA_HELD_ITEM)) == HOLD_EFFECT_PREVENT_EVOLVE;
|
||||
hasFatherEverstone = ItemId_GetHoldEffect(GetBoxMonData(&daycare->mons[parentSlots[1]].mon, MON_DATA_HELD_ITEM)) == HOLD_EFFECT_PREVENT_EVOLVE;
|
||||
motherIsForeign = IsSpeciesForeignRegionalForm(motherEggSpecies, currentRegion);
|
||||
fatherIsForeign = IsSpeciesForeignRegionalForm(fatherEggSpecies, currentRegion);
|
||||
|
||||
if (hasMotherEverstone)
|
||||
parentSpecies = motherEggSpecies;
|
||||
else if (fatherIsForeign && hasFatherEverstone)
|
||||
parentSpecies = fatherEggSpecies;
|
||||
else if (motherIsForeign)
|
||||
parentSpecies = GetRegionalFormByRegion(motherEggSpecies, currentRegion);
|
||||
else
|
||||
parentSpecies = motherEggSpecies;
|
||||
|
||||
eggSpecies = GetEggSpecies(parentSpecies);
|
||||
|
||||
if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & EGG_GENDER_MALE)
|
||||
eggSpecies = SPECIES_NIDORAN_M;
|
||||
else if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & EGG_GENDER_MALE)
|
||||
@ -1043,6 +1064,9 @@ static void _GiveEggFromDaycare(struct DayCare *daycare)
|
||||
u8 parentSlots[DAYCARE_MON_COUNT] = {0};
|
||||
bool8 isEgg;
|
||||
|
||||
if (GetDaycareCompatibilityScore(daycare) == PARENTS_INCOMPATIBLE)
|
||||
return;
|
||||
|
||||
species = DetermineEggSpeciesAndParentSlots(daycare, parentSlots);
|
||||
if (P_INCENSE_BREEDING < GEN_9)
|
||||
AlterEggSpeciesWithIncenseItem(&species, daycare);
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
#include "constants/items.h"
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/regions.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/union_room.h"
|
||||
@ -6985,3 +6986,70 @@ uq4_12_t GetDynamaxLevelHPMultiplier(u32 dynamaxLevel, bool32 inverseMultiplier)
|
||||
return UQ_4_12(1.0/(1.5 + 0.05 * dynamaxLevel));
|
||||
return UQ_4_12(1.5 + 0.05 * dynamaxLevel);
|
||||
}
|
||||
|
||||
bool32 IsSpeciesRegionalForm(u32 species)
|
||||
{
|
||||
return gSpeciesInfo[species].isAlolanForm
|
||||
|| gSpeciesInfo[species].isGalarianForm
|
||||
|| gSpeciesInfo[species].isHisuianForm
|
||||
|| gSpeciesInfo[species].isPaldeanForm;
|
||||
}
|
||||
|
||||
bool32 IsSpeciesRegionalFormFromRegion(u32 species, u32 region)
|
||||
{
|
||||
switch (region)
|
||||
{
|
||||
case REGION_ALOLA: return gSpeciesInfo[species].isAlolanForm;
|
||||
case REGION_GALAR: return gSpeciesInfo[species].isGalarianForm;
|
||||
case REGION_HISUI: return gSpeciesInfo[species].isHisuianForm;
|
||||
case REGION_PALDEA: return gSpeciesInfo[species].isPaldeanForm;
|
||||
default: return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
bool32 SpeciesHasRegionalForm(u32 species)
|
||||
{
|
||||
u32 formId;
|
||||
const u16 *formTable = GetSpeciesFormTable(species);
|
||||
for (formId = 0; formTable != NULL && formTable[formId] != FORM_SPECIES_END; formId++)
|
||||
{
|
||||
if (IsSpeciesRegionalForm(formTable[formId]))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u32 GetRegionalFormByRegion(u32 species, u32 region)
|
||||
{
|
||||
u32 formId = 0;
|
||||
u32 firstFoundSpecies = 0;
|
||||
const u16 *formTable = GetSpeciesFormTable(species);
|
||||
|
||||
if (formTable != NULL)
|
||||
{
|
||||
for (formId = 0; formTable[formId] != FORM_SPECIES_END; formId++)
|
||||
{
|
||||
if (firstFoundSpecies == 0)
|
||||
firstFoundSpecies = formTable[formId];
|
||||
|
||||
if (IsSpeciesRegionalFormFromRegion(formTable[formId], region))
|
||||
return formTable[formId];
|
||||
}
|
||||
if (firstFoundSpecies != 0)
|
||||
return firstFoundSpecies;
|
||||
}
|
||||
return species;
|
||||
}
|
||||
|
||||
bool32 IsSpeciesForeignRegionalForm(u32 species, u32 currentRegion)
|
||||
{
|
||||
u32 i;
|
||||
for (i = 0; i < REGIONS_COUNT; i++)
|
||||
{
|
||||
if (currentRegion != i && IsSpeciesRegionalFormFromRegion(species, i))
|
||||
return TRUE;
|
||||
else if (currentRegion == i && SpeciesHasRegionalForm(species) && !IsSpeciesRegionalFormFromRegion(species, i))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
164
test/daycare.c
Normal file
164
test/daycare.c
Normal file
@ -0,0 +1,164 @@
|
||||
#include "global.h"
|
||||
#include "daycare.h"
|
||||
#include "event_data.h"
|
||||
#include "malloc.h"
|
||||
#include "party_menu.h"
|
||||
#include "regions.h"
|
||||
#include "test/overworld_script.h"
|
||||
#include "test/test.h"
|
||||
|
||||
// We don't run the StoreSelectedPokemonInDaycare special because it relies on calling the
|
||||
// party select screen and the GetCursorSelectionMonId function, so we store directly to the struct.
|
||||
#define STORE_IN_DAYCARE_AND_GET_EGG() \
|
||||
StorePokemonInDaycare(&gPlayerParty[0], &gSaveBlock1Ptr->daycare.mons[0]); \
|
||||
StorePokemonInDaycare(&gPlayerParty[0], &gSaveBlock1Ptr->daycare.mons[1]); \
|
||||
RUN_OVERWORLD_SCRIPT( special GiveEggFromDaycare; );
|
||||
|
||||
TEST("(Daycare) Pokémon generate Eggs of the lowest member of the evolutionary family")
|
||||
{
|
||||
ASSUME(P_FAMILY_PIKACHU == TRUE);
|
||||
ASSUME(P_GEN_2_CROSS_EVOS == TRUE);
|
||||
|
||||
ZeroPlayerPartyMons();
|
||||
RUN_OVERWORLD_SCRIPT(
|
||||
givemon SPECIES_PIKACHU, 100, gender=MON_MALE;
|
||||
givemon SPECIES_PIKACHU, 100, gender=MON_FEMALE;
|
||||
);
|
||||
STORE_IN_DAYCARE_AND_GET_EGG();
|
||||
|
||||
EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), SPECIES_PICHU);
|
||||
}
|
||||
|
||||
TEST("(Daycare) Pokémon offspring species is based off the mother's species")
|
||||
{
|
||||
u32 offspring = 0;
|
||||
ASSUME(P_FAMILY_PIKACHU == TRUE);
|
||||
ASSUME(P_GEN_2_CROSS_EVOS == TRUE);
|
||||
ASSUME(P_FAMILY_RIOLU == TRUE);
|
||||
|
||||
ZeroPlayerPartyMons();
|
||||
PARAMETRIZE { offspring = SPECIES_RIOLU; RUN_OVERWORLD_SCRIPT(givemon SPECIES_PIKACHU, 100, gender=MON_MALE; givemon SPECIES_LUCARIO, 100, gender=MON_FEMALE, item=ITEM_NONE; ); }
|
||||
PARAMETRIZE { offspring = SPECIES_PICHU; RUN_OVERWORLD_SCRIPT(givemon SPECIES_PIKACHU, 100, gender=MON_FEMALE; givemon SPECIES_LUCARIO, 100, gender=MON_MALE;); }
|
||||
STORE_IN_DAYCARE_AND_GET_EGG();
|
||||
|
||||
EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), offspring);
|
||||
}
|
||||
|
||||
TEST("(Daycare) Pokémon can breed with Ditto if they don't belong to the Ditto or No Eggs Discovered group")
|
||||
{
|
||||
u32 j = 0;
|
||||
u32 parentSpecies = 0;
|
||||
|
||||
ZeroPlayerPartyMons();
|
||||
for (j = 1; j < NUM_SPECIES; j++)
|
||||
PARAMETRIZE { parentSpecies = j; }
|
||||
VarSet(VAR_TEMP_C, parentSpecies);
|
||||
RUN_OVERWORLD_SCRIPT(
|
||||
givemon SPECIES_DITTO, 100; givemon VAR_TEMP_C, 100;
|
||||
);
|
||||
STORE_IN_DAYCARE_AND_GET_EGG();
|
||||
|
||||
if (gSpeciesInfo[parentSpecies].eggGroups[0] != EGG_GROUP_NO_EGGS_DISCOVERED
|
||||
&& gSpeciesInfo[parentSpecies].eggGroups[0] != EGG_GROUP_DITTO)
|
||||
EXPECT_NE(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), SPECIES_NONE);
|
||||
else
|
||||
EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), SPECIES_NONE);
|
||||
}
|
||||
|
||||
TEST("(Daycare) Shellos' form is always based on the mother's form")
|
||||
{
|
||||
u32 offspring = 0;
|
||||
ASSUME(P_FAMILY_MEOWTH == TRUE);
|
||||
ASSUME(P_ALOLAN_FORMS == TRUE);
|
||||
ASSUME(P_GALARIAN_FORMS == TRUE);
|
||||
|
||||
ZeroPlayerPartyMons();
|
||||
PARAMETRIZE { offspring = SPECIES_SHELLOS_WEST; RUN_OVERWORLD_SCRIPT(givemon SPECIES_SHELLOS_EAST, 1, gender=MON_MALE; givemon SPECIES_SHELLOS_WEST, 1, gender=MON_FEMALE, item=ITEM_NONE; ); }
|
||||
PARAMETRIZE { offspring = SPECIES_SHELLOS_WEST; RUN_OVERWORLD_SCRIPT(givemon SPECIES_SHELLOS_EAST, 1, gender=MON_MALE, item=ITEM_EVERSTONE; givemon SPECIES_SHELLOS_WEST, 1, gender=MON_FEMALE, item=ITEM_NONE; ); }
|
||||
PARAMETRIZE { offspring = SPECIES_SHELLOS_WEST; RUN_OVERWORLD_SCRIPT(givemon SPECIES_SHELLOS_EAST, 1, gender=MON_MALE; givemon SPECIES_SHELLOS_WEST, 1, gender=MON_FEMALE, item=ITEM_EVERSTONE;); }
|
||||
PARAMETRIZE { offspring = SPECIES_SHELLOS_EAST; RUN_OVERWORLD_SCRIPT(givemon SPECIES_SHELLOS_WEST, 1, gender=MON_MALE; givemon SPECIES_SHELLOS_EAST, 1, gender=MON_FEMALE, item=ITEM_NONE; ); }
|
||||
PARAMETRIZE { offspring = SPECIES_SHELLOS_EAST; RUN_OVERWORLD_SCRIPT(givemon SPECIES_SHELLOS_WEST, 1, gender=MON_MALE, item=ITEM_EVERSTONE; givemon SPECIES_SHELLOS_EAST, 1, gender=MON_FEMALE, item=ITEM_NONE; ); }
|
||||
PARAMETRIZE { offspring = SPECIES_SHELLOS_EAST; RUN_OVERWORLD_SCRIPT(givemon SPECIES_SHELLOS_WEST, 1, gender=MON_MALE; givemon SPECIES_SHELLOS_EAST, 1, gender=MON_FEMALE, item=ITEM_EVERSTONE;); }
|
||||
STORE_IN_DAYCARE_AND_GET_EGG();
|
||||
|
||||
EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), offspring);
|
||||
}
|
||||
|
||||
TEST("(Daycare) Pokémon with regional forms give the correct offspring")
|
||||
{
|
||||
u32 region = 0, offspring = 0, species1 = 0, item1 = 0, species2 = 0, item2 = 0;
|
||||
|
||||
ZeroPlayerPartyMons();
|
||||
|
||||
region = GetCurrentRegion();
|
||||
if (region == REGION_ALOLA) {
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_ALOLA; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_ALOLA; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_ALOLA; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_ALOLA; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_ALOLA; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_ALOLA; species1=SPECIES_DIGLETT; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_DIGLETT; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_PERRSERKER; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_PERRSERKER; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_PERSIAN_ALOLA; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN; item2=ITEM_EVERSTONE; }
|
||||
} else if (region == REGION_GALAR) {
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_ALOLA; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_ALOLA; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_ALOLA; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_DIGLETT; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_DIGLETT; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_PERRSERKER; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN; item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_PERRSERKER; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN; item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_PERSIAN_ALOLA; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN; item2=ITEM_EVERSTONE; }
|
||||
} else {
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_ALOLA, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_ALOLA; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_ALOLA, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_MEOWTH; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_DIGLETT; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_DIGLETT; item1=ITEM_NONE; species2=SPECIES_MEOWTH_GALAR, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH_GALAR; species1=SPECIES_PERRSERKER; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_PERRSERKER; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_MEOWTH; species1=SPECIES_PERSIAN_ALOLA; item1=ITEM_EVERSTONE; species2=SPECIES_PERSIAN, item2=ITEM_EVERSTONE; }
|
||||
}
|
||||
|
||||
if (region == REGION_HISUI) {
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL_HISUI; species1=SPECIES_SNEASEL; item1=ITEM_NONE; species2=SPECIES_SNEASEL_HISUI, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL; species1=SPECIES_SNEASEL; item1=ITEM_EVERSTONE; species2=SPECIES_SNEASEL_HISUI, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL_HISUI; species1=SPECIES_SNEASEL; item1=ITEM_NONE; species2=SPECIES_SNEASEL_HISUI, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL; species1=SPECIES_SNEASLER; item1=ITEM_EVERSTONE; species2=SPECIES_WEAVILE, item2=ITEM_EVERSTONE; }
|
||||
} else {
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL; species1=SPECIES_SNEASEL; item1=ITEM_NONE; species2=SPECIES_SNEASEL_HISUI, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL; species1=SPECIES_SNEASEL; item1=ITEM_EVERSTONE; species2=SPECIES_SNEASEL_HISUI, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL_HISUI; species1=SPECIES_SNEASEL; item1=ITEM_NONE; species2=SPECIES_SNEASEL_HISUI, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_SNEASEL; species1=SPECIES_SNEASLER; item1=ITEM_EVERSTONE; species2=SPECIES_WEAVILE, item2=ITEM_EVERSTONE; }
|
||||
}
|
||||
|
||||
if (region == REGION_PALDEA) {
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER_PALDEA; species1=SPECIES_WOOPER; item1=ITEM_NONE; species2=SPECIES_WOOPER_PALDEA, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER; species1=SPECIES_WOOPER; item1=ITEM_EVERSTONE; species2=SPECIES_WOOPER_PALDEA, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER_PALDEA; species1=SPECIES_WOOPER; item1=ITEM_NONE; species2=SPECIES_WOOPER_PALDEA, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER; species1=SPECIES_CLODSIRE; item1=ITEM_EVERSTONE; species2=SPECIES_QUAGSIRE, item2=ITEM_EVERSTONE; }
|
||||
} else {
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER; species1=SPECIES_WOOPER; item1=ITEM_NONE; species2=SPECIES_WOOPER_PALDEA, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER; species1=SPECIES_WOOPER; item1=ITEM_EVERSTONE; species2=SPECIES_WOOPER_PALDEA, item2=ITEM_NONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER_PALDEA; species1=SPECIES_WOOPER; item1=ITEM_NONE; species2=SPECIES_WOOPER_PALDEA, item2=ITEM_EVERSTONE; }
|
||||
PARAMETRIZE { offspring=SPECIES_WOOPER; species1=SPECIES_CLODSIRE; item1=ITEM_EVERSTONE; species2=SPECIES_QUAGSIRE, item2=ITEM_EVERSTONE; }
|
||||
}
|
||||
ASSUME(IsSpeciesEnabled(species1) == TRUE);
|
||||
ASSUME(IsSpeciesEnabled(species2) == TRUE);
|
||||
ASSUME(IsSpeciesEnabled(offspring) == TRUE);
|
||||
|
||||
VarSet(VAR_0x8000, species1);
|
||||
VarSet(VAR_0x8001, item1);
|
||||
VarSet(VAR_0x8002, species2);
|
||||
VarSet(VAR_0x8003, item2);
|
||||
|
||||
RUN_OVERWORLD_SCRIPT(givemon VAR_0x8000, 1, gender=MON_MALE, item=VAR_0x8001;);
|
||||
RUN_OVERWORLD_SCRIPT(givemon VAR_0x8002, 1, gender=MON_FEMALE, item=VAR_0x8003;);
|
||||
|
||||
STORE_IN_DAYCARE_AND_GET_EGG();
|
||||
|
||||
EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_SPECIES), offspring);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user