Adds padding in AiLogicData (#5468)

* Adds padding in AiLogicData

* Update battle.h

* Update battle.h

* Update battle.h
This commit is contained in:
Alex 2024-10-04 04:11:54 +02:00 committed by GitHub
parent 80af2af9ad
commit 077bbd3442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -371,11 +371,12 @@ struct AiLogicData
u8 moveLimitations[MAX_BATTLERS_COUNT];
u8 shouldSwitchIfBadMoves; // Because all available moves have no/little effect. Each bit per battler.
u8 monToSwitchId[MAX_BATTLERS_COUNT]; // ID of the mon to switch.
bool8 weatherHasEffect; // The same as WEATHER_HAS_EFFECT. Stored here, so it's called only once.
u8 mostSuitableMonId[MAX_BATTLERS_COUNT]; // Stores result of GetMostSuitableMonToSwitchInto, which decides which generic mon the AI would switch into if they decide to switch. This can be overruled by specific mons found in ShouldSwitch; the final resulting mon is stored in AI_monToSwitchIntoId.
struct SwitchinCandidate switchinCandidate; // Struct used for deciding which mon to switch to in battle_ai_switch_items.c
bool8 ejectButtonSwitch; // Tracks whether current switch out was from Eject Button
bool8 ejectPackSwitch; // Tracks whether current switch out was from Eject Pack
u8 weatherHasEffect:1; // The same as WEATHER_HAS_EFFECT. Stored here, so it's called only once.
u8 ejectButtonSwitch:1; // Tracks whether current switch out was from Eject Button
u8 ejectPackSwitch:1; // Tracks whether current switch out was from Eject Pack
u8 padding:5;
u8 shouldSwitch; // Stores result of ShouldSwitch, which decides whether a mon should be switched out
};