From cef9dfe22c3760f6d61b896330009367a313ef0f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 25 Aug 2019 13:08:58 +0200 Subject: [PATCH] Make room for hidden abilities --- include/pokemon.h | 7 +++---- src/battle_controller_link_opponent.c | 1 - src/battle_controller_link_partner.c | 1 - src/battle_controller_opponent.c | 1 - src/battle_controller_player.c | 1 - src/battle_controller_player_partner.c | 1 - src/battle_controller_recorded_opponent.c | 1 - src/battle_controller_recorded_player.c | 1 - src/battle_controller_wally.c | 1 - src/pokemon.c | 1 - 10 files changed, 3 insertions(+), 13 deletions(-) diff --git a/include/pokemon.h b/include/pokemon.h index ec125573c..dd957f932 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -182,7 +182,6 @@ struct PokemonSubstruct3 /* 0x05 */ u32 spAttackIV:5; /* 0x06 */ u32 spDefenseIV:5; /* 0x07 */ u32 isEgg:1; - /* 0x07 */ u32 abilityNum:1; /* 0x08 */ u32 coolRibbon:3; /* 0x08 */ u32 beautyRibbon:3; @@ -201,7 +200,8 @@ struct PokemonSubstruct3 /* 0x0B */ u32 giftRibbon5:1; /* 0x0B */ u32 giftRibbon6:1; /* 0x0B */ u32 giftRibbon7:1; - /* 0x0B */ u32 fatefulEncounter:4; + /* 0x0B */ u32 fatefulEncounter:2; + /* 0x0B */ u32 abilityNum:2; /* 0x0B */ u32 obedient:1; }; @@ -280,8 +280,7 @@ struct BattlePokemon /*0x15*/ u32 speedIV:5; /*0x16*/ u32 spAttackIV:5; /*0x17*/ u32 spDefenseIV:5; - /*0x17*/ u32 isEgg:1; - /*0x17*/ u32 abilityNum:1; + /*0x17*/ u32 abilityNum:2; /*0x18*/ s8 statStages[NUM_BATTLE_STATS]; /*0x20*/ u8 ability; /*0x21*/ u8 type1; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index d3842e416..c6c733326 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -601,7 +601,6 @@ static u32 CopyLinkOpponentMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gEnemyParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 1c92aaaad..1ccb570e4 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -486,7 +486,6 @@ static u32 CopyLinkPartnerMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index e096536c9..d77a32828 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -584,7 +584,6 @@ static u32 GetOpponentMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gEnemyParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index b73bfc36f..fc7b0a76d 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1627,7 +1627,6 @@ static u32 CopyPlayerMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/battle_controller_player_partner.c b/src/battle_controller_player_partner.c index e625f24de..c04e7b7fc 100644 --- a/src/battle_controller_player_partner.c +++ b/src/battle_controller_player_partner.c @@ -671,7 +671,6 @@ static u32 CopyPlayerPartnerMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/battle_controller_recorded_opponent.c b/src/battle_controller_recorded_opponent.c index b21d8288c..1f5fb4678 100644 --- a/src/battle_controller_recorded_opponent.c +++ b/src/battle_controller_recorded_opponent.c @@ -583,7 +583,6 @@ static u32 CopyRecordedOpponentMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gEnemyParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gEnemyParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gEnemyParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gEnemyParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gEnemyParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gEnemyParty[monId], MON_DATA_OT_ID); GetMonData(&gEnemyParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/battle_controller_recorded_player.c b/src/battle_controller_recorded_player.c index b59a4f25d..1ef75d1eb 100644 --- a/src/battle_controller_recorded_player.c +++ b/src/battle_controller_recorded_player.c @@ -566,7 +566,6 @@ static u32 CopyRecordedPlayerMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index f7035540b..a90b81fbf 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -484,7 +484,6 @@ static u32 CopyWallyMonData(u8 monId, u8 *dst) battleMon.speed = GetMonData(&gPlayerParty[monId], MON_DATA_SPEED); battleMon.spAttack = GetMonData(&gPlayerParty[monId], MON_DATA_SPATK); battleMon.spDefense = GetMonData(&gPlayerParty[monId], MON_DATA_SPDEF); - battleMon.isEgg = GetMonData(&gPlayerParty[monId], MON_DATA_IS_EGG); battleMon.abilityNum = GetMonData(&gPlayerParty[monId], MON_DATA_ABILITY_NUM); battleMon.otId = GetMonData(&gPlayerParty[monId], MON_DATA_OT_ID); GetMonData(&gPlayerParty[monId], MON_DATA_NICKNAME, nickname); diff --git a/src/pokemon.c b/src/pokemon.c index df31bc6b3..81418b775 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4580,7 +4580,6 @@ void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].speed = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPEED, NULL); gBattleMons[battlerId].spAttack = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPATK, NULL); gBattleMons[battlerId].spDefense = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPDEF, NULL); - gBattleMons[battlerId].isEgg = GetMonData(&gPlayerParty[partyIndex], MON_DATA_IS_EGG, NULL); gBattleMons[battlerId].abilityNum = GetMonData(&gPlayerParty[partyIndex], MON_DATA_ABILITY_NUM, NULL); gBattleMons[battlerId].otId = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_ID, NULL); gBattleMons[battlerId].type1 = gBaseStats[gBattleMons[battlerId].species].type1;