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

Fix Revival Blessing #5471

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -18025,10 +18025,12 @@ PopulationBombContinue:
waitforvisualfinish
end

gBattleAnimMove_RevivalBlessing::
goto gBattleAnimMove_LunarBlessing

gBattleAnimMove_TeraBlast::
gBattleAnimMove_OrderUp::
gBattleAnimMove_GlaiveRush::
gBattleAnimMove_RevivalBlessing::
gBattleAnimMove_SaltCure::
gBattleAnimMove_TripleDive::
gBattleAnimMove_Doodle::
Expand Down
3 changes: 3 additions & 0 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ BattleScript_EffectRevivalBlessing::
goto BattleScript_MoveEnd

BattleScript_EffectRevivalBlessingSendOut:
getswitchedmondata BS_SCRIPTING
switchindataupdate BS_SCRIPTING
hpthresholds BS_SCRIPTING
switchinanim BS_SCRIPTING, FALSE
waitstate
switchineffects BS_SCRIPTING
Expand Down
2 changes: 1 addition & 1 deletion include/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex);
void RemoveMonPPBonus(struct Pokemon *mon, u8 moveIndex);
void RemoveBattleMonPPBonus(struct BattlePokemon *mon, u8 moveIndex);
void PokemonToBattleMon(struct Pokemon *src, struct BattlePokemon *dst);
void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex);
void CopyPartyMonToBattleData(u8 battlerId, u8 partyIndex);
bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex);
bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, u8 e);
bool8 HealStatusConditions(struct Pokemon *mon, u32 healMask, u8 battlerId);
Expand Down
5 changes: 4 additions & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -17483,7 +17483,10 @@ void BS_TryRevivalBlessing(void)
if (IsDoubleBattle() &&
gBattlerPartyIndexes[BATTLE_PARTNER(gBattlerAttacker)] == gSelectedMonPartyId)
{
gBattleScripting.battler = BATTLE_PARTNER(gBattlerAttacker);
u32 i = BATTLE_PARTNER(gBattlerAttacker);
gAbsentBattlerFlags &= ~(1u << i);
gBattleStruct->monToSwitchIntoId[i] = gSelectedMonPartyId;
gBattleScripting.battler = i;
gBattleCommunication[MULTIUSE_STATE] = TRUE;
}

Expand Down
8 changes: 5 additions & 3 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3674,10 +3674,12 @@ void PokemonToBattleMon(struct Pokemon *src, struct BattlePokemon *dst)
dst->status2 = 0;
}

void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex)
void CopyPartyMonToBattleData(u8 battlerId, u8 partyIndex)
{
PokemonToBattleMon(&gPlayerParty[partyIndex], &gBattleMons[battlerId]);
gBattleStruct->hpOnSwitchout[GetBattlerSide(battlerId)] = gBattleMons[battlerId].hp;
u32 side = GetBattlerSide(battlerId);
struct Pokemon *party = GetSideParty(side);
PokemonToBattleMon(&party[partyIndex], &gBattleMons[battlerId]);
gBattleStruct->hpOnSwitchout[side] = gBattleMons[battlerId].hp;
UpdateSentPokesToOpponentValue(battlerId);
ClearTemporarySpeciesSpriteData(battlerId, FALSE);
}
Expand Down
Loading