fixed more inheritance stuff and egg pokeball sprite

This commit is contained in:
cawtds
2024-06-02 14:36:23 +02:00
parent fef05a0c60
commit d6cd84d780
3 changed files with 11 additions and 19 deletions

View File

@@ -8263,32 +8263,32 @@
{
"min_level": 3,
"max_level": 3,
"species": "SPECIES_DEOXYS"
"species": "SPECIES_VULPIX"
},
{
"min_level": 3,
"max_level": 3,
"species": "SPECIES_DEOXYS"
"species": "SPECIES_VULPIX_ALOLAN"
},
{
"min_level": 3,
"max_level": 3,
"species": "SPECIES_DEOXYS"
"species": "SPECIES_VULPIX"
},
{
"min_level": 3,
"max_level": 3,
"species": "SPECIES_ORICORIO"
"species": "SPECIES_VULPIX_ALOLAN"
},
{
"min_level": 2,
"max_level": 2,
"species": "SPECIES_ORICORIO"
"species": "SPECIES_VULPIX"
},
{
"min_level": 2,
"max_level": 2,
"species": "SPECIES_ORICORIO"
"species": "SPECIES_VULPIX_ALOLAN"
},
{
"min_level": 3,

View File

@@ -900,7 +900,7 @@ static void InheritPokeball(struct Pokemon *egg, struct BoxPokemon *father, stru
if (P_BALL_INHERITING >= GEN_7)
{
if (fatherSpecies == motherSpecies)
if (GET_BASE_SPECIES_ID(fatherSpecies) == GET_BASE_SPECIES_ID(motherSpecies))
inheritBall = (Random() % 2 == 0 ? motherBall : fatherBall);
else if (motherSpecies != SPECIES_DITTO)
inheritBall = motherBall;
@@ -1143,7 +1143,7 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
u16 i;
u16 species[DAYCARE_MON_COUNT];
u16 eggSpecies, parentSpecies;
bool32 hasMotherEverstone, hasFatherEverstone;
bool8 hasMotherEverstone, hasFatherEverstone;
for (i = 0; i < DAYCARE_MON_COUNT; i++)
{
@@ -1165,10 +1165,10 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
if (hasMotherEverstone)
parentSpecies = species[parentSlots[0]];
else if (hasFatherEverstone && GET_BASE_SPECIES_ID(species[parentSlots[0]]) == GET_BASE_SPECIES_ID(species[parentSlots[1]]))
else if (hasFatherEverstone && GET_BASE_SPECIES_ID(GetEggSpecies(species[parentSlots[0]])) == GET_BASE_SPECIES_ID(GetEggSpecies(species[parentSlots[1]])))
parentSpecies = species[parentSlots[1]];
else
parentSpecies = GET_BASE_SPECIES_ID(species[parentSlots[0]]);
parentSpecies = GET_BASE_SPECIES_ID(GetEggSpecies(species[parentSlots[0]]));
eggSpecies = GetEggSpecies(parentSpecies);

View File

@@ -4259,17 +4259,9 @@ static void PokeSum_DestroyMonPicSprite(void)
static void CreateBallIconObj(void)
{
u16 ballItemId;
u8 ballId;
u8 ballId = ItemIdToBallId(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_POKEBALL));
if (!sMonSummaryScreen->isEgg)
ballItemId = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_POKEBALL);
else
ballItemId = 0;
ballId = ItemIdToBallId(ballItemId);
LoadBallGfx(ballId);
sMonSummaryScreen->ballIconSpriteId = CreateSprite(&gBallSpriteTemplates[ballId], 106, 88, 0);
gSprites[sMonSummaryScreen->ballIconSpriteId].callback = SpriteCallbackDummy;
gSprites[sMonSummaryScreen->ballIconSpriteId].oam.priority = 0;