31-03-25 Master merge

This commit is contained in:
AlexOn1ine
2025-03-31 18:23:46 +02:00
62 changed files with 1130 additions and 615 deletions

View File

@@ -130,10 +130,9 @@ struct DisableStruct
u8 boosterEnergyActivates:1;
u8 roostActive:1;
u8 unburdenActive:1;
u8 startEmergencyExit:1;
u8 neutralizingGas:1;
u8 iceFaceActivationPrevention:1; // fixes hit escape move edge case
u8 padding:2;
u8 padding:3;
};
// Fully Cleared each turn after end turn effects are done. A few things are cleared before end turn effects
@@ -809,9 +808,8 @@ struct BattleStruct
u32 stellarBoostFlags[NUM_BATTLE_SIDES]; // stored as a bitfield of flags for all types for each side
u8 monCausingSleepClause[NUM_BATTLE_SIDES]; // Stores which pokemon on a given side is causing Sleep Clause to be active as the mon's index in the party
u8 additionalEffectsCounter:4; // A counter for the additionalEffects applied by the current move in Cmd_setadditionaleffects
u8 redCardActivates:1;
u8 cheekPouchActivated:1;
u8 padding2:1; // padding in the middle so pursuit fields are together
u8 padding2:3;
u8 pursuitStoredSwitch; // Stored id for the Pursuit target's switch
s32 battlerExpReward;
u16 prevTurnSpecies[MAX_BATTLERS_COUNT]; // Stores species the AI has in play at start of turn

View File

@@ -384,9 +384,7 @@ extern const u8 BattleScript_FriskMsg[];
extern const u8 BattleScript_FriskMsgWithPopup[];
extern const u8 BattleScript_MoodyActivates[];
extern const u8 BattleScript_EmergencyExit[];
extern const u8 BattleScript_EmergencyExitNoPopUp[];
extern const u8 BattleScript_EmergencyExitWild[];
extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
extern const u8 BattleScript_CheekPouchActivates[];
extern const u8 BattleScript_TotemVar[];
extern const u8 BattleScript_TotemFlaredToLife[];

View File

@@ -209,6 +209,7 @@ bool32 AreAllMovesUnusable(u32 battler);
u8 GetImprisonedMovesCount(u32 battler, u16 move);
u8 DoFieldEndTurnEffects(void);
s32 GetDrainedBigRootHp(u32 battler, s32 hp);
bool32 IsMagicGuardProtected(u32 battler, u32 ability);
u8 DoBattlerEndTurnEffects(void);
bool32 HandleWishPerishSongOnTurnEnd(void);
bool32 HandleFaintedMonActions(void);
@@ -354,5 +355,7 @@ void ClearPursuitValuesIfSet(u32 battler);
void ClearPursuitValues(void);
bool32 HasWeatherEffect(void);
bool32 IsMovePowderBlocked(u32 battlerAtk, u32 battlerDef, u32 move);
bool32 EmergencyExitCanBeTriggered(u32 battler);
u32 RestoreWhiteHerbStats(u32 battler);
#endif // GUARD_BATTLE_UTIL_H

View File

@@ -274,7 +274,6 @@ enum MoveEndEffects
MOVEEND_SYMBIOSIS,
MOVEEND_HIT_SWITCH_TARGET,
MOVEEND_KINGSROCK, // These item effects will occur each strike of a multi-hit move
MOVEEND_NUM_HITS,
MOVEEND_SUBSTITUTE,
MOVEEND_SKY_DROP_CONFUSE,
MOVEEND_UPDATE_LAST_MOVES,
@@ -286,15 +285,16 @@ enum MoveEndEffects
MOVEEND_RAPID_SPIN,
MOVEEND_ITEM_EFFECTS_ATTACKER,
MOVEEND_MAGICIAN, // Occurs after final multi-hit strike, and after other items/abilities would activate
MOVEEND_SHEER_FORCE, // If move is Sheer Force affected, skip until opportunist
MOVEEND_SHEER_FORCE, // If move is Sheer Force affected, skip until Eject Pack
MOVEEND_RED_CARD, // Red Card triggers before Eject Pack
MOVEEND_EJECT_ITEMS,
MOVEEND_WHITE_HERB,
MOVEEND_EJECT_BUTTON,
MOVEEND_LIFEORB_SHELLBELL, // Includes shell bell, throat spray, etc
MOVEEND_CHANGED_ITEMS,
MOVEEND_PICKPOCKET,
MOVEEND_EMERGENCY_EXIT,
MOVEEND_EJECT_PACK,
MOVEEND_OPPORTUNIST, // Occurs after other stat change items/abilities to try and copy the boosts
MOVEEND_PICKPOCKET,
MOVEEND_WHITE_HERB,
MOVEEND_CHANGED_ITEMS,
MOVEEND_SAME_MOVE_TURNS,
MOVEEND_CLEAR_BITS,
MOVEEND_DANCER,

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CONSTANTS_EXPANSION_H
#define GUARD_CONSTANTS_EXPANSION_H
// Last version: 1.11.0
// Last version: 1.11.1
#define EXPANSION_VERSION_MAJOR 1
#define EXPANSION_VERSION_MINOR 12
#define EXPANSION_VERSION_PATCH 0

View File

@@ -11,6 +11,7 @@ enum GenConfigTag
GEN_CONFIG_MULTI_HIT_CHANCE,
GEN_CONFIG_GALE_WINGS,
GEN_CONFIG_HEAL_BELL_SOUNDPROOF,
GEN_CONFIG_TELEPORT_BEHAVIOR,
GEN_CONFIG_COUNT
};

View File

@@ -14,6 +14,7 @@ static const u8 sGenerationalChanges[GEN_CONFIG_COUNT] =
[GEN_CONFIG_MULTI_HIT_CHANCE] = B_MULTI_HIT_CHANCE,
[GEN_CONFIG_GALE_WINGS] = B_GALE_WINGS,
[GEN_CONFIG_HEAL_BELL_SOUNDPROOF] = B_HEAL_BELL_SOUNDPROOF,
[GEN_CONFIG_TELEPORT_BEHAVIOR] = B_TELEPORT_BEHAVIOR,
};
#if TESTING

View File

@@ -306,7 +306,7 @@ extern const u16 gPokedexSearchMenu_Pal[];
extern const u32 gBerryCheck_Gfx[];
extern const u32 gBerryCheck_Pal[];
extern const u32 gBerryTag_Gfx[];
extern const u32 gBerryTag_Pal[];
extern const u32 gBerryTag_Tilemap[];
// rayquaza scene gfx
extern const u32 gRaySceneDuoFight_Groudon_Gfx[];

View File

@@ -4,11 +4,11 @@
/* Check if VA_OPT_ is supported by the compiler. GCC's version should be at least 9.5*/
#define PP_THIRD_ARG(a,b,c,...) c
#define VA_OPT_SUPPORTED_I(...) PP_THIRD_ARG(__VA_OPT__(,),TRUE,FALSE,)
#define VA_OPT_SUPPORTED_I(...) PP_THIRD_ARG(__VA_OPT__(,),1,0,)
#define VA_OPT_SUPPORTED VA_OPT_SUPPORTED_I(?)
#if !VA_OPT_SUPPORTED
#error ERROR: VA_OPT__ is not supported. Please update your gcc compiler to version 10 or higher
#error ERROR: __VA_OPT__ is not supported. Please update your arm-none-eabi-gcc compiler to version 10 or higher
#endif // VA_OPT_SUPPORTED
/* Calls m0/m1/.../m8 depending on how many arguments are passed. */

View File

@@ -20,6 +20,7 @@ void TestRunner_Battle_CheckAiMoveScores(u32 battlerId);
void TestRunner_Battle_AISetScore(const char *file, u32 line, u32 battlerId, u32 moveIndex, s32 score);
void TestRunner_Battle_AIAdjustScore(const char *file, u32 line, u32 battlerId, u32 moveIndex, s32 score);
void TestRunner_Battle_InvalidNoHPMon(u32 battlerId, u32 partyIndex);
void TestRunner_CheckMemory(void);
void TestRunner_Battle_CheckBattleRecordActionType(u32 battlerId, u32 recordIndex, u32 actionType);