Better names for Micle and Custap flags
This commit is contained in:
parent
380e1e470c
commit
075c0299a1
4 changed files with 11 additions and 11 deletions
|
@ -142,8 +142,8 @@ struct ProtectStruct
|
|||
u32 usedGravityPreventedMove:1;
|
||||
u32 powderSelfDmg:1;
|
||||
u32 usedThroatChopPreventedMove:1;
|
||||
u32 micle:1;
|
||||
u32 custap:1; // also quick claw
|
||||
u32 usedMicleBerry:1;
|
||||
u32 usedCustapBerry:1; // also quick claw
|
||||
u32 touchedProtectLike:1;
|
||||
u32 disableEjectPack:1;
|
||||
u32 physicalDmg;
|
||||
|
|
|
@ -4360,7 +4360,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
|||
|| (!IsAbilityOnOpposingSide(battler1, ABILITY_UNNERVE)
|
||||
&& holdEffectBattler1 == HOLD_EFFECT_CUSTAP_BERRY
|
||||
&& HasEnoughHpToEatBerry(battler1, 4, gBattleMons[battler1].item)))
|
||||
gProtectStructs[battler1].custap = TRUE;
|
||||
gProtectStructs[battler1].usedCustapBerry = TRUE;
|
||||
|
||||
speedBattler2 = GetBattlerTotalSpeedStat(battler2);
|
||||
holdEffectBattler2 = GetBattlerHoldEffect(battler2, TRUE);
|
||||
|
@ -4368,7 +4368,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
|||
|| (!IsAbilityOnOpposingSide(battler2, ABILITY_UNNERVE)
|
||||
&& holdEffectBattler2 == HOLD_EFFECT_CUSTAP_BERRY
|
||||
&& HasEnoughHpToEatBerry(battler2, 4, gBattleMons[battler2].item)))
|
||||
gProtectStructs[battler2].custap = TRUE;
|
||||
gProtectStructs[battler2].usedCustapBerry = TRUE;
|
||||
|
||||
if (!ignoreChosenMoves)
|
||||
{
|
||||
|
@ -4384,9 +4384,9 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
|||
// LAGGING TAIL - always last
|
||||
// STALL - always last
|
||||
|
||||
if (gProtectStructs[battler1].custap && !gProtectStructs[battler2].custap)
|
||||
if (gProtectStructs[battler1].usedCustapBerry && !gProtectStructs[battler2].usedCustapBerry)
|
||||
strikesFirst = 0;
|
||||
else if (gProtectStructs[battler2].custap && !gProtectStructs[battler1].custap)
|
||||
else if (gProtectStructs[battler2].usedCustapBerry && !gProtectStructs[battler1].usedCustapBerry)
|
||||
strikesFirst = 1;
|
||||
else if (holdEffectBattler1 == HOLD_EFFECT_LAGGING_TAIL && holdEffectBattler2 != HOLD_EFFECT_LAGGING_TAIL)
|
||||
strikesFirst = 1;
|
||||
|
@ -4639,12 +4639,12 @@ static void CheckQuickClaw_CustapBerryActivation(void)
|
|||
gBattleStruct->quickClawBattlerId++;
|
||||
if (gChosenActionByBattler[gActiveBattler] == B_ACTION_USE_MOVE
|
||||
&& gChosenMoveByBattler[gActiveBattler] != MOVE_FOCUS_PUNCH // quick claw message doesn't need to activate here
|
||||
&& gProtectStructs[gActiveBattler].custap
|
||||
&& gProtectStructs[gActiveBattler].usedCustapBerry
|
||||
&& !(gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
|
||||
&& !(gDisableStructs[gBattlerAttacker].truantCounter)
|
||||
&& !(gProtectStructs[gActiveBattler].noValidMoves))
|
||||
{
|
||||
gProtectStructs[gActiveBattler].custap = FALSE;
|
||||
gProtectStructs[gActiveBattler].usedCustapBerry = FALSE;
|
||||
gLastUsedItem = gBattleMons[gActiveBattler].item;
|
||||
if (GetBattlerHoldEffect(gActiveBattler, FALSE) == HOLD_EFFECT_CUSTAP_BERRY)
|
||||
{
|
||||
|
|
|
@ -1638,9 +1638,9 @@ u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move)
|
|||
else if (atkHoldEffect == HOLD_EFFECT_ZOOM_LENS && GetBattlerTurnOrderNum(battlerAtk) > GetBattlerTurnOrderNum(battlerDef));
|
||||
calc = (calc * (100 + atkParam)) / 100;
|
||||
|
||||
if (gProtectStructs[battlerAtk].micle)
|
||||
if (gProtectStructs[battlerAtk].usedMicleBerry)
|
||||
{
|
||||
gProtectStructs[battlerAtk].micle = FALSE;
|
||||
gProtectStructs[battlerAtk].usedMicleBerry = FALSE;
|
||||
if (atkAbility == ABILITY_RIPEN)
|
||||
calc = (calc * 140) / 100; // ripen gives 40% acc boost
|
||||
else
|
||||
|
|
|
@ -5616,7 +5616,7 @@ static u8 TrySetMicleBerry(u32 battlerId, u32 itemId, bool32 end2)
|
|||
{
|
||||
if (HasEnoughHpToEatBerry(battlerId, 4, itemId))
|
||||
{
|
||||
gProtectStructs[battlerId].micle = TRUE; // battler's next attack has increased accuracy
|
||||
gProtectStructs[battlerId].usedMicleBerry = TRUE; // battler's next attack has increased accuracy
|
||||
|
||||
if (end2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue