mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-31 16:30:00 +01:00
use NATIVE_ARGS in various to callnative conversions
This commit is contained in:
parent
60710f823e
commit
6458cab70a
@ -16317,33 +16317,33 @@ static bool8 IsFinalStrikeEffect(u16 move)
|
||||
// 10 bytes long (callnative(5) + counter(1) + ptr(4))
|
||||
void BS_CheckParentalBondCounter(void)
|
||||
{
|
||||
NATIVE_ARGS(u8 counter, const u8 *jumpInstr);
|
||||
// Some effects should only happen on the first or second strike of Parental Bond,
|
||||
// so a way to check this in battle scripts is useful
|
||||
u8 counter = T1_READ_8(gBattlescriptCurrInstr + 5);
|
||||
if (gSpecialStatuses[gBattlerAttacker].parentalBondState == counter && gBattleMons[gBattlerTarget].hp != 0)
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 6);
|
||||
if (gSpecialStatuses[gBattlerAttacker].parentalBondState == cmd->counter && gBattleMons[gBattlerTarget].hp != 0)
|
||||
gBattlescriptCurrInstr = cmd->jumpInstr;
|
||||
else
|
||||
gBattlescriptCurrInstr += 10;
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
// 6 bytes long (callnative(5) + battler(1))
|
||||
void BS_GetBattlerSide(void)
|
||||
{
|
||||
gBattleCommunication[0] = GetBattlerSide(gBattlescriptCurrInstr[5]);
|
||||
gBattlescriptCurrInstr += 6;
|
||||
NATIVE_ARGS(u8 battler);
|
||||
gBattleCommunication[0] = GetBattlerSide(cmd->battler);
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
// 6 bytes long (callnative(5) + battler(1))
|
||||
void BS_CanTeleport(void)
|
||||
{
|
||||
u8 battler = gBattlescriptCurrInstr[5];
|
||||
gBattleCommunication[0] = CanTeleport(battler);
|
||||
gBattlescriptCurrInstr += 6;
|
||||
NATIVE_ARGS(u8 battler);
|
||||
gBattleCommunication[0] = CanTeleport(cmd->battler);
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
// 5 bytes long
|
||||
void BS_TrySymbiosis(void)
|
||||
{
|
||||
NATIVE_ARGS();
|
||||
//called by Bestow, Fling, and Bug Bite, which don't work with Cmd_removeitem.
|
||||
gActiveBattler = gBattlerAttacker;
|
||||
if (SYMBIOSIS_CHECK(gBattlerAttacker, BATTLE_PARTNER(gActiveBattler)))
|
||||
@ -16357,7 +16357,7 @@ void BS_TrySymbiosis(void)
|
||||
return;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr += 5;
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
void BS_SetZEffect(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user