fixed revive in 1v2 battles

This commit is contained in:
AgustinGDLV 2023-05-23 14:19:24 -07:00
parent 0ac203f2e5
commit 34382fcece
3 changed files with 17 additions and 6 deletions

View File

@ -59,9 +59,9 @@ BattleScript_ItemRestoreHP::
end end
BattleScript_ItemRestoreHP_SendOutRevivedBattler: BattleScript_ItemRestoreHP_SendOutRevivedBattler:
switchinanim BS_ATTACKER, FALSE switchinanim BS_SCRIPTING, FALSE
waitstate waitstate
switchineffects BS_ATTACKER switchineffects BS_SCRIPTING
end end
BattleScript_ItemCureStatus:: BattleScript_ItemCureStatus::

View File

@ -68,6 +68,12 @@ Debug_FlagsNotSetBattleConfigMessage_Text:
.string "'include/config/battle.h'!$" .string "'include/config/battle.h'!$"
Debug_Script_1:: Debug_Script_1::
givemon SPECIES_TREECKO, 20, ITEM_NONE
givemon SPECIES_TORCHIC, 20, ITEM_NONE
giveitem ITEM_REVIVE, 3
giveitem ITEM_HYPER_POTION, 3
setwildbattle SPECIES_UNOWN, 20, 0, SPECIES_UNOWN, 20, 0
dowildbattle
end end
Debug_Script_2:: Debug_Script_2::

View File

@ -16444,7 +16444,8 @@ u8 GetFirstFaintedPartyIndex(u8 battlerId)
return PARTY_SIZE; return PARTY_SIZE;
} }
void BS_ItemRestoreHP(void) { void BS_ItemRestoreHP(void)
{
NATIVE_ARGS(); NATIVE_ARGS();
u16 healAmount; u16 healAmount;
u32 battlerId = MAX_BATTLERS_COUNT; u32 battlerId = MAX_BATTLERS_COUNT;
@ -16499,6 +16500,7 @@ void BS_ItemRestoreHP(void) {
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && battlerId != MAX_BATTLERS_COUNT) if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && battlerId != MAX_BATTLERS_COUNT)
{ {
gAbsentBattlerFlags &= ~gBitTable[battlerId]; gAbsentBattlerFlags &= ~gBitTable[battlerId];
gBattleScripting.battler = battlerId;
gBattleCommunication[MULTIUSE_STATE] = TRUE; gBattleCommunication[MULTIUSE_STATE] = TRUE;
} }
} }
@ -16506,7 +16508,8 @@ void BS_ItemRestoreHP(void) {
gBattlescriptCurrInstr = cmd->nextInstr; gBattlescriptCurrInstr = cmd->nextInstr;
} }
void BS_ItemCureStatus(void) { void BS_ItemCureStatus(void)
{
NATIVE_ARGS(); NATIVE_ARGS();
struct Pokemon *party = GetBattlerParty(gBattlerAttacker); struct Pokemon *party = GetBattlerParty(gBattlerAttacker);
@ -16534,7 +16537,8 @@ void BS_ItemCureStatus(void) {
gBattlescriptCurrInstr = cmd->nextInstr; gBattlescriptCurrInstr = cmd->nextInstr;
} }
void BS_ItemIncreaseStat(void) { void BS_ItemIncreaseStat(void)
{
NATIVE_ARGS(); NATIVE_ARGS();
u16 statId = GetItemEffect(gLastUsedItem)[1]; u16 statId = GetItemEffect(gLastUsedItem)[1];
u16 stages = ItemId_GetHoldEffectParam(gLastUsedItem); u16 stages = ItemId_GetHoldEffectParam(gLastUsedItem);
@ -16542,7 +16546,8 @@ void BS_ItemIncreaseStat(void) {
gBattlescriptCurrInstr = cmd->nextInstr; gBattlescriptCurrInstr = cmd->nextInstr;
} }
void BS_ItemRestorePP(void) { void BS_ItemRestorePP(void)
{
NATIVE_ARGS(); NATIVE_ARGS();
const u8 *effect = GetItemEffect(gLastUsedItem); const u8 *effect = GetItemEffect(gLastUsedItem);
u32 i, pp, maxPP, moveId, loopEnd; u32 i, pp, maxPP, moveId, loopEnd;