From da1f525d455b9669ddb92b1641dc743cd51fada0 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Sun, 3 Jan 2021 09:58:19 -0300 Subject: [PATCH 1/4] Made Alolan Marowak be affected by Thick Club --- include/constants/battle_config.h | 1 + src/battle_util.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index be58ba7e74..692ad48ed9 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -35,6 +35,7 @@ #define SPECIES_ZYGARDE 0 // 50% #define SPECIES_ZYGARDE_10 10011 // 10 % #define SPECIES_ZYGARDE_COMPLETE 10012 // 100 % + #define SPECIES_MAROWAK_ALOLAN 0 #endif // Items with peculiar battle effects. diff --git a/src/battle_util.c b/src/battle_util.c index b929b7499d..56d635a136 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7006,7 +7006,10 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b switch (GetBattlerHoldEffect(battlerAtk, TRUE)) { case HOLD_EFFECT_THICK_CLUB: - if ((gBattleMons[battlerAtk].species == SPECIES_CUBONE || gBattleMons[battlerAtk].species == SPECIES_MAROWAK) && IS_MOVE_PHYSICAL(move)) + if ((gBattleMons[battlerAtk].species == SPECIES_CUBONE + || gBattleMons[battlerAtk].species == SPECIES_MAROWAK + || gBattleMons[battlerAtk].species == SPECIES_MAROWAK_ALOLAN) + && IS_MOVE_PHYSICAL(move)) MulModifier(&modifier, UQ_4_12(2.0)); break; case HOLD_EFFECT_DEEP_SEA_TOOTH: From a6b03d45a89a8d4eaedc2f7eadcb4896efefae55 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 20 Jan 2021 18:16:02 -0300 Subject: [PATCH 2/4] Made the Thick Club's effect use the new GET_BASE_SPECIES_ID macro --- src/battle_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 52521e1753..94bee8ba52 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7116,9 +7116,8 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b switch (GetBattlerHoldEffect(battlerAtk, TRUE)) { case HOLD_EFFECT_THICK_CLUB: - if ((gBattleMons[battlerAtk].species == SPECIES_CUBONE - || gBattleMons[battlerAtk].species == SPECIES_MAROWAK - || gBattleMons[battlerAtk].species == SPECIES_MAROWAK_ALOLAN) + if ((GET_BASE_SPECIES_ID(battlerAtk) == SPECIES_CUBONE + || GET_BASE_SPECIES_ID(battlerAtk) == SPECIES_MAROWAK) && IS_MOVE_PHYSICAL(move)) MulModifier(&modifier, UQ_4_12(2.0)); break; From 412c28bb7ac8a0fa42ca83e240c93ec9d31050b9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 20 Jan 2021 18:29:53 -0300 Subject: [PATCH 3/4] Removed unneeded constant label for Alolan Marowak --- include/constants/battle_config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 0acede2522..f7b38000c2 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -35,7 +35,6 @@ #define SPECIES_ZYGARDE 0 // 50% #define SPECIES_ZYGARDE_10 10011 // 10 % #define SPECIES_ZYGARDE_COMPLETE 10012 // 100 % - #define SPECIES_MAROWAK_ALOLAN 0 #endif // Items with peculiar battle effects. From 2a888a7b3e9b53bc9254850c30ad8c0f402cfc43 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 20 Jan 2021 19:30:48 -0300 Subject: [PATCH 4/4] Corrected base species check for Thick Club's effect Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com> --- src/battle_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index 94bee8ba52..e38096ee29 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -7116,8 +7116,8 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b switch (GetBattlerHoldEffect(battlerAtk, TRUE)) { case HOLD_EFFECT_THICK_CLUB: - if ((GET_BASE_SPECIES_ID(battlerAtk) == SPECIES_CUBONE - || GET_BASE_SPECIES_ID(battlerAtk) == SPECIES_MAROWAK) + if ((GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_CUBONE + || GET_BASE_SPECIES_ID(gBattleMons[battlerAtk].species) == SPECIES_MAROWAK) && IS_MOVE_PHYSICAL(move)) MulModifier(&modifier, UQ_4_12(2.0)); break;