Added Dynamax/Gigantamax battle messages (#6440)

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
This commit is contained in:
wiz1989 2025-03-17 19:16:43 +01:00 committed by GitHub
parent 816ed0d963
commit 1e2aa18ffe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 45 additions and 1 deletions

View File

@ -1817,6 +1817,12 @@
.4byte \failInstr
.endm
.macro jumpifcangigantamax battler:req, jumpInstr:req
callnative BS_JumpIfCanGigantamax
.byte \battler
.4byte \jumpInstr
.endm
@ various command changed to more readable macros
.macro cancelmultiturnmoves battler:req
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES

View File

@ -10006,6 +10006,14 @@ BattleScript_EffectSteelsurge::
BattleScript_DynamaxBegins::
flushtextbox
trytrainerslidedynamaxmsg
jumpifcangigantamax BS_ATTACKER, BattleScript_DynamaxBegins_GigantamaxString_01
printstring STRINGID_TIMETODYNAMAX
waitmessage B_WAIT_TIME_MED
goto BattleScript_DynamaxBegins_SwitchIn
BattleScript_DynamaxBegins_GigantamaxString_01:
printstring STRINGID_TIMETOGIGANTAMAX
waitmessage B_WAIT_TIME_MED
BattleScript_DynamaxBegins_SwitchIn:
returnatktoball
pause B_WAIT_TIME_SHORT
returntoball BS_SCRIPTING, TRUE
@ -10013,6 +10021,15 @@ BattleScript_DynamaxBegins::
updatedynamax
playanimation BS_SCRIPTING, B_ANIM_DYNAMAX_GROWTH
waitanimation
jumpifbyteequal B_SHOW_DYNAMAX_MESSAGE, FALSE, BattleScript_DynamaxBegins_End3
jumpifcangigantamax BS_ATTACKER, BattleScript_DynamaxBegins_GigantamaxString_02
printstring STRINGID_PKMNDYNAMAXED
waitmessage B_WAIT_TIME_LONG
goto BattleScript_DynamaxBegins_End3
BattleScript_DynamaxBegins_GigantamaxString_02:
printstring STRINGID_PKMNGIGANTAMAXED
waitmessage B_WAIT_TIME_LONG
BattleScript_DynamaxBegins_End3:
end3
BattleScript_DynamaxEnds::

View File

@ -255,6 +255,7 @@
#define B_QUICK_MOVE_CURSOR_TO_RUN FALSE // If set to TRUE, pushing B in the battle options against a wild encounter will move the cursor to the run option
#define B_MOVE_DESCRIPTION_BUTTON L_BUTTON // If set to a button other than B_LAST_USED_BALL_BUTTON, pressing this button will open the move description menu
#define B_SHOW_USELESS_Z_MOVE_INFO FALSE // If set to TRUE, Z-moves without additional effects like newer gen status moves will say "no additional effect"
#define B_SHOW_DYNAMAX_MESSAGE FALSE // If set to TRUE, an additional battle message is shown after completing Dynamaxing/Gigantamaxing.
// Catching settings
#define B_SEMI_INVULNERABLE_CATCH GEN_LATEST // In Gen4+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)

View File

@ -729,8 +729,12 @@
#define STRINGID_ITDOESNTAFFECTTWOFOES 727
#define STRINGID_SENDCAUGHTMONPARTYORBOX 728
#define STRINGID_PKMNSENTTOPCAFTERCATCH 729
#define STRINGID_PKMNDYNAMAXED 730
#define STRINGID_PKMNGIGANTAMAXED 731
#define STRINGID_TIMETODYNAMAX 732
#define STRINGID_TIMETOGIGANTAMAX 733
#define BATTLESTRINGS_COUNT 730
#define BATTLESTRINGS_COUNT 734
// This is the string id that gBattleStringsTable starts with.
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,

View File

@ -893,6 +893,10 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
[STRINGID_ITDOESNTAFFECTTWOFOES] = COMPOUND_STRING("It doesn't affect {B_DEF_NAME_WITH_PREFIX2} and {B_DEF_PARTNER_NAME}…"),
[STRINGID_SENDCAUGHTMONPARTYORBOX] = COMPOUND_STRING("Add {B_DEF_NAME} to your party?"),
[STRINGID_PKMNSENTTOPCAFTERCATCH] = gText_PkmnSentToPCAfterCatch,
[STRINGID_PKMNDYNAMAXED] = COMPOUND_STRING("{B_ATK_NAME_WITH_PREFIX} grew huge\ninto its Dynamax form!"),
[STRINGID_PKMNGIGANTAMAXED] = COMPOUND_STRING("{B_ATK_NAME_WITH_PREFIX} grew huge\ninto its Gigantamax form!"),
[STRINGID_TIMETODYNAMAX] = COMPOUND_STRING("Time to Dynamax!"),
[STRINGID_TIMETOGIGANTAMAX] = COMPOUND_STRING("Time to Gigantamax!"),
};
const u16 gTrainerUsedItemStringIds[] =

View File

@ -18659,3 +18659,15 @@ void BS_RestoreSavedMove(void)
gBattlescriptCurrInstr = cmd->nextInstr;
}
void BS_JumpIfCanGigantamax(void)
{
NATIVE_ARGS(u8 battler, const u8 *jumpInstr);
u32 battler = GetBattlerForBattleScript(cmd->battler);
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_GIGANTAMAX_FACTOR)
&& GetGMaxTargetSpecies(gBattleMons[battler].species) != SPECIES_NONE)
gBattlescriptCurrInstr = cmd->jumpInstr;
else
gBattlescriptCurrInstr = cmd->nextInstr;
}