From 73b96fe145bf3498feb23373830ec3d7e3e2adba Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 27 Sep 2019 12:27:36 -0400 Subject: [PATCH] Rename CONTACT macros to ON_DAMAGE --- data/battle_scripts_1.s | 2 +- include/battle_util.h | 2 +- include/constants/battle_script_commands.h | 2 +- src/battle_script_commands.c | 4 ++-- src/battle_util.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 2f823f687..2e0f9bc6f 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3152,7 +3152,7 @@ BattleScript_PursuitDmgOnSwitchOut:: resultmessage waitmessage 0x40 tryfaintmon BS_TARGET, FALSE, NULL - moveendfromto MOVEEND_CONTACT_ABILITIES, MOVEEND_CHOICE_MOVE + moveendfromto MOVEEND_ON_DAMAGE_ABILITIES, MOVEEND_CHOICE_MOVE various4 BS_TARGET jumpifbyte CMP_EQUAL, gBattleCommunication, 0x0, BattleScript_PursuitDmgOnSwitchOutRet setbyte sGIVEEXP_STATE, 0x0 diff --git a/include/battle_util.h b/include/battle_util.h index f90d812d6..b77fa10ad 100644 --- a/include/battle_util.h +++ b/include/battle_util.h @@ -12,7 +12,7 @@ #define ABILITYEFFECT_ENDTURN 0x1 #define ABILITYEFFECT_MOVES_BLOCK 0x2 #define ABILITYEFFECT_ABSORBING 0x3 -#define ABILITYEFFECT_CONTACT 0x4 +#define ABILITYEFFECT_ON_DAMAGE 0x4 #define ABILITYEFFECT_IMMUNITY 0x5 #define ABILITYEFFECT_FORECAST 0x6 #define ABILITYEFFECT_SYNCHRONIZE 0x7 diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index dd54980c5..be215ee58 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -116,7 +116,7 @@ #define MOVEEND_RAGE 0 #define MOVEEND_DEFROST 1 #define MOVEEND_SYNCHRONIZE_TARGET 2 -#define MOVEEND_CONTACT_ABILITIES 3 +#define MOVEEND_ON_DAMAGE_ABILITIES 3 #define MOVEEND_IMMUNITY_ABILITIES 4 #define MOVEEND_SYNCHRONIZE_ATTACKER 5 #define MOVEEND_CHOICE_MOVE 6 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 14158376c..118a16759 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4535,8 +4535,8 @@ static void Cmd_moveend(void) effect = TRUE; gBattleScripting.moveendState++; break; - case MOVEEND_CONTACT_ABILITIES: // Also includes Color Change - if (AbilityBattleEffects(ABILITYEFFECT_CONTACT, gBattlerTarget, 0, 0, 0)) + case MOVEEND_ON_DAMAGE_ABILITIES: // Contact abilities and Color Change + if (AbilityBattleEffects(ABILITYEFFECT_ON_DAMAGE, gBattlerTarget, 0, 0, 0)) effect = TRUE; gBattleScripting.moveendState++; break; diff --git a/src/battle_util.c b/src/battle_util.c index 2d9693766..8587bb88e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -2084,7 +2084,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA } } break; - case ABILITYEFFECT_CONTACT: // Also includes Color Change + case ABILITYEFFECT_ON_DAMAGE: // Contact abilities and Color Change switch (gLastUsedAbility) { case ABILITY_COLOR_CHANGE: