From 8b3a40162b3ff3fb2285bdb98a98e7643e6685c8 Mon Sep 17 00:00:00 2001 From: Fontbane <36677462+Fontbane@users.noreply.github.com> Date: Thu, 19 Dec 2019 13:50:19 -0500 Subject: [PATCH 1/4] Queenly Majesty --- src/battle_util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index 32492410e6..f433a5708f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3084,6 +3084,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA else if ((gLastUsedAbility == ABILITY_DAZZLING || (IsBattlerAlive(battler ^= BIT_FLANK) && GetBattlerAbility(battler) == ABILITY_DAZZLING) ) + || (gLastUsedAbility == ABILITY_QUEENLY_MAJESTY + || (IsBattlerAlive(battler ^= BIT_FLANK) && GetBattlerAbility(battler) == ABILITY_QUEENLY_MAJESTY) + ) && GetChosenMovePriority(battler) > 0 && GetBattlerSide(gBattlerAttacker) != GetBattlerSide(battler)) { From 186822ed0c0c53b00232a39cc07daa8676587d0a Mon Sep 17 00:00:00 2001 From: Fontbane <36677462+Fontbane@users.noreply.github.com> Date: Thu, 19 Dec 2019 13:53:07 -0500 Subject: [PATCH 2/4] Fix missing parentheses --- src/battle_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle_util.c b/src/battle_util.c index f433a5708f..4499917aa8 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3081,12 +3081,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA gBattlescriptCurrInstr = BattleScript_SoundproofProtected; effect = 1; } - else if ((gLastUsedAbility == ABILITY_DAZZLING + else if (((gLastUsedAbility == ABILITY_DAZZLING || (IsBattlerAlive(battler ^= BIT_FLANK) && GetBattlerAbility(battler) == ABILITY_DAZZLING) ) || (gLastUsedAbility == ABILITY_QUEENLY_MAJESTY || (IsBattlerAlive(battler ^= BIT_FLANK) && GetBattlerAbility(battler) == ABILITY_QUEENLY_MAJESTY) - ) + )) && GetChosenMovePriority(battler) > 0 && GetBattlerSide(gBattlerAttacker) != GetBattlerSide(battler)) { From 2fb6ea4fc484754f061c6c505c35c8535717ee36 Mon Sep 17 00:00:00 2001 From: Fontbane <36677462+Fontbane@users.noreply.github.com> Date: Thu, 19 Dec 2019 14:01:46 -0500 Subject: [PATCH 3/4] Big Pecks --- data/battle_ai_scripts.s | 2 ++ src/battle_script_commands.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index 39e96f5cd2..91c0917771 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -554,6 +554,8 @@ AI_CBM_AttackDown: @ 82DC387 AI_CBM_DefenseDown: @ 82DC39C if_stat_level_equal AI_TARGET, STAT_DEF, 0, Score_Minus10 + get_ability AI_TARGET + if_equal ABILITY_BIG_PECKS, Score_Minus10 goto CheckIfAbilityBlocksStatChange AI_CBM_SpeedDown: @ 82DC3A9 diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index eb95ea07e6..6d3f94825d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4262,7 +4262,8 @@ static void Cmd_playstatchangeanimation(void) && ability != ABILITY_CLEAR_BODY && ability != ABILITY_WHITE_SMOKE && !(ability == ABILITY_KEEN_EYE && currStat == STAT_ACC) - && !(ability == ABILITY_HYPER_CUTTER && currStat == STAT_ATK)) + && !(ability == ABILITY_HYPER_CUTTER && currStat == STAT_ATK) + && !(ability == ABILITY_BIG_PECKS && currStat == STAT_DEF)) { if (gBattleMons[gActiveBattler].statStages[currStat] > 0) { From 40b7d8573d4fb504fdf2feb17b45302956889949 Mon Sep 17 00:00:00 2001 From: Fontbane <36677462+Fontbane@users.noreply.github.com> Date: Fri, 20 Dec 2019 17:38:38 -0500 Subject: [PATCH 4/4] Gooey and Tangling Hair --- src/battle_util.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/battle_util.c b/src/battle_util.c index 4499917aa8..1ddf2f3bed 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -3313,6 +3313,22 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA effect++; } break; + case ABILITY_GOOEY: + case ABILITY_TANGLING_HAIR: + if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) + && gBattleMons[gBattlerAttacker].hp != 0 + && !gProtectStructs[gBattlerAttacker].confusionSelfDmg + && TARGET_TURN_DAMAGED + && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT)) + { + gBattleScripting.moveEffect = MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_SPD_MINUS_1; + PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gLastUsedAbility); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_AbilityStatusEffect; + gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; + effect++; + } + break; case ABILITY_ROUGH_SKIN: case ABILITY_IRON_BARBS: if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)