Rename passive damage hitmarker (#2174)

This commit is contained in:
Alex
2025-08-21 14:43:19 +02:00
committed by GitHub
parent 92f7727a60
commit 208f97e1e3
5 changed files with 22 additions and 22 deletions

View File

@@ -1929,13 +1929,13 @@ static void Cmd_datahpupdate(void)
}
// Record damage for Shell Bell
if (gSpecialStatuses[gActiveBattler].shellBellDmg == 0 && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE))
if (gSpecialStatuses[gActiveBattler].shellBellDmg == 0 && !(gHitMarker & HITMARKER_PASSIVE_HP_UPDATE))
gSpecialStatuses[gActiveBattler].shellBellDmg = gHpDealt;
// Note: While physicalDmg/specialDmg below are only distinguished between for Counter/Mirror Coat, they are
// used in combination as general damage trackers for other purposes. specialDmg is additionally used
// to help determine if a fire move should defrost the target.
if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE) && gCurrentMove != MOVE_PAIN_SPLIT)
if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_HP_UPDATE) && gCurrentMove != MOVE_PAIN_SPLIT)
{
// Record physical damage/attacker for Counter
gProtectStructs[gActiveBattler].physicalDmg = gHpDealt;
@@ -1951,7 +1951,7 @@ static void Cmd_datahpupdate(void)
gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget;
}
}
else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE))
else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_HP_UPDATE))
{
// Record special damage/attacker for Mirror Coat
gProtectStructs[gActiveBattler].specialDmg = gHpDealt;
@@ -1968,7 +1968,7 @@ static void Cmd_datahpupdate(void)
}
}
}
gHitMarker &= ~HITMARKER_PASSIVE_DAMAGE;
gHitMarker &= ~HITMARKER_PASSIVE_HP_UPDATE;
// Send updated HP
BtlController_EmitSetMonData(B_COMM_TO_CONTROLLER, REQUEST_HP_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].hp), &gBattleMons[gActiveBattler].hp);