summaryrefslogtreecommitdiff
path: root/src/battle_script_commands.c
diff options
context:
space:
mode:
authorSqueetz <alenyla@hotmail.com>2021-08-11 15:45:30 +0200
committerSqueetz <alenyla@hotmail.com>2021-08-11 15:45:30 +0200
commitd4695fffe7260089cb4e4a508ef57e3194de2f44 (patch)
treec7b9aa6fc26634fd6cd6cefc5b86adff674c41c0 /src/battle_script_commands.c
parentfeb54289376a5fafb49f4a1ac35e7b07c79bcd2c (diff)
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
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r--src/battle_script_commands.c8
1 files changed, 4 insertions, 4 deletions
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);
}