mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
Hunger Switch and Aura Wheel
Implement the ability Hunger Switch and the move Aura Wheel.
This commit is contained in:
parent
11e93aee69
commit
6ce1f01b8c
@ -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
|
||||
|
@ -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
|
||||
|
@ -5221,6 +5221,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);
|
||||
|
@ -4562,6 +4562,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_AttackerFormChangeEnd3);
|
||||
}
|
||||
else if (gBattleMons[battler].species == SPECIES_MORPEKO_HANGRY)
|
||||
{
|
||||
gBattleMons[battler].species = SPECIES_MORPEKO;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_AttackerFormChangeEnd3);
|
||||
}
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -8969,6 +8985,7 @@ void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut)
|
||||
{SPECIES_WISHIWASHI_SCHOOL, SPECIES_WISHIWASHI},
|
||||
{SPECIES_CRAMORANT_GORGING, SPECIES_CRAMORANT},
|
||||
{SPECIES_CRAMORANT_GULPING, SPECIES_CRAMORANT},
|
||||
{SPECIES_MORPEKO_HANGRY, SPECIES_MORPEKO}
|
||||
};
|
||||
|
||||
if (isSwitchingOut) // Don't revert Mimikyu Busted or Ash-Greninja when switching out
|
||||
|
@ -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,
|
||||
|
@ -6848,7 +6848,7 @@ const struct BaseStats gBaseStats[] =
|
||||
.growthRate = GROWTH_MEDIUM_SLOW,
|
||||
.eggGroup1 = EGG_GROUP_BUG,
|
||||
.eggGroup2 = EGG_GROUP_BUG,
|
||||
.abilities = {ABILITY_STURDY, ABILITY_NONE},
|
||||
.abilities = {ABILITY_HUNGER_SWITCH, ABILITY_NONE},
|
||||
.safariZoneFleeRate = 0,
|
||||
.bodyColor = BODY_COLOR_YELLOW,
|
||||
.noFlip = FALSE,
|
||||
@ -7552,7 +7552,7 @@ const struct BaseStats gBaseStats[] =
|
||||
.growthRate = GROWTH_FAST,
|
||||
.eggGroup1 = EGG_GROUP_FIELD,
|
||||
.eggGroup2 = EGG_GROUP_FIELD,
|
||||
.abilities = {ABILITY_OWN_TEMPO, ABILITY_NONE},
|
||||
.abilities = {ABILITY_HUNGER_SWITCH, ABILITY_NONE},
|
||||
.safariZoneFleeRate = 0,
|
||||
.bodyColor = BODY_COLOR_WHITE,
|
||||
.noFlip = FALSE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user