Applied more corrections

-Removed BattleScript_WindRiderActivatesEnd2
-Tweaked the condition of Wind Power in AbilityBattleEffects
-Renamed ApplySupremeOverlordModifier to GetSupremeOverlordModifier
This commit is contained in:
LOuroboros 2022-12-28 08:50:15 -03:00
parent c40e15f8c5
commit 0ef148dfbb
3 changed files with 5 additions and 35 deletions

View File

@ -6683,26 +6683,6 @@ BattleScript_TailwindEnds::
waitmessage B_WAIT_TIME_LONG waitmessage B_WAIT_TIME_LONG
end2 end2
BattleScript_WindRiderActivatesEnd2::
setbyte gBattlerTarget, 0
BattleScript_WindRiderLoop:
printstring STRINGID_EMPTYSTRING3
jumpifability BS_TARGET, ABILITY_WIND_RIDER, BattleScript_WindRiderLoop_Cont
goto BattleScript_WindRiderIncrement
BattleScript_WindRiderLoop_Cont:
jumpifsideaffecting BS_TARGET, SIDE_STATUS_TAILWIND, BattleScript_WindRider_Activate
goto BattleScript_WindRiderIncrement
BattleScript_WindRider_Activate:
call BattleScript_AbilityPopUp
pause B_WAIT_TIME_MED
modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderIncrement, ANIM_ON
BattleScript_WindRiderIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_WindRiderLoop
BattleScript_WindRiderEnd:
destroyabilitypopup
end2
BattleScript_WindPowerActivatesEnd2:: BattleScript_WindPowerActivatesEnd2::
setbyte gBattlerAttacker, 0 setbyte gBattlerAttacker, 0
BattleScript_WindPowerLoop: BattleScript_WindPowerLoop:

View File

@ -436,7 +436,6 @@ extern const u8 BattleScript_DoubleShockRemoveType[];
extern const u8 BattleScript_SeedSowerActivates[]; extern const u8 BattleScript_SeedSowerActivates[];
extern const u8 BattleScript_AngerShellActivates[]; extern const u8 BattleScript_AngerShellActivates[];
extern const u8 BattleScript_WellBakedBodyActivates[]; extern const u8 BattleScript_WellBakedBodyActivates[];
extern const u8 BattleScript_WindRiderActivatesEnd2[];
extern const u8 BattleScript_WindRiderActivatesMoveEnd[]; extern const u8 BattleScript_WindRiderActivatesMoveEnd[];
extern const u8 BattleScript_WindPowerActivates[]; extern const u8 BattleScript_WindPowerActivates[];
extern const u8 BattleScript_WindPowerActivatesEnd2[]; extern const u8 BattleScript_WindPowerActivatesEnd2[];

View File

@ -5891,18 +5891,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
} }
break; break;
case ABILITY_WIND_POWER: case ABILITY_WIND_POWER:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) if (!(gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE))
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& TARGET_TURN_DAMAGED
&& gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE
&& IsBattlerAlive(gBattlerTarget))
{
gBattlerAttacker = gBattlerTarget;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_WindPowerActivates;
effect++;
}
break; break;
// fall through
case ABILITY_ELECTROMORPHOSIS: case ABILITY_ELECTROMORPHOSIS:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg && !gProtectStructs[gBattlerAttacker].confusionSelfDmg
@ -8756,7 +8747,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
// Supreme Overlord adds a damage boost for each fainted ally. // Supreme Overlord adds a damage boost for each fainted ally.
// The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each. // The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each.
static u16 ApplySupremeOverlordModifier(u8 battlerId) static u16 GetSupremeOverlordModifier(u8 battlerId)
{ {
u32 i; u32 i;
u8 side = GetBattlerSide(battlerId); u8 side = GetBattlerSide(battlerId);
@ -8925,7 +8916,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
MulModifier(&modifier, UQ_4_12(1.5)); MulModifier(&modifier, UQ_4_12(1.5));
break; break;
case ABILITY_SUPREME_OVERLORD: case ABILITY_SUPREME_OVERLORD:
MulModifier(&modifier, ApplySupremeOverlordModifier(battlerAtk)); MulModifier(&modifier, GetSupremeOverlordModifier(battlerAtk));
break; break;
} }