mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
Merge pull request #1851 from BuffelSaft/hunger_switch2
Hunger Switch and Aura Wheel
This commit is contained in:
commit
dd91cbd08f
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user