Quick syntax tweaks

This commit is contained in:
LOuroboros 2021-10-27 11:19:39 -03:00
parent de157919b0
commit 8c35a68060
3 changed files with 10 additions and 11 deletions

View File

@ -1731,14 +1731,6 @@
.4byte \ptr
.endm
.macro photongeysercheck
various BS_ATTACKER, VARIOUS_PHOTON_GEYSER_CHECK
.endm
.macro shellsidearmcheck
various BS_ATTACKER, VARIOUS_SHELL_SIDE_ARM_CHECK
.endm
.macro trysetfairylock ptr:req
various BS_ATTACKER, VARIOUS_TRY_FAIRY_LOCK
.4byte \ptr
@ -1866,6 +1858,14 @@
various BS_ATTACKER, VARIOUS_APPLY_PLASMA_FISTS
.endm
.macro photongeysercheck
various BS_ATTACKER, VARIOUS_PHOTON_GEYSER_CHECK
.endm
.macro shellsidearmcheck
various BS_ATTACKER, VARIOUS_SHELL_SIDE_ARM_CHECK
.endm
@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7

View File

@ -918,7 +918,6 @@ extern u8 gBattleControllerData[MAX_BATTLERS_COUNT];
extern bool8 gHasFetchedBall;
extern u8 gLastUsedBall;
extern u16 gLastThrownBall;
extern bool8 gSwapDamageCategory; // Photon Geyser, Shell Side Arm, Light That Burns the Sky
#endif // GUARD_BATTLE_H

View File

@ -7271,7 +7271,7 @@ bool32 IsMoveMakingContact(u16 move, u8 battlerAtk)
{
if (!(gBattleMoves[move].flags & FLAG_MAKES_CONTACT))
{
if (gBattleMoves[move].effect == EFFECT_SHELL_SIDE_ARM && gSwapDamageCategory == TRUE)
if (gBattleMoves[move].effect == EFFECT_SHELL_SIDE_ARM && gSwapDamageCategory)
return TRUE;
else
return FALSE;
@ -9077,7 +9077,7 @@ bool8 ShouldGetStatBadgeBoost(u16 badgeFlag, u8 battlerId)
u8 GetBattleMoveSplit(u32 moveId)
{
if (gSwapDamageCategory == TRUE) // Photon Geyser, Shell Side Arm, Light That Burns the Sky
if (gSwapDamageCategory) // Photon Geyser, Shell Side Arm, Light That Burns the Sky
return SPLIT_PHYSICAL;
else if (IS_MOVE_STATUS(moveId) || B_PHYSICAL_SPECIAL_SPLIT >= GEN_4)
return gBattleMoves[moveId].split;