From ae482ed1f4648fb5f09e0c4c382ff401ce2cec96 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Mon, 12 Dec 2022 21:08:46 -0300 Subject: [PATCH] Implemented Ceaseless Edge's effect --- data/battle_scripts_1.s | 35 +++++++++++++++++++++++++ include/constants/battle_move_effects.h | 3 ++- src/data/battle_moves.h | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 94a220608..d1d1e670f 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -416,6 +416,18 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectDoubleShock @ EFFECT_DOUBLE_SHOCK .4byte BattleScript_EffectSpecialAttackUpHit @ EFFECT_SPECIAL_ATTACK_UP_HIT .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE + .4byte BattleScript_EffectCeaselessEdge @ EFFECT_CEASELESS_EDGE + +BattleScript_EffectCeaselessEdge:: + call BattleScript_EffectHit_Ret + trysetspikes BattleScript_ButItFailedAtkStringPpReduce + attackstring + ppreduce + attackanimation + waitanimation + printstring STRINGID_SPIKESSCATTERED + waitmessage B_WAIT_TIME_LONG + goto BattleScript_MoveEnd BattleScript_AffectionBasedEndurance:: playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON @@ -3029,6 +3041,29 @@ BattleScript_MoveEnd:: moveendall end +BattleScript_EffectHit_Ret:: + attackcanceler + accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE + attackstring + ppreduce + critcalc + damagecalc + adjustdamage + attackanimation + waitanimation + effectivenesssound + hitanimation BS_TARGET + waitstate + healthbarupdate BS_TARGET + datahpupdate BS_TARGET + critmessage + waitmessage B_WAIT_TIME_LONG + resultmessage + waitmessage B_WAIT_TIME_LONG + seteffectwithchance + tryfaintmon BS_TARGET + return + BattleScript_EffectNaturalGift: attackcanceler attackstring diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index 5af1017a9..1ac102c35 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -397,7 +397,8 @@ #define EFFECT_DOUBLE_SHOCK 391 #define EFFECT_SPECIAL_ATTACK_UP_HIT 392 #define EFFECT_VICTORY_DANCE 393 +#define EFFECT_CEASELESS_EDGE 394 -#define NUM_BATTLE_MOVE_EFFECTS 394 +#define NUM_BATTLE_MOVE_EFFECTS 395 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index ef4d15039..225da6ff7 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13598,7 +13598,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_CEASELESS_EDGE] = { - .effect = EFFECT_PLACEHOLDER, // EFFECT_CEASELESS_EDGE, + .effect = EFFECT_CEASELESS_EDGE, .power = 65, .type = TYPE_DARK, .accuracy = 90,