diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 37eaa5b832..6574e26ab3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -7290,7 +7290,7 @@ BattleScript_DefDownSpeedUpTryDef:: setstatchanger STAT_DEF, 1, TRUE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_DefDownSpeedUpTrySpeed jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DefDownSpeedUpTrySpeed - printfromtable gStatUpStringIds + printfromtable gStatDownStringIds waitmessage B_WAIT_TIME_LONG BattleScript_DefDownSpeedUpTrySpeed: playstatchangeanimation BS_ATTACKER, BIT_SPEED, 0 diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index 2903963f48..da44714e21 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -39,7 +39,7 @@ #define sABILITY_OVERWRITE (gBattleScripting + 0x34) // abilityPopupOverwrite #define sSWITCH_CASE (gBattleScripting + 0x36) // switchCase #define sBERRY_OVERRIDE (gBattleScripting + 0x37) // overrideBerryRequirements -#define sSTICKY_WEB_STAT_DROP (gBattleScripting + 0x38) // +#define sSTICKY_WEB_STAT_DROP (gBattleScripting + 0x38) // stickyWebStatDrop // Array entries for battle communication #define MULTIUSE_STATE 0 diff --git a/src/battle_ai_main.c b/src/battle_ai_main.c index 02597a0aa8..16e830efe0 100644 --- a/src/battle_ai_main.c +++ b/src/battle_ai_main.c @@ -566,7 +566,7 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score) GET_MOVE_TYPE(move, moveType); // check non-user target - if (moveTarget & MOVE_TARGET_USER) + if (!(moveTarget & MOVE_TARGET_USER)) { // handle negative checks on non-user target // check powder moves diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 4d464c5d29..01944f5084 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3504,8 +3504,11 @@ void SetMoveEffect(bool32 primary, u32 certain) gBattleMons[gBattlerAttacker].status2 |= STATUS2_ESCAPE_PREVENTION; break; case MOVE_EFFECT_SCALE_SHOT: - BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BattleScript_DefDownSpeedUp; + if (!NoAliveMonsForEitherParty()) + { + BattleScriptPush(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_DefDownSpeedUp; + } break; } } @@ -7700,6 +7703,7 @@ static bool32 CourtChangeSwapSideStatuses(void) UPDATE_COURTCHANGED_BATTLER(auroraVeilBattlerId); UPDATE_COURTCHANGED_BATTLER(tailwindBattlerId); UPDATE_COURTCHANGED_BATTLER(luckyChantBattlerId); + gBattleStruct->stickyWebUser ^= BIT_SIDE; // Track which side originally set the Sticky Web SWAP(sideTimerPlayer->stickyWebBattlerSide, sideTimerOpp->stickyWebBattlerSide, temp); diff --git a/src/battle_util.c b/src/battle_util.c index 041661cdcd..c0a7f2150e 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1569,7 +1569,7 @@ void PrepareStringBattle(u16 stringId, u8 battler) && ((targetAbility == ABILITY_DEFIANT && CompareStat(gBattlerTarget, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN)) || (targetAbility == ABILITY_COMPETITIVE && CompareStat(gBattlerTarget, STAT_SPATK, MAX_STAT_STAGE, CMP_LESS_THAN))) && gSpecialStatuses[gBattlerTarget].changedStatsBattlerId != BATTLE_PARTNER(gBattlerTarget) - // && gSpecialStatuses[gBattlerTarget].changedStatsBattlerId != gBattlerTarget) // Why was this here? Needs investigating + && ((gSpecialStatuses[gBattlerTarget].changedStatsBattlerId != gBattlerTarget) || gBattleScripting.stickyWebStatDrop == 1) && !(gBattleScripting.stickyWebStatDrop == 1 && gSideTimers[targetSide].stickyWebBattlerSide == targetSide)) // Sticky Web must have been set by the foe { gBattleScripting.stickyWebStatDrop = 0;