diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 425834b7e..4c61e5e69 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -433,31 +433,10 @@ BattleScript_EffectDireClaw:: goto BattleScript_EffectHit BattleScript_EffectHitSetEntryHazard:: - 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 - tryfaintmon BS_TARGET argumenttomoveeffect - seteffectprimary - moveendall - end + goto BattleScript_EffectHit -BattleScript_SpikesActivate:: +BattleScript_SpikesActivates:: trysetspikes BattleScript_MoveEnd printfromtable gDmgHazardsStringIds waitmessage B_WAIT_TIME_LONG diff --git a/include/battle_scripts.h b/include/battle_scripts.h index c4b15d9f1..c6cbddcd3 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -457,7 +457,7 @@ extern const u8 BattleScript_LunarDanceActivates[]; extern const u8 BattleScript_ShellTrapSetUp[]; extern const u8 BattleScript_CouldntFullyProtect[]; extern const u8 BattleScript_StealthRockActivates[]; -extern const u8 BattleScript_SpikesActivate[]; +extern const u8 BattleScript_SpikesActivates[]; // zmoves extern const u8 BattleScript_ZMoveActivateDamaging[]; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 0799cf2f3..15a72c7e8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -2896,6 +2896,9 @@ void SetMoveEffect(bool32 primary, u32 certain) return; case MOVE_EFFECT_STEALTH_ROCK: case MOVE_EFFECT_SPIKES: + case MOVE_EFFECT_PAYDAY: + case MOVE_EFFECT_STEAL_ITEM: + case MOVE_EFFECT_BUG_BITE: activateAfterFaint = TRUE; break; } @@ -2938,11 +2941,7 @@ void SetMoveEffect(bool32 primary, u32 certain) if (TestSheerForceFlag(gBattlerAttacker, gCurrentMove) && affectsUser != MOVE_EFFECT_AFFECTS_USER) INCREMENT_RESET_RETURN - if (gBattleMons[gEffectBattler].hp == 0 - && !activateAfterFaint - && gBattleScripting.moveEffect != MOVE_EFFECT_PAYDAY - && gBattleScripting.moveEffect != MOVE_EFFECT_STEAL_ITEM - && gBattleScripting.moveEffect != MOVE_EFFECT_BUG_BITE) + if (gBattleMons[gEffectBattler].hp == 0 && !activateAfterFaint) INCREMENT_RESET_RETURN if (DoesSubstituteBlockMove(gBattlerAttacker, gEffectBattler, gCurrentMove) && affectsUser != MOVE_EFFECT_AFFECTS_USER) @@ -3761,7 +3760,7 @@ void SetMoveEffect(bool32 primary, u32 certain) if (!gBattleMons[gEffectBattler].status1) { static const u8 sDireClawEffects[] = { MOVE_EFFECT_POISON, MOVE_EFFECT_PARALYSIS, MOVE_EFFECT_SLEEP }; - gBattleScripting.moveEffect = sDireClawEffects[Random() % 3]; + gBattleScripting.moveEffect = sDireClawEffects[Random() % ARRAY_COUNT(sDireClawEffects)]; SetMoveEffect(TRUE, 0); } break; @@ -3778,7 +3777,7 @@ void SetMoveEffect(bool32 primary, u32 certain) { gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SPIKESSCATTERED; BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BattleScript_SpikesActivate; + gBattlescriptCurrInstr = BattleScript_SpikesActivates; } break; } diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h index 530dacd13..22eb7ca1a 100644 --- a/src/data/battle_moves.h +++ b/src/data/battle_moves.h @@ -13328,7 +13328,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .type = TYPE_ROCK, .accuracy = 90, .pp = 15, - .secondaryEffectChance = 0, + .secondaryEffectChance = 100, .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 | FLAG_SLICING_MOVE, @@ -13605,7 +13605,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] = .type = TYPE_DARK, .accuracy = 90, .pp = 15, - .secondaryEffectChance = 0, + .secondaryEffectChance = 100, .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 | FLAG_SLICING_MOVE,