mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Applied more corrections
-Removed BattleScript_WindRiderActivatesEnd2 -Tweaked the condition of Wind Power in AbilityBattleEffects -Renamed ApplySupremeOverlordModifier to GetSupremeOverlordModifier
This commit is contained in:
parent
c40e15f8c5
commit
0ef148dfbb
@ -6683,26 +6683,6 @@ BattleScript_TailwindEnds::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
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::
|
||||
setbyte gBattlerAttacker, 0
|
||||
BattleScript_WindPowerLoop:
|
||||
|
@ -436,7 +436,6 @@ extern const u8 BattleScript_DoubleShockRemoveType[];
|
||||
extern const u8 BattleScript_SeedSowerActivates[];
|
||||
extern const u8 BattleScript_AngerShellActivates[];
|
||||
extern const u8 BattleScript_WellBakedBodyActivates[];
|
||||
extern const u8 BattleScript_WindRiderActivatesEnd2[];
|
||||
extern const u8 BattleScript_WindRiderActivatesMoveEnd[];
|
||||
extern const u8 BattleScript_WindPowerActivates[];
|
||||
extern const u8 BattleScript_WindPowerActivatesEnd2[];
|
||||
|
@ -5891,18 +5891,9 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
break;
|
||||
case ABILITY_WIND_POWER:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE
|
||||
&& IsBattlerAlive(gBattlerTarget))
|
||||
{
|
||||
gBattlerAttacker = gBattlerTarget;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_WindPowerActivates;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
if (!(gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE))
|
||||
break;
|
||||
// fall through
|
||||
case ABILITY_ELECTROMORPHOSIS:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !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.
|
||||
// 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;
|
||||
u8 side = GetBattlerSide(battlerId);
|
||||
@ -8925,7 +8916,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
case ABILITY_SUPREME_OVERLORD:
|
||||
MulModifier(&modifier, ApplySupremeOverlordModifier(battlerAtk));
|
||||
MulModifier(&modifier, GetSupremeOverlordModifier(battlerAtk));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user