Merge pull request #212 from Fontbane/gooey

Queenly Majesty, Big Pecks, Gooey and Tangling Hair
This commit is contained in:
DizzyEggg 2019-12-23 17:23:33 +01:00 committed by GitHub
commit 308e1594c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 2 deletions

View file

@ -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

View file

@ -4273,7 +4273,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)
{

View file

@ -3082,9 +3082,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))
{
@ -3311,6 +3314,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)