From 0159065deaf90c3d8296c1ecca6b2912fdc6a8b9 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 28 Dec 2022 07:51:11 -0300 Subject: [PATCH] Removed Shell Trap It's time to let it go for my own mental sanity. Besides, it's a Gen. 7 move. I shouldn't have added it here. --- data/battle_scripts_1.s | 18 ------------------ include/battle_scripts.h | 1 - include/constants/battle_move_effects.h | 9 ++++----- include/constants/battle_string_ids.h | 4 +--- src/battle_main.c | 13 +++++-------- src/battle_message.c | 4 ---- src/battle_script_commands.c | 5 ++--- src/data/battle_moves.h | 2 +- 8 files changed, 13 insertions(+), 43 deletions(-) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index ec604ebc6..49d06a033 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -417,7 +417,6 @@ gBattleScriptsForMoveEffects:: .4byte BattleScript_EffectSpecialAttackUpHit @ EFFECT_SPECIAL_ATTACK_UP_HIT .4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE .4byte BattleScript_EffectCeaselessEdge @ EFFECT_CEASELESS_EDGE - .4byte BattleScript_EffectShellTrap @ EFFECT_SHELL_TRAP .4byte BattleScript_EffectDireClaw @ EFFECT_DIRE_CLAW .4byte BattleScript_EffectStoneAxe @ EFFECT_STONE_AXE .4byte BattleScript_EffectBarbBarrage @ EFFECT_BARB_BARRAGE @@ -433,23 +432,6 @@ BattleScript_EffectDireClaw:: setmoveeffect MOVE_EFFECT_DIRE_CLAW goto BattleScript_EffectHit -BattleScript_EffectShellTrap: - jumpifnodamage BattleScript_EffectShellTrap_Failed - goto BattleScript_EffectHit - -BattleScript_EffectShellTrap_Failed: - printstring STRINGID_ATTACKERSHELLTRAPDIDNTWORK - waitmessage B_WAIT_TIME_LONG - goto BattleScript_MoveEnd - -BattleScript_ShellTrapSetUp:: - printstring STRINGID_EMPTYSTRING3 - waitmessage 1 - playanimation BS_ATTACKER, B_ANIM_SHELL_TRAP_SETUP, NULL - printstring STRINGID_ATTACKERSETASHELLTRAP - waitmessage B_WAIT_TIME_LONG - end2 - BattleScript_EffectCeaselessEdge:: call BattleScript_EffectHit_Ret trysetspikes BattleScript_ButItFailedAtkStringPpReduce diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 89ad9302b..75afdbf63 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -433,7 +433,6 @@ extern const u8 BattleScript_MultiHitPrintStrings[]; extern const u8 BattleScript_BurnUpRemoveType[]; extern const u8 BattleScript_TargetAbilityStatRaiseRet[]; extern const u8 BattleScript_DoubleShockRemoveType[]; -extern const u8 BattleScript_ShellTrapSetUp[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/include/constants/battle_move_effects.h b/include/constants/battle_move_effects.h index f51ae08c1..423fa9a58 100644 --- a/include/constants/battle_move_effects.h +++ b/include/constants/battle_move_effects.h @@ -398,11 +398,10 @@ #define EFFECT_SPECIAL_ATTACK_UP_HIT 392 #define EFFECT_VICTORY_DANCE 393 #define EFFECT_CEASELESS_EDGE 394 -#define EFFECT_SHELL_TRAP 395 -#define EFFECT_DIRE_CLAW 396 -#define EFFECT_STONE_AXE 397 -#define EFFECT_BARB_BARRAGE 398 +#define EFFECT_DIRE_CLAW 395 +#define EFFECT_STONE_AXE 396 +#define EFFECT_BARB_BARRAGE 397 -#define NUM_BATTLE_MOVE_EFFECTS 399 +#define NUM_BATTLE_MOVE_EFFECTS 398 #endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H diff --git a/include/constants/battle_string_ids.h b/include/constants/battle_string_ids.h index 64ddcbebd..8dd94cca4 100644 --- a/include/constants/battle_string_ids.h +++ b/include/constants/battle_string_ids.h @@ -632,10 +632,8 @@ #define STRINGID_TARGETTOUGHEDITOUT 630 #define STRINGID_ATTACKERLOSTELECTRICTYPE 631 #define STRINGID_ATTACKERSWITCHEDSTATWITHTARGET 632 -#define STRINGID_ATTACKERSETASHELLTRAP 633 -#define STRINGID_ATTACKERSHELLTRAPDIDNTWORK 634 -#define BATTLESTRINGS_COUNT 635 +#define BATTLESTRINGS_COUNT 633 // This is the string id that gBattleStringsTable starts with. // String ids before this (e.g. STRINGID_INTROMSG) are not in the table, diff --git a/src/battle_main.c b/src/battle_main.c index 8ba87133e..d138cf231 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -101,7 +101,7 @@ static void SetActionsAndBattlersTurnOrder(void); static void UpdateBattlerPartyOrdersOnSwitch(void); static bool8 AllAtActionConfirmed(void); static void TryChangeTurnOrder(void); -static void CheckChosenMoveForEffectsBeforeTurnStarts(void); +static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void); static void CheckMegaEvolutionBeforeTurn(void); static void CheckQuickClaw_CustapBerryActivation(void); static void FreeResetData_ReturnToOvOrDoEvolutions(void); @@ -4878,7 +4878,7 @@ static void CheckMegaEvolutionBeforeTurn(void) } #if B_MEGA_EVO_TURN_ORDER <= GEN_6 - gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts; + gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; gBattleStruct->focusPunchBattlerId = 0; #else gBattleMainFunc = TryChangeTurnOrder; // This will just do nothing if no mon has mega evolved @@ -4903,11 +4903,11 @@ static void TryChangeTurnOrder(void) } } } - gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts; + gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; gBattleStruct->focusPunchBattlerId = 0; } -static void CheckChosenMoveForEffectsBeforeTurnStarts(void) +static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) { u32 i; @@ -4921,7 +4921,7 @@ static void CheckChosenMoveForEffectsBeforeTurnStarts(void) && !(gDisableStructs[gBattlerAttacker].truantCounter) && !(gProtectStructs[gActiveBattler].noValidMoves)) { - switch (gChosenMoveByBattler[gActiveBattler]) + switch(gChosenMoveByBattler[gActiveBattler]) { case MOVE_FOCUS_PUNCH: BattleScriptExecute(BattleScript_FocusPunchSetUp); @@ -4929,9 +4929,6 @@ static void CheckChosenMoveForEffectsBeforeTurnStarts(void) case MOVE_BEAK_BLAST: BattleScriptExecute(BattleScript_BeakBlastSetUp); return; - case MOVE_SHELL_TRAP: - BattleScriptExecute(BattleScript_ShellTrapSetUp); - return; } } } diff --git a/src/battle_message.c b/src/battle_message.c index 60578897e..031261a28 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -761,13 +761,9 @@ static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melte static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!"); static const u8 sText_AttackerLostElectricType[] = _("{B_ATK_NAME_WITH_PREFIX} used up all\nof its electricity!"); static const u8 sText_AttackerSwitchedStatWithTarget[] = _("{B_ATK_NAME_WITH_PREFIX} switched {B_BUFF1}\nwith its target!"); -static const u8 sText_AttackerSetAShellTrap[] = _("{B_ATK_NAME_WITH_PREFIX} set\na shell trap!"); -static const u8 sText_AttackerShellTrapDidntWork[] = _("{B_ATK_NAME_WITH_PREFIX}'s shell trap\ndidn't work!"); const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] = { - [STRINGID_ATTACKERSHELLTRAPDIDNTWORK - BATTLESTRINGS_TABLE_START] = sText_AttackerShellTrapDidntWork, - [STRINGID_ATTACKERSETASHELLTRAP - BATTLESTRINGS_TABLE_START] = sText_AttackerSetAShellTrap, [STRINGID_ATTACKERSWITCHEDSTATWITHTARGET - BATTLESTRINGS_TABLE_START] = sText_AttackerSwitchedStatWithTarget, [STRINGID_TARGETTOUGHEDITOUT - BATTLESTRINGS_TABLE_START] = sText_TargetToughedItOut, [STRINGID_ATTACKERMELTEDTHEICE - BATTLESTRINGS_TABLE_START] = sText_AttackerMeltedTheIce, diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index bb0d20199..6e0f4c05d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -10047,7 +10047,7 @@ static void Cmd_various(void) gBattleMons[gActiveBattler].item = gLastUsedItem; break; case VARIOUS_SET_BEAK_BLAST: - gProtectStructs[gActiveBattler].beakBlastCharge = TRUE; + gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE; break; case VARIOUS_SWAP_SIDE_STATUSES: CourtChangeSwapSideStatuses(); @@ -11943,8 +11943,7 @@ static void Cmd_trysetencore(void) if (gLastMoves[gBattlerTarget] == MOVE_STRUGGLE || gLastMoves[gBattlerTarget] == MOVE_ENCORE - || gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE - || gLastMoves[gBattlerTarget] == MOVE_SHELL_TRAP) + || gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE) { i = MAX_MON_MOVES; } diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 227f77daf..40663a421 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -11616,7 +11616,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = [MOVE_SHELL_TRAP] = { - .effect = EFFECT_SHELL_TRAP, + .effect = EFFECT_PLACEHOLDER, // EFFECT_SHELL_TRAP, .power = 150, .type = TYPE_FIRE, .accuracy = 100,