mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 12:07:38 +01:00
Add Telepathy's damage prevention effect
This commit is contained in:
parent
800e2395c0
commit
2d41f08312
@ -8105,6 +8105,17 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat
|
||||
RecordAbilityBattle(battlerDef, ABILITY_WONDER_GUARD);
|
||||
}
|
||||
}
|
||||
if (GetBattlerAbility(battlerDef) == ABILITY_TELEPATHY && battlerDef == BATTLE_PARTNER(battlerAtk)) {
|
||||
modifier = UQ_4_12(0.0);
|
||||
if (recordAbilities)
|
||||
{
|
||||
gLastUsedAbility = ABILITY_TELEPATHY;
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gLastLandedMoves[battlerDef] = 0;
|
||||
gBattleCommunication[6] = B_MSG_AVOIDED_DMG;
|
||||
RecordAbilityBattle(battlerDef, ABILITY_TELEPATHY);
|
||||
}
|
||||
}
|
||||
|
||||
return modifier;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user