Minor Gem check optimazation (#5401)
Since the variable is only used once I removed it and replaced it with a direct call. Also the if statement is short enough to fit into one line. very ocd induced change but I couldn't look away.
This commit is contained in:
parent
25e9ca2ac6
commit
5cb1be7e5c
1 changed files with 1 additions and 3 deletions
|
@ -6010,9 +6010,7 @@ void SetTypeBeforeUsingMove(u32 move, u32 battler)
|
|||
gBattleStruct->dynamicMoveType = TYPE_ELECTRIC | F_DYNAMIC_TYPE_SET;
|
||||
|
||||
// Check if a gem should activate.
|
||||
moveType = GetMoveType(move);
|
||||
if (holdEffect == HOLD_EFFECT_GEMS
|
||||
&& moveType == ItemId_GetSecondaryId(heldItem))
|
||||
if (holdEffect == HOLD_EFFECT_GEMS && GetMoveType(move) == ItemId_GetSecondaryId(heldItem))
|
||||
{
|
||||
gSpecialStatuses[battler].gemParam = GetBattlerHoldEffectParam(battler);
|
||||
gSpecialStatuses[battler].gemBoost = TRUE;
|
||||
|
|
Loading…
Reference in a new issue