Convert 3 variouses to callnatives (#5646)
This commit is contained in:
parent
57e771c8b8
commit
8581646c22
4 changed files with 69 additions and 71 deletions
|
@ -1744,6 +1744,19 @@
|
||||||
callnative BS_WaitFanfare
|
callnative BS_WaitFanfare
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro setbeakblast
|
||||||
|
callnative BS_SetBeakBlast
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro cantarshotwork failInstr:req
|
||||||
|
callnative BS_CanTarShotWork
|
||||||
|
.4byte \failInstr
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro removeterrain
|
||||||
|
callnative BS_RemoveTerrain
|
||||||
|
.endm
|
||||||
|
|
||||||
@ various command changed to more readable macros
|
@ various command changed to more readable macros
|
||||||
.macro cancelmultiturnmoves battler:req
|
.macro cancelmultiturnmoves battler:req
|
||||||
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
|
||||||
|
@ -2218,10 +2231,6 @@
|
||||||
.4byte \failInstr
|
.4byte \failInstr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro removeterrain
|
|
||||||
various BS_ATTACKER, VARIOUS_REMOVE_TERRAIN
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro trytoclearprimalweather
|
.macro trytoclearprimalweather
|
||||||
various BS_ATTACKER, VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER
|
various BS_ATTACKER, VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER
|
||||||
.endm
|
.endm
|
||||||
|
@ -2270,11 +2279,6 @@
|
||||||
.4byte \failInstr
|
.4byte \failInstr
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro cantarshotwork battler:req, failInstr:req
|
|
||||||
various \battler, VARIOUS_CAN_TAR_SHOT_WORK
|
|
||||||
.4byte \failInstr
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro checkpoltergeist battler:req, failInstr:req
|
.macro checkpoltergeist battler:req, failInstr:req
|
||||||
various \battler, VARIOUS_CHECK_POLTERGEIST
|
various \battler, VARIOUS_CHECK_POLTERGEIST
|
||||||
.4byte \failInstr
|
.4byte \failInstr
|
||||||
|
@ -2316,10 +2320,6 @@
|
||||||
various \battler, VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM
|
various \battler, VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro setbeakblast battler:req
|
|
||||||
various \battler, VARIOUS_SET_BEAK_BLAST
|
|
||||||
.endm
|
|
||||||
|
|
||||||
.macro swapsidestatuses
|
.macro swapsidestatuses
|
||||||
various BS_ATTACKER, VARIOUS_SWAP_SIDE_STATUSES
|
various BS_ATTACKER, VARIOUS_SWAP_SIDE_STATUSES
|
||||||
.endm
|
.endm
|
||||||
|
|
|
@ -670,7 +670,7 @@ BattleScript_EffectCourtChange::
|
||||||
goto BattleScript_MoveEnd
|
goto BattleScript_MoveEnd
|
||||||
|
|
||||||
BattleScript_BeakBlastSetUp::
|
BattleScript_BeakBlastSetUp::
|
||||||
setbeakblast BS_ATTACKER
|
setbeakblast
|
||||||
flushtextbox
|
flushtextbox
|
||||||
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
|
playanimation BS_ATTACKER, B_ANIM_BEAK_BLAST_SETUP, NULL
|
||||||
printstring STRINGID_HEATUPBEAK
|
printstring STRINGID_HEATUPBEAK
|
||||||
|
@ -891,7 +891,7 @@ BattleScript_EffectTarShot::
|
||||||
attackcanceler
|
attackcanceler
|
||||||
jumpifsubstituteblocks BattleScript_FailedFromAtkString
|
jumpifsubstituteblocks BattleScript_FailedFromAtkString
|
||||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||||
cantarshotwork BS_TARGET, BattleScript_FailedFromAtkString
|
cantarshotwork BattleScript_FailedFromAtkString
|
||||||
attackstring
|
attackstring
|
||||||
ppreduce
|
ppreduce
|
||||||
setstatchanger STAT_SPEED, 1, TRUE
|
setstatchanger STAT_SPEED, 1, TRUE
|
||||||
|
|
|
@ -192,39 +192,35 @@
|
||||||
#define VARIOUS_EERIE_SPELL_PP_REDUCE 100
|
#define VARIOUS_EERIE_SPELL_PP_REDUCE 100
|
||||||
#define VARIOUS_JUMP_IF_TEAM_HEALTHY 101
|
#define VARIOUS_JUMP_IF_TEAM_HEALTHY 101
|
||||||
#define VARIOUS_TRY_HEAL_QUARTER_HP 102
|
#define VARIOUS_TRY_HEAL_QUARTER_HP 102
|
||||||
#define VARIOUS_REMOVE_TERRAIN 103
|
#define VARIOUS_JUMP_IF_PRANKSTER_BLOCKED 103
|
||||||
#define VARIOUS_JUMP_IF_PRANKSTER_BLOCKED 104
|
#define VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER 104
|
||||||
#define VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER 105
|
#define VARIOUS_GET_ROTOTILLER_TARGETS 105
|
||||||
#define VARIOUS_GET_ROTOTILLER_TARGETS 106
|
#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 106
|
||||||
#define VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED 107
|
#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 107
|
||||||
#define VARIOUS_TRY_ACTIVATE_BATTLE_BOND 108
|
#define VARIOUS_CONSUME_BERRY 108
|
||||||
#define VARIOUS_CONSUME_BERRY 109
|
#define VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL 109
|
||||||
#define VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL 110
|
#define VARIOUS_JUMP_IF_SPECIES 110
|
||||||
#define VARIOUS_JUMP_IF_SPECIES 111
|
#define VARIOUS_UPDATE_ABILITY_POPUP 111
|
||||||
#define VARIOUS_UPDATE_ABILITY_POPUP 112
|
#define VARIOUS_JUMP_IF_WEATHER_AFFECTED 112
|
||||||
#define VARIOUS_JUMP_IF_WEATHER_AFFECTED 113
|
#define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 113
|
||||||
#define VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED 114
|
#define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 114
|
||||||
#define VARIOUS_SET_ATTACKER_STICKY_WEB_USER 115
|
#define VARIOUS_TRY_NO_RETREAT 115
|
||||||
#define VARIOUS_TRY_NO_RETREAT 116
|
#define VARIOUS_CHECK_POLTERGEIST 116
|
||||||
#define VARIOUS_TRY_TAR_SHOT 117
|
#define VARIOUS_CUT_1_3_HP_RAISE_STATS 117
|
||||||
#define VARIOUS_CAN_TAR_SHOT_WORK 118
|
#define VARIOUS_TRY_END_NEUTRALIZING_GAS 118
|
||||||
#define VARIOUS_CHECK_POLTERGEIST 119
|
#define VARIOUS_JUMP_IF_UNDER_200 119
|
||||||
#define VARIOUS_CUT_1_3_HP_RAISE_STATS 120
|
#define VARIOUS_SET_SKY_DROP 120
|
||||||
#define VARIOUS_TRY_END_NEUTRALIZING_GAS 121
|
#define VARIOUS_CLEAR_SKY_DROP 121
|
||||||
#define VARIOUS_JUMP_IF_UNDER_200 122
|
#define VARIOUS_SKY_DROP_YAWN 122
|
||||||
#define VARIOUS_SET_SKY_DROP 123
|
#define VARIOUS_CURE_CERTAIN_STATUSES 123
|
||||||
#define VARIOUS_CLEAR_SKY_DROP 124
|
#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 124
|
||||||
#define VARIOUS_SKY_DROP_YAWN 125
|
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 125
|
||||||
#define VARIOUS_CURE_CERTAIN_STATUSES 126
|
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 126
|
||||||
#define VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES 127
|
#define VARIOUS_SAVE_BATTLER_ITEM 127
|
||||||
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY 128
|
#define VARIOUS_RESTORE_BATTLER_ITEM 128
|
||||||
#define VARIOUS_JUMP_IF_LAST_USED_ITEM_HOLD_EFFECT 129
|
#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 129
|
||||||
#define VARIOUS_SAVE_BATTLER_ITEM 130
|
#define VARIOUS_SWAP_SIDE_STATUSES 130
|
||||||
#define VARIOUS_RESTORE_BATTLER_ITEM 131
|
#define VARIOUS_SWAP_STATS 131
|
||||||
#define VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM 132
|
|
||||||
#define VARIOUS_SET_BEAK_BLAST 133
|
|
||||||
#define VARIOUS_SWAP_SIDE_STATUSES 134
|
|
||||||
#define VARIOUS_SWAP_STATS 135
|
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
#define DMG_CHANGE_SIGN 0
|
#define DMG_CHANGE_SIGN 0
|
||||||
|
|
|
@ -10524,12 +10524,6 @@ static void Cmd_various(void)
|
||||||
gBattlescriptCurrInstr = cmd->nextInstr; // can heal
|
gBattlescriptCurrInstr = cmd->nextInstr; // can heal
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case VARIOUS_REMOVE_TERRAIN:
|
|
||||||
{
|
|
||||||
VARIOUS_ARGS();
|
|
||||||
RemoveAllTerrains();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case VARIOUS_JUMP_IF_UNDER_200:
|
case VARIOUS_JUMP_IF_UNDER_200:
|
||||||
{
|
{
|
||||||
VARIOUS_ARGS(const u8 *jumpInstr);
|
VARIOUS_ARGS(const u8 *jumpInstr);
|
||||||
|
@ -10847,17 +10841,6 @@ static void Cmd_various(void)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case VARIOUS_CAN_TAR_SHOT_WORK:
|
|
||||||
{
|
|
||||||
VARIOUS_ARGS(const u8 *failInstr);
|
|
||||||
// Tar Shot will fail if it's already been used on the target and its speed can't be lowered further
|
|
||||||
if (!gDisableStructs[battler].tarShot
|
|
||||||
&& CompareStat(battler, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN))
|
|
||||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
|
||||||
else
|
|
||||||
gBattlescriptCurrInstr = cmd->failInstr;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
case VARIOUS_CURE_CERTAIN_STATUSES:
|
case VARIOUS_CURE_CERTAIN_STATUSES:
|
||||||
{
|
{
|
||||||
VARIOUS_ARGS();
|
VARIOUS_ARGS();
|
||||||
|
@ -10950,12 +10933,6 @@ static void Cmd_various(void)
|
||||||
gBattleMons[battler].item = gLastUsedItem;
|
gBattleMons[battler].item = gLastUsedItem;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VARIOUS_SET_BEAK_BLAST:
|
|
||||||
{
|
|
||||||
VARIOUS_ARGS();
|
|
||||||
gProtectStructs[battler].beakBlastCharge = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case VARIOUS_SWAP_SIDE_STATUSES:
|
case VARIOUS_SWAP_SIDE_STATUSES:
|
||||||
{
|
{
|
||||||
VARIOUS_ARGS();
|
VARIOUS_ARGS();
|
||||||
|
@ -17311,6 +17288,17 @@ void BS_TryTarShot(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BS_CanTarShotWork(void)
|
||||||
|
{
|
||||||
|
NATIVE_ARGS(const u8 *failInstr);
|
||||||
|
// Tar Shot will fail if it's already been used on the target and its speed can't be lowered further
|
||||||
|
if (!gDisableStructs[gBattlerTarget].tarShot
|
||||||
|
&& CompareStat(gBattlerTarget, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||||
|
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||||
|
else
|
||||||
|
gBattlescriptCurrInstr = cmd->failInstr;
|
||||||
|
}
|
||||||
|
|
||||||
void BS_JumpIfBlockedBySoundproof(void)
|
void BS_JumpIfBlockedBySoundproof(void)
|
||||||
{
|
{
|
||||||
NATIVE_ARGS(u8 battler, const u8 *jumpInstr);
|
NATIVE_ARGS(u8 battler, const u8 *jumpInstr);
|
||||||
|
@ -17547,3 +17535,17 @@ void BS_WaitFanfare(void)
|
||||||
|
|
||||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BS_SetBeakBlast(void)
|
||||||
|
{
|
||||||
|
NATIVE_ARGS();
|
||||||
|
gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE;
|
||||||
|
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BS_RemoveTerrain(void)
|
||||||
|
{
|
||||||
|
NATIVE_ARGS();
|
||||||
|
RemoveAllTerrains();
|
||||||
|
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue