From d4695fffe7260089cb4e4a508ef57e3194de2f44 Mon Sep 17 00:00:00 2001 From: Squeetz Date: Wed, 11 Aug 2021 15:45:30 +0200 Subject: Rename and document HITMARKER_x100000 This marker makes the target unable to Counter or Mirror Coat the damage back to an attacker, however the game does not have a scenario where this is applicable since all its uses are in end-turn events. It's used for all passive damage, where the damage dealt isn't coming from an attacker. Alternate name: HITMARKER_NO_ATTACKER --- src/battle_script_commands.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 8572fff2b..a11362ab2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1811,9 +1811,9 @@ static void atk0C_datahpupdate(void) gHpDealt = gBattleMons[gActiveBattler].hp; gBattleMons[gActiveBattler].hp = 0; } - if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_x100000)) + if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE)) gSpecialStatuses[gActiveBattler].dmg = gHpDealt; - if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT) + if (IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE) && gCurrentMove != MOVE_PAIN_SPLIT) { gProtectStructs[gActiveBattler].physicalDmg = gHpDealt; gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt; @@ -1828,7 +1828,7 @@ static void atk0C_datahpupdate(void) gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget; } } - else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_x100000)) + else if (!IS_TYPE_PHYSICAL(moveType) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE)) { gProtectStructs[gActiveBattler].specialDmg = gHpDealt; gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt; @@ -1844,7 +1844,7 @@ static void atk0C_datahpupdate(void) } } } - gHitMarker &= ~(HITMARKER_x100000); + gHitMarker &= ~(HITMARKER_PASSIVE_DAMAGE); BtlController_EmitSetMonData(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBattler].hp); MarkBattlerForControllerExec(gActiveBattler); } -- cgit v1.2.3