diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index f2a0223cf..b3313abbe 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -418,6 +418,11 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE .4byte BattleScript_EffectCeaselessEdge @ EFFECT_CEASELESS_EDGE .4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP + .4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW + +BattleScript_EffectDireClaw:: + setmoveeffect MOVE_EFFECT_DIRE_CLAW + goto BattleScript_EffectHit BattleScript_EffectShellTrap: jumpifnodamage BattleScript_EffectShellTrap_Failed diff --git a/include/constants/battle.h b/include/constants/battle.h index be44c21cb..fa9d4bd18 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -371,8 +371,9 @@ #define MOVE_EFFECT_RELIC_SONG 69 #define MOVE_EFFECT_TRAP_BOTH 70 #define MOVE_EFFECT_DOUBLE_SHOCK 71 +#define MOVE_EFFECT_DIRE_CLAW 72 -#define NUM_MOVE_EFFECTS 72 +#define NUM_MOVE_EFFECTS 73 #define MOVE_EFFECT_AFFECTS_USER 0x4000 #define MOVE_EFFECT_CERTAIN 0x8000 diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index c16084c30..fa3184855 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -399,7 +399,8 @@ #define EFFECT_VICTORY_DANCE 393 #define EFFECT_CEASELESS_EDGE 394 #define EFFECT_SHELL_TRAP 395 +#define EFFECT_DIRE_CLAW 396 -#define NUM_BATTLE_MOVE_EFFECTS 396 +#define NUM_BATTLE_MOVE_EFFECTS 397 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3d85d1379..e5d7935fd 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3647,6 +3647,22 @@ void SetMoveEffect(bool32 primary, u32 certain) BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_DoubleShockRemoveType; break; + case MOVE_EFFECT_DIRE_CLAW: + if (gBattleMons[gEffectBattler].status1) + { + gBattlescriptCurrInstr++; + } + else + { + DIRE_CLAW_STATUS_PICK: + gBattleScripting.moveEffect = Random() % 6; + if (gBattleScripting.moveEffect == MOVE_EFFECT_NONE + || gBattleScripting.moveEffect == MOVE_EFFECT_BURN + || gBattleScripting.moveEffect == MOVE_EFFECT_FREEZE) + goto DIRE_CLAW_STATUS_PICK; + SetMoveEffect(FALSE, 0); + } + break; } } } diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 6badf0ee5..6481b7d45 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13279,11 +13279,11 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = #else .power = 60, #endif - .effect = EFFECT_PLACEHOLDER, // EFFECT_DIRE_CLAW, + .effect = EFFECT_DIRE_CLAW, .type = TYPE_POISON, .accuracy = 100, .pp = 15, - .secondaryEffectChance = 0, + .secondaryEffectChance = 50, .target = MOVE_TARGET_SELECTED, .priority = 0, .flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED | FLAG_SHEER_FORCE_BOOST,