diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 79c6b7f79..09de57530 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -392,10 +392,18 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectSparklySwirl @ EFFECT_SPARKLY_SWIRL .4byte BattleScript_EffectPlasmaFists @ EFFECT_PLASMA_FISTS .4byte BattleScript_EffectHyperspaceFury @ EFFECT_HYPERSPACE_FURY + .4byte BattleScript_EffectAuraWheel @ EFFECT_AURA_WHEEL + +BattleScript_EffectAuraWheel: @ Aura Wheel can only be used by Morpeko + jumpifspecies BS_ATTACKER, SPECIES_MORPEKO, BattleScript_EffectSpeedUpHit + jumpifspecies BS_ATTACKER, SPECIES_MORPEKO_HANGRY, BattleScript_EffectSpeedUpHit + printstring STRINGID_BUTPOKEMONCANTUSETHEMOVE + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd BattleScript_EffectHyperspaceFury: - jumpifspecies BS_ATTACKER, SPECIES_TREECKO, BattleScript_EffectHyperspaceFuryUnbound - jumpifspecies BS_ATTACKER, SPECIES_MUDKIP, BattleScript_ButHoopaCantUseIt + jumpifspecies BS_ATTACKER, SPECIES_HOOPA_UNBOUND, BattleScript_EffectHyperspaceFuryUnbound + jumpifspecies BS_ATTACKER, SPECIES_HOOPA, BattleScript_ButHoopaCantUseIt printstring STRINGID_BUTPOKEMONCANTUSETHEMOVE waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd @@ -6989,6 +6997,7 @@ BattleScript_AttackerFormChange:: call BattleScript_AbilityPopUp printstring STRINGID_EMPTYSTRING3 waitmessage 1 +BattleScript_AttackerFormChangeNoPopup:: handleformchange BS_ATTACKER, 0 handleformchange BS_ATTACKER, 1 playanimation BS_ATTACKER, B_ANIM_FORM_CHANGE, NULL @@ -7000,6 +7009,10 @@ BattleScript_AttackerFormChangeEnd3:: call BattleScript_AttackerFormChange end3 +BattleScript_AttackerFormChangeEnd3NoPopup:: + call BattleScript_AttackerFormChangeNoPopup + end3 + BattleScript_BallFetch:: call BattleScript_AbilityPopUp printstring STRINGID_FETCHEDPOKEBALL diff --git a/include/battle_scripts.h b/include/battle_scripts.h index dc1e046b6..c97a225e4 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -409,5 +409,6 @@ extern const u8 BattleScript_GooeyActivates[]; extern const u8 BattleScript_PastelVeilActivates[]; extern const u8 BattleScript_MimicryActivatesEnd3[]; extern const u8 BattleScript_ApplyMimicry[]; +extern const u8 BattleScript_AttackerFormChangeEnd3NoPopup[]; #endif // GUARD_BATTLE_SCRIPTS_H diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 41fee089d..defc44226 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -47,6 +47,10 @@ #define SPECIES_GRENINJA_ASH 10017 #define SPECIES_HOOPA 0 #define SPECIES_HOOPA_UNBOUND 10018 + #define SPECIES_MELOETTA 0 + #define SPECIES_MELOETTA_PIROUETTE 10019 + #define SPECIES_MORPEKO 0 + #define SPECIES_MORPEKO_HANGRY 10020 #endif // Items with peculiar battle effects. diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 62b49a191..7acb56c93 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -375,7 +375,8 @@ #define EFFECT_SPARKLY_SWIRL 369 #define EFFECT_PLASMA_FISTS 370 #define EFFECT_HYPERSPACE_FURY 371 +#define EFFECT_AURA_WHEEL 372 -#define NUM_BATTLE_MOVE_EFFECTS 372 +#define NUM_BATTLE_MOVE_EFFECTS 373 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/src/battle_main.c b/src/battle_main.c index 0e2afa3de..94eddbd73 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5229,6 +5229,10 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk) { gBattleStruct->dynamicMoveType = 0x80 | TYPE_ELECTRIC; } + else if (move == MOVE_AURA_WHEEL && gBattleMons[battlerAtk].species == SPECIES_MORPEKO_HANGRY) + { + gBattleStruct->dynamicMoveType = 0x80 | TYPE_DARK; + } // Check if a gem should activate. GET_MOVE_TYPE(move, moveType); diff --git a/src/battle_util.c b/src/battle_util.c index 5a9d47df9..15e61ebf5 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4635,6 +4635,22 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move effect++; } break; + case ABILITY_HUNGER_SWITCH: + if (!(gBattleMons[battler].status2 & STATUS2_TRANSFORMED)) + { + if (gBattleMons[battler].species == SPECIES_MORPEKO) + { + gBattleMons[battler].species = SPECIES_MORPEKO_HANGRY; + BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3NoPopup); + } + else if (gBattleMons[battler].species == SPECIES_MORPEKO_HANGRY) + { + gBattleMons[battler].species = SPECIES_MORPEKO; + BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3NoPopup); + } + effect++; + } + break; } } break; @@ -9046,6 +9062,7 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut) {SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI, TRUE}, {SPECIES_CRAMORANT_GORGING, SPECIES_CRAMORANT, TRUE}, {SPECIES_CRAMORANT_GULPING, SPECIES_CRAMORANT, TRUE}, + {SPECIES_MORPEKO_HANGRY, SPECIES_MORPEKO, TRUE}, }; currSpecies = GetMonData(&party[monId], MON_DATA_SPECIES, NULL); diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index f4ace3915..eba9383ef 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -11038,7 +11038,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] = [MOVE_AURA_WHEEL] = { - .effect = EFFECT_SPEED_UP_HIT, + .effect = EFFECT_AURA_WHEEL, .power = 110, .type = TYPE_ELECTRIC, .accuracy = 100,