Merge pull request #1262 from LOuroboros/gen8_abilities_BE

Implemented various Gen. 8 abilities
This commit is contained in:
ultima-soul 2021-01-07 13:31:17 -08:00 committed by GitHub
commit d2d961e447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 220 additions and 21 deletions

View file

@ -5754,6 +5754,13 @@ BattleScript_PerishSongTakesLife::
tryfaintmon BS_ATTACKER, FALSE, NULL
end2
BattleScript_PerishBodyActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSWILLPERISHIN3TURNS
waitmessage 0x40
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
return
BattleScript_PerishSongCountGoesDown::
printstring STRINGID_PKMNPERISHCOUNTFELL
waitmessage 0x40
@ -6186,6 +6193,12 @@ BattleScript_AttackerFormChangeEnd3::
call BattleScript_AttackerFormChange
end3
BattleScript_BallFetch::
call BattleScript_AbilityPopUp
printstring STRINGID_FETCHEDPOKEBALL
waitmessage 0x40
end3
BattleScript_TargetFormChange::
pause 0x5
copybyte gBattlerAbility, gBattlerTarget
@ -6210,6 +6223,32 @@ BattleScript_IllusionOff::
waitmessage 0x40
return
BattleScript_CottonDownActivates::
setbyte sFIXED_ABILITY_POPUP, TRUE
call BattleScript_AbilityPopUp
copybyte gEffectBattler, gBattlerTarget
savetarget
setbyte gBattlerTarget, 0x0
BattleScript_CottonDownLoop:
setstatchanger STAT_SPEED, 1, TRUE
jumpifbyteequal gBattlerTarget, gEffectBattler, BattleScript_CottonDownLoopIncrement
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED, BattleScript_CottonDownTargetSpeedCantGoLower
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
waitmessage 0x40
goto BattleScript_CottonDownLoopIncrement
BattleScript_CottonDownTargetSpeedCantGoLower:
printstring STRINGID_STATSWONTDECREASE
waitmessage 0x40
BattleScript_CottonDownLoopIncrement:
addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_CottonDownLoop
BattleScript_CottonDownReturn:
restoretarget
destroyabilitypopup
return
BattleScript_AnticipationActivates::
pause 0x5
call BattleScript_AbilityPopUp
@ -6729,6 +6768,15 @@ BattleScript_SandstreamActivates::
call BattleScript_WeatherFormChanges
end3
BattleScript_SandSpitActivates::
pause 0x20
call BattleScript_AbilityPopUp
printstring STRINGID_ASANDSTORMKICKEDUP
waitstate
playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES, NULL
call BattleScript_WeatherFormChanges
return
BattleScript_ShedSkinActivates::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXCUREDYPROBLEM
@ -7094,22 +7142,33 @@ BattleScript_MummyActivates::
waitmessage 0x40
return
BattleScript_AngryPointActivates::
BattleScript_TargetsStatWasMaxedOut::
call BattleScript_AbilityPopUp
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printstring STRINGID_ANGRYPOINTACTIVATES
printstring STRINGID_TARGETSSTATWASMAXEDOUT
waitmessage 0x40
return
BattleScript_TargetAbilityStatRaise::
BattleScript_BattlerAbilityStatRaiseOnSwitchIn::
copybyte gBattlerAbility, gBattlerAttacker
call BattleScript_AbilityPopUp
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
waitanimation
printstring STRINGID_BATTLERABILITYRAISEDSTAT
waitmessage 0x40
end3
BattleScript_TargetAbilityStatRaiseOnMoveEnd::
call BattleScript_AbilityPopUp
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | MOVE_EFFECT_CERTAIN, NULL
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
waitanimation
printstring STRINGID_TARGETABILITYSTATRAISE
printstring STRINGID_ABILITYRAISEDSTATDRASTICALLY
waitmessage 0x40
return

View file

@ -833,5 +833,7 @@ extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT];
extern u8 gMultiUsePlayerCursor;
extern u8 gNumberOfMovesToChoose;
extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT];
extern bool8 gHasFetchedBall;
extern u8 gLastUsedBall;
#endif // GUARD_BATTLE_H

View file

@ -249,8 +249,8 @@ extern const u8 BattleScript_SturdiedMsg[];
extern const u8 BattleScript_GravityEnds[];
extern const u8 BattleScript_MoveStatDrain[];
extern const u8 BattleScript_MoveStatDrain_PPLoss[];
extern const u8 BattleScript_TargetAbilityStatRaise[];
extern const u8 BattleScript_AngryPointActivates[];
extern const u8 BattleScript_TargetAbilityStatRaiseOnMoveEnd[];
extern const u8 BattleScript_TargetsStatWasMaxedOut[];
extern const u8 BattleScript_AttackerAbilityStatRaise[];
extern const u8 BattleScript_AttackerAbilityStatRaiseEnd3[];
extern const u8 BattleScript_PoisonHealActivates[];
@ -350,5 +350,10 @@ extern const u8 BattleScript_EmergencyExitWild[];
extern const u8 BattleScript_EmergencyExitWildNoPopUp[];
extern const u8 BattleScript_CheekPouchActivates[];
extern const u8 BattleScript_AnnounceAirLockCloudNine[];
extern const u8 BattleScript_BattlerAbilityStatRaiseOnSwitchIn[];
extern const u8 BattleScript_CottonDownActivates[];
extern const u8 BattleScript_BallFetch[];
extern const u8 BattleScript_SandSpitActivates[];
extern const u8 BattleScript_PerishBodyActivates[];
#endif // GUARD_BATTLE_SCRIPTS_H

View file

@ -452,7 +452,7 @@
#define STRINGID_PSYCHICTERRAINENDS 448
#define STRINGID_GRASSYTERRAINENDS 449
#define STRINGID_TARGETABILITYSTATRAISE 450
#define STRINGID_ANGRYPOINTACTIVATES 451
#define STRINGID_TARGETSSTATWASMAXEDOUT 451
#define STRINGID_ATTACKERABILITYSTATRAISE 452
#define STRINGID_POISONHEALHPUP 453
#define STRINGID_BADDREAMSDMG 454
@ -558,8 +558,13 @@
#define STRINGID_AURABREAKENTERS 554
#define STRINGID_COMATOSEENTERS 555
#define STRINGID_SCREENCLEANERENTERS 556
#define STRINGID_FETCHEDPOKEBALL 557
#define STRINGID_BATTLERABILITYRAISEDSTAT 558
#define STRINGID_ASANDSTORMKICKEDUP 559
#define STRINGID_PKMNSWILLPERISHIN3TURNS 560
#define STRINGID_ABILITYRAISEDSTATDRASTICALLY 561
#define BATTLESTRINGS_COUNT 557
#define BATTLESTRINGS_COUNT 562
//// multichoice message IDs
// switch in ability message

View file

@ -228,6 +228,8 @@ EWRAM_DATA u32 gFieldStatuses = 0;
EWRAM_DATA struct FieldTimer gFieldTimers = {0};
EWRAM_DATA u8 gBattlerAbility = 0;
EWRAM_DATA u16 gPartnerSpriteId = 0;
EWRAM_DATA bool8 gHasFetchedBall = FALSE;
EWRAM_DATA u8 gLastUsedBall = 0;
// IWRAM common vars
void (*gPreBattleCallback1)(void);
@ -2886,6 +2888,9 @@ static void BattleStartClearSetData(void)
gLastUsedMove = 0;
gFieldStatuses = 0;
gHasFetchedBall = FALSE;
gLastUsedBall = 0;
gBattlerAttacker = 0;
gBattlerTarget = 0;
gBattleWeather = 0;

View file

@ -584,7 +584,7 @@ static const u8 sText_ElectricTerrainEnds[] = _("The electricity disappeared\nfr
static const u8 sText_MistyTerrainEnds[] = _("The mist disappeared\nfrom the battlefield.");
static const u8 sText_PsychicTerrainEnds[] = _("The weirdness disappeared\nfrom the battlefield.");
static const u8 sText_GrassyTerrainEnds[] = _("The grass disappeared\nfrom the battlefield.");
static const u8 sText_AngryPointActivates[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY} maxed\nits attack!");
static const u8 sText_TargetsStatWasMaxedOut[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY} maxed\nits {B_BUFF1}!");
static const u8 sText_PoisonHealHpUp[] = _("The poisoning healed {B_ATK_NAME_WITH_PREFIX}\na little bit!");
static const u8 sText_BadDreamsDmg[] = _("{B_DEF_NAME_WITH_PREFIX} is tormented\nby {B_ATK_ABILITY}!");
static const u8 sText_MoldBreakerEnters[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} breaks the mold!");
@ -685,9 +685,19 @@ static const u8 sText_FairyAuraActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}
static const u8 sText_AuraBreakActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} reversed all\nother POKéMON's auras!");
static const u8 sText_ComatoseActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is drowsing!");
static const u8 sText_ScreenCleanerActivates[] = _("All screens on the field were\ncleansed!");
static const u8 sText_FetchedPokeBall[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} found\na {B_LAST_ITEM}!");
static const u8 sText_BattlerAbilityRaisedStat[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nraised its {B_BUFF1}!");
static const u8 sText_ASandstormKickedUp[] = _("A sandstorm kicked up!");
static const u8 sText_PkmnsWillPerishIn3Turns[] = _("Both Pokémon will perish\nin three turns!");
static const u8 sText_AbilityRaisedStatDrastically[] = _("{B_DEF_ABILITY} raised {B_DEF_NAME_WITH_PREFIX}'s\n{B_BUFF1} drastically!");
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
{
[STRINGID_ABILITYRAISEDSTATDRASTICALLY - 12] = sText_AbilityRaisedStatDrastically,
[STRINGID_PKMNSWILLPERISHIN3TURNS - 12] = sText_PkmnsWillPerishIn3Turns,
[STRINGID_ASANDSTORMKICKEDUP - 12] = sText_ASandstormKickedUp,
[STRINGID_BATTLERABILITYRAISEDSTAT - 12] = sText_BattlerAbilityRaisedStat,
[STRINGID_FETCHEDPOKEBALL - 12] = sText_FetchedPokeBall,
[STRINGID_STATWASNOTLOWERED - 12] = sText_StatWasNotLowered,
[STRINGID_CLOAKEDINAFREEZINGLIGHT - 12] = sText_CloakedInAFreezingLight,
[STRINGID_DESTINYKNOTACTIVATES - 12] = sText_DestinyKnotActivates,
@ -1156,7 +1166,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
[STRINGID_PSYCHICTERRAINENDS - 12] = sText_PsychicTerrainEnds,
[STRINGID_GRASSYTERRAINENDS - 12] = sText_GrassyTerrainEnds,
[STRINGID_TARGETABILITYSTATRAISE - 12] = sText_TargetAbilityRaisedStat,
[STRINGID_ANGRYPOINTACTIVATES - 12] = sText_AngryPointActivates,
[STRINGID_TARGETSSTATWASMAXEDOUT - 12] = sText_TargetsStatWasMaxedOut,
[STRINGID_ATTACKERABILITYSTATRAISE - 12] = sText_AttackerAbilityRaisedStat,
[STRINGID_POISONHEALHPUP - 12] = sText_PoisonHealHpUp,
[STRINGID_BADDREAMSDMG - 12] = sText_BadDreamsDmg,

View file

@ -1273,7 +1273,7 @@ static void Cmd_attackcanceler(void)
// Check Protean activation.
GET_MOVE_TYPE(gCurrentMove, moveType);
if (GetBattlerAbility(gBattlerAttacker) == ABILITY_PROTEAN
if ((GetBattlerAbility(gBattlerAttacker) == ABILITY_PROTEAN || GetBattlerAbility(gBattlerAttacker) == ABILITY_LIBERO)
&& (gBattleMons[gBattlerAttacker].type1 != moveType || gBattleMons[gBattlerAttacker].type2 != moveType ||
(gBattleMons[gBattlerAttacker].type3 != moveType && gBattleMons[gBattlerAttacker].type3 != TYPE_MYSTERY))
&& gCurrentMove != MOVE_STRUGGLE)
@ -12002,6 +12002,9 @@ static void Cmd_handleballthrow(void)
}
else // not caught
{
if (!gHasFetchedBall)
gLastUsedBall = gLastUsedItem;
if (IsCriticalCapture())
gBattleCommunication[MULTISTRING_CHOOSER] = shakes + 3;
else

View file

@ -140,7 +140,9 @@ void HandleAction_UseMove(void)
if (gSideTimers[side].followmeTimer != 0
&& gBattleMoves[gCurrentMove].target == MOVE_TARGET_SELECTED
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gSideTimers[side].followmeTarget)
&& gBattleMons[gSideTimers[side].followmeTarget].hp != 0)
&& gBattleMons[gSideTimers[side].followmeTarget].hp != 0
&& (GetBattlerAbility(gBattlerAttacker) != ABILITY_PROPELLER_TAIL
|| GetBattlerAbility(gBattlerAttacker) != ABILITY_STALWART))
{
gBattlerTarget = gSideTimers[side].followmeTarget;
}
@ -158,9 +160,10 @@ void HandleAction_UseMove(void)
if (side != GetBattlerSide(gActiveBattler)
&& *(gBattleStruct->moveTarget + gBattlerAttacker) != gActiveBattler
&& ((GetBattlerAbility(gActiveBattler) == ABILITY_LIGHTNING_ROD && moveType == TYPE_ELECTRIC)
|| (GetBattlerAbility(gActiveBattler) == ABILITY_STORM_DRAIN && moveType == TYPE_WATER)
)
&& GetBattlerTurnOrderNum(gActiveBattler) < var)
|| (GetBattlerAbility(gActiveBattler) == ABILITY_STORM_DRAIN && moveType == TYPE_WATER))
&& GetBattlerTurnOrderNum(gActiveBattler) < var
&& (GetBattlerAbility(gBattlerAttacker) != ABILITY_PROPELLER_TAIL
|| GetBattlerAbility(gBattlerAttacker) != ABILITY_STALWART))
{
var = GetBattlerTurnOrderNum(gActiveBattler);
}
@ -3939,6 +3942,24 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
effect++;
}
break;
case ABILITY_INTREPID_SWORD:
if (!gSpecialStatuses[battler].switchInAbilityDone)
{
gSpecialStatuses[battler].switchInAbilityDone = 1;
SET_STATCHANGER(STAT_ATK, 1, FALSE);
BattleScriptPushCursorAndCallback(BattleScript_BattlerAbilityStatRaiseOnSwitchIn);
effect++;
}
break;
case ABILITY_DAUNTLESS_SHIELD:
if (!gSpecialStatuses[battler].switchInAbilityDone)
{
gSpecialStatuses[battler].switchInAbilityDone = 1;
SET_STATCHANGER(STAT_DEF, 1, FALSE);
BattleScriptPushCursorAndCallback(BattleScript_BattlerAbilityStatRaiseOnSwitchIn);
effect++;
}
break;
}
break;
case ABILITYEFFECT_ENDTURN: // 1
@ -4111,6 +4132,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
effect++;
}
break;
case ABILITY_BALL_FETCH:
if (gBattleMons[battler].item == ITEM_NONE
&& gBattleResults.catchAttempts[gLastUsedBall - ITEM_ULTRA_BALL] >= 1
&& !gHasFetchedBall)
{
gBattleScripting.battler = battler;
BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedBall);
MarkBattlerForControllerExec(battler);
gHasFetchedBall = TRUE;
gLastUsedItem = gLastUsedBall;
BattleScriptPushCursorAndCallback(BattleScript_BallFetch);
effect++;
}
break;
}
}
break;
@ -4252,7 +4287,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
{
SET_STATCHANGER(STAT_ATK, 1, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
effect++;
}
break;
@ -4265,7 +4300,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
{
SET_STATCHANGER(STAT_SPEED, 1, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
effect++;
}
break;
@ -4278,7 +4313,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
{
SET_STATCHANGER(STAT_DEF, 2, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
effect++;
}
break;
@ -4290,7 +4325,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
{
SET_STATCHANGER(STAT_DEF, 1, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
effect++;
}
break;
@ -4307,7 +4342,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
{
SET_STATCHANGER(STAT_SPATK, 1, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaise;
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
effect++;
}
break;
@ -4393,7 +4428,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
{
SET_STATCHANGER(STAT_ATK, 12 - gBattleMons[battler].statStages[STAT_ATK], FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_AngryPointActivates;
gBattlescriptCurrInstr = BattleScript_TargetsStatWasMaxedOut;
effect++;
}
break;
@ -4593,6 +4628,66 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
effect++;
}
break;
case ABILITY_COTTON_DOWN:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& gBattleMons[gBattlerAttacker].hp != 0
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& TARGET_TURN_DAMAGED)
{
gEffectBattler = gBattlerTarget;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_CottonDownActivates;
effect++;
}
break;
case ABILITY_STEAM_ENGINE:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& TARGET_TURN_DAMAGED
&& IsBattlerAlive(battler)
&& gBattleMons[battler].statStages[STAT_SPEED] != 12
&& (moveType == TYPE_FIRE || moveType == TYPE_WATER))
{
SET_STATCHANGER(STAT_SPEED, 6, FALSE);
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
effect++;
}
break;
case ABILITY_SAND_SPIT:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& TARGET_TURN_DAMAGED
&& !(WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SANDSTORM_ANY)
&& TryChangeBattleWeather(battler, ENUM_WEATHER_SANDSTORM, TRUE))
{
gBattleScripting.battler = gActiveBattler = battler;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_SandSpitActivates;
effect++;
}
break;
case ABILITY_PERISH_BODY:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& TARGET_TURN_DAMAGED
&& IsBattlerAlive(battler)
&& (gBattleMoves[move].flags & FLAG_MAKES_CONTACT)
&& !(gStatuses3[gBattlerAttacker] & STATUS3_PERISH_SONG))
{
if (!(gStatuses3[battler] & STATUS3_PERISH_SONG))
{
gStatuses3[battler] |= STATUS3_PERISH_SONG;
gDisableStructs[battler].perishSongTimer = 3;
gDisableStructs[battler].perishSongTimerStartValue = 3;
}
gStatuses3[gBattlerAttacker] |= STATUS3_PERISH_SONG;
gDisableStructs[gBattlerAttacker].perishSongTimer = 3;
gDisableStructs[gBattlerAttacker].perishSongTimerStartValue = 3;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_PerishBodyActivates;
effect++;
}
break;
}
break;
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
@ -6685,6 +6780,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
if (moveType == TYPE_NORMAL && gBattleStruct->ateBoost[battlerAtk])
MulModifier(&modifier, UQ_4_12(1.2));
break;
case ABILITY_PUNK_ROCK:
if (gBattleMoves[move].flags & FLAG_SOUND)
MulModifier(&modifier, UQ_4_12(1.3));
break;
}
// field abilities
@ -6706,6 +6805,9 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
if (IS_MOVE_SPECIAL(move))
MulModifier(&modifier, UQ_4_12(1.3));
break;
case ABILITY_POWER_SPOT:
MulModifier(&modifier, UQ_4_12(1.3));
break;
}
}
@ -6991,6 +7093,10 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
RecordAbilityBattle(battlerDef, ABILITY_THICK_FAT);
}
break;
case ABILITY_ICE_SCALES:
if (IS_MOVE_SPECIAL(move))
MulModifier(&modifier, UQ_4_12(0.5));
break;
}
// ally's abilities
@ -7130,6 +7236,10 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
if (gBattleMons[battlerDef].species == SPECIES_CHERRIM && WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY && !usesDefStat)
MulModifier(&modifier, UQ_4_12(1.5));
break;
case ABILITY_PUNK_ROCK:
if (gBattleMoves[move].flags & FLAG_SOUND)
MulModifier(&modifier, UQ_4_12(1.3));
break;
}
// ally's abilities