From 3ac3cb249e17ef68e56c8370af8160a525bb6cc5 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Fri, 18 Nov 2022 22:00:21 +0100 Subject: [PATCH] Wicked Torque effect --- data/battle_scripts_1.s | 5 +++++ include/constants/battle_move_effects.h | 3 ++- src/battle_tv.c | 3 ++- src/data/battle_moves.h | 4 ++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 63719e2b6..4f8447987 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -412,6 +412,7 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectExtremeEvoboost @ EFFECT_EXTREME_EVOBOOST .4byte BattleScript_EffectTerrainHit @ EFFECT_DAMAGE_SET_TERRAIN .4byte BattleScript_EffectDarkVoid @ EFFECT_DARK_VOID + .4byte BattleScript_EffectSleepHit @ EFFECT_SLEEP_HIT BattleScript_AffectionBasedEndurance:: playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON @@ -3201,6 +3202,10 @@ BattleScript_EffectBurnHit:: setmoveeffect MOVE_EFFECT_BURN goto BattleScript_EffectHit +BattleScript_EffectSleepHit:: + setmoveeffect MOVE_EFFECT_SLEEP + goto BattleScript_EffectHit + BattleScript_EffectFreezeHit:: setmoveeffect MOVE_EFFECT_FREEZE goto BattleScript_EffectHit diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index d38e7108d..2292dfa1f 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -393,7 +393,8 @@ #define EFFECT_EXTREME_EVOBOOST 387 #define EFFECT_DAMAGE_SET_TERRAIN 388 // genesis supernova #define EFFECT_DARK_VOID 389 +#define EFFECT_SLEEP_HIT 390 -#define NUM_BATTLE_MOVE_EFFECTS 389 +#define NUM_BATTLE_MOVE_EFFECTS 391 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/src/battle_tv.c b/src/battle_tv.c index 646c3563f..db51c3f4e 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -299,7 +299,8 @@ static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] = [EFFECT_WATER_SPORT] = 4, [EFFECT_CALM_MIND] = 1, [EFFECT_DRAGON_DANCE] = 1, - [EFFECT_CAMOUFLAGE] = 3 + [EFFECT_CAMOUFLAGE] = 3, + [EFFECT_SLEEP_HIT] = 1, }; static const u16 sPoints_Effectiveness[] = diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 694465e97..3ae20e102 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -14435,12 +14435,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_WICKED_TORQUE] = { - .effect = EFFECT_PLACEHOLDER, // EFFECT_SLEEP_HIT + .effect = EFFECT_SLEEP_HIT, .power = 80, .type = TYPE_DARK, .accuracy = 100, .pp = 10, - .secondaryEffectChance = 10, + .secondaryEffectChance = 100, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_PROTECT_AFFECTED,