mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-19 12:08:34 +01:00
steely spirit, screen cleaner, transistor, dragon's maw
This commit is contained in:
parent
73a7800f72
commit
4923af960e
@ -53,6 +53,8 @@ match the ROM; this is also why sSoundMovesTable's declaration is in the middle
|
|||||||
functions instead of at the top of the file with the other declarations.
|
functions instead of at the top of the file with the other declarations.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
static bool32 TryRemoveScreens(u8 battler);
|
||||||
|
|
||||||
extern const u8 *const gBattleScriptsForMoveEffects[];
|
extern const u8 *const gBattleScriptsForMoveEffects[];
|
||||||
extern const u8 *const gBattlescriptsForBallThrow[];
|
extern const u8 *const gBattlescriptsForBallThrow[];
|
||||||
extern const u8 *const gBattlescriptsForRunningByItem[];
|
extern const u8 *const gBattlescriptsForRunningByItem[];
|
||||||
@ -3830,7 +3832,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ABILITY_SCREEN_CLEANER:
|
case ABILITY_SCREEN_CLEANER:
|
||||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
if (!gSpecialStatuses[battler].switchInAbilityDone && TryRemoveScreens(battler))
|
||||||
{
|
{
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_SCREENCLEANER;
|
gBattleCommunication[MULTISTRING_CHOOSER] = MULTI_SWITCHIN_SCREENCLEANER;
|
||||||
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
gSpecialStatuses[battler].switchInAbilityDone = 1;
|
||||||
@ -6682,6 +6684,18 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
|||||||
if (moveType == TYPE_NORMAL && gBattleStruct->ateBoost[battlerAtk])
|
if (moveType == TYPE_NORMAL && gBattleStruct->ateBoost[battlerAtk])
|
||||||
MulModifier(&modifier, UQ_4_12(1.2));
|
MulModifier(&modifier, UQ_4_12(1.2));
|
||||||
break;
|
break;
|
||||||
|
case ABILITY_STEELY_SPIRIT:
|
||||||
|
if (moveType == TYPE_STEEL)
|
||||||
|
MulModifier(&modifier, UQ_4_12(1.5));
|
||||||
|
break;
|
||||||
|
case ABILITY_TRANSISTOR:
|
||||||
|
if (moveType == TYPE_ELECTRIC)
|
||||||
|
MulModifier(&modifier, UQ_4_12(1.5));
|
||||||
|
break;
|
||||||
|
case ABILITY_DRAGONS_MAW:
|
||||||
|
if (moveType == TYPE_DRAGON)
|
||||||
|
MulModifier(&modifier, UQ_4_12(1.5));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// field abilities
|
// field abilities
|
||||||
@ -6703,6 +6717,10 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
|||||||
if (IS_MOVE_SPECIAL(move))
|
if (IS_MOVE_SPECIAL(move))
|
||||||
MulModifier(&modifier, UQ_4_12(1.3));
|
MulModifier(&modifier, UQ_4_12(1.3));
|
||||||
break;
|
break;
|
||||||
|
case ABILITY_STEELY_SPIRIT:
|
||||||
|
if (moveType == TYPE_STEEL)
|
||||||
|
MulModifier(&modifier, UQ_4_12(1.5));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7830,3 +7848,26 @@ u8 GetBattleMoveSplit(u32 moveId)
|
|||||||
else
|
else
|
||||||
return SPLIT_SPECIAL;
|
return SPLIT_SPECIAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool32 TryRemoveScreens(u8 battler)
|
||||||
|
{
|
||||||
|
bool32 removed = FALSE;
|
||||||
|
u8 battlerSide = GetBattlerSide(battler);
|
||||||
|
u8 enemySide = GetBattlerSide(BATTLE_OPPOSITE(battler));
|
||||||
|
|
||||||
|
// try to remove from battler's side
|
||||||
|
if (gSideStatuses[battlerSide] & (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL))
|
||||||
|
{
|
||||||
|
gSideStatuses[battlerSide] &= ~(SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL);
|
||||||
|
removed = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// try to remove from battler opponent's side
|
||||||
|
if (gSideStatuses[enemySide] & (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL))
|
||||||
|
{
|
||||||
|
gSideStatuses[enemySide] &= ~(SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL);
|
||||||
|
removed = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return removed;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user