Fixes Aegislash not reverting back (#5734)
This commit is contained in:
parent
c4fe97011e
commit
0f4b598984
4 changed files with 15 additions and 6 deletions
|
@ -134,4 +134,8 @@
|
|||
// param1: amount of days
|
||||
#define FORM_CHANGE_DAYS_PASSED 23
|
||||
|
||||
// Form change for Aegislash
|
||||
#define FORM_CHANGE_BATTLE_ATTACK 24
|
||||
#define FORM_CHANGE_BATTLE_KINGS_SHIELD 25
|
||||
|
||||
#endif // GUARD_CONSTANTS_FORM_CHANGE_TYPES_H
|
||||
|
|
|
@ -1127,7 +1127,6 @@ static bool32 NoTargetPresent(u8 battler, u32 move)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// TODO: Convert this to a proper FORM_CHANGE type.
|
||||
static bool32 TryAegiFormChange(void)
|
||||
{
|
||||
// Only Aegislash with Stance Change can transform, transformed mons cannot.
|
||||
|
@ -1142,12 +1141,12 @@ static bool32 TryAegiFormChange(void)
|
|||
case SPECIES_AEGISLASH_SHIELD: // Shield -> Blade
|
||||
if (IS_MOVE_STATUS(gCurrentMove))
|
||||
return FALSE;
|
||||
gBattleMons[gBattlerAttacker].species = SPECIES_AEGISLASH_BLADE;
|
||||
TryBattleFormChange(gBattlerAttacker, FORM_CHANGE_BATTLE_ATTACK);
|
||||
break;
|
||||
case SPECIES_AEGISLASH_BLADE: // Blade -> Shield
|
||||
if (gCurrentMove != MOVE_KINGS_SHIELD)
|
||||
return FALSE;
|
||||
gBattleMons[gBattlerAttacker].species = SPECIES_AEGISLASH_SHIELD;
|
||||
TryBattleFormChange(gBattlerAttacker, FORM_CHANGE_BATTLE_KINGS_SHIELD);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -10848,6 +10848,10 @@ u16 GetBattleFormChangeTargetSpecies(u32 battler, u16 method)
|
|||
if (GetBattlerTeraType(battler) == formChanges[i].param1)
|
||||
targetSpecies = formChanges[i].targetSpecies;
|
||||
break;
|
||||
case FORM_CHANGE_BATTLE_ATTACK:
|
||||
case FORM_CHANGE_BATTLE_KINGS_SHIELD:
|
||||
targetSpecies = formChanges[i].targetSpecies;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -789,6 +789,8 @@ static const struct FormChange sFurfrouFormChangeTable[] = {
|
|||
|
||||
#if P_FAMILY_HONEDGE
|
||||
static const struct FormChange sAegislashFormChangeTable[] = {
|
||||
{FORM_CHANGE_BATTLE_ATTACK, SPECIES_AEGISLASH_BLADE},
|
||||
{FORM_CHANGE_BATTLE_KINGS_SHIELD, SPECIES_AEGISLASH_SHIELD},
|
||||
{FORM_CHANGE_BATTLE_SWITCH, SPECIES_AEGISLASH_SHIELD},
|
||||
{FORM_CHANGE_FAINT, SPECIES_AEGISLASH_SHIELD},
|
||||
{FORM_CHANGE_END_BATTLE, SPECIES_AEGISLASH_SHIELD},
|
||||
|
|
Loading…
Reference in a new issue