diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 98ac1bfda76..ef08a0bd8c7 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -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:: diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 05eb64d15a7..095486d6768 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -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 diff --git a/include/pokemon.h b/include/pokemon.h index 14288ddee77..5312c5f2d4a 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -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); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 5c7be23e7d4..6037628b8af 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -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; } diff --git a/src/pokemon.c b/src/pokemon.c index 84e0688c6b0..db71a32f645 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -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); }