Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opponents Shaymin Sky form correctly reverts on frozen status #4559

Merged
merged 4 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -6993,17 +6993,21 @@ BattleScript_CudChewActivates::
setbyte sBERRY_OVERRIDE, 0
end3

BattleScript_ApplyDisguiseFormChangeHPLoss::
.if B_DISGUISE_HP_LOSS >= GEN_8
healthbarupdate BS_SCRIPTING
datahpupdate BS_SCRIPTING
.endif
return

BattleScript_TargetFormChangeNoPopup:
flushtextbox
handleformchange BS_SCRIPTING, 0
handleformchange BS_SCRIPTING, 1
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
waitanimation
handleformchange BS_SCRIPTING, 2
.if B_DISGUISE_HP_LOSS >= GEN_8
healthbarupdate BS_SCRIPTING
datahpupdate BS_SCRIPTING
.endif
jumpifability BS_TARGET ABILITY_DISGUISE BattleScript_ApplyDisguiseFormChangeHPLoss
Bassoonian marked this conversation as resolved.
Show resolved Hide resolved
return

BattleScript_TargetFormChange::
Expand Down
2 changes: 1 addition & 1 deletion src/data/pokemon/form_change_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ static const struct FormChange sShayminFormChangeTable[] = {
{FORM_CHANGE_ITEM_USE, SPECIES_SHAYMIN_SKY, ITEM_GRACIDEA, DAY},
{FORM_CHANGE_WITHDRAW, SPECIES_SHAYMIN_LAND},
{FORM_CHANGE_TIME_OF_DAY, SPECIES_SHAYMIN_LAND, NIGHT},
{FORM_CHANGE_STATUS, SPECIES_SHAYMIN_LAND, (STATUS1_FREEZE | STATUS1_FROSTBITE)},
{FORM_CHANGE_STATUS, SPECIES_SHAYMIN_LAND, STATUS1_FREEZE | STATUS1_FROSTBITE},
{FORM_CHANGE_TERMINATOR},
};
#endif //P_FAMILY_SHAYMIN
Expand Down
5 changes: 4 additions & 1 deletion src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -6230,9 +6230,12 @@ u16 GetFormChangeTargetSpeciesBoxMon(struct BoxPokemon *boxMon, u16 method, u32
break;
case FORM_CHANGE_WITHDRAW:
case FORM_CHANGE_FAINT:
case FORM_CHANGE_STATUS:
targetSpecies = formChanges[i].targetSpecies;
break;
case FORM_CHANGE_STATUS:
if(GetBoxMonData(boxMon, MON_DATA_STATUS, NULL) & formChanges[i].param1)
Bassoonian marked this conversation as resolved.
Show resolved Hide resolved
targetSpecies = formChanges[i].targetSpecies;
break;
case FORM_CHANGE_TIME_OF_DAY:
switch (formChanges[i].param1)
{
Expand Down
Loading