2025-06-07 11:03:48 +02:00

18 lines
769 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Compound Eyes is an ability that increases the accuracy of the Pokémon's moves by 30%.
/// This applies to all moves used by the Pokémon, making it particularly effective with low-accuracy moves.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Compound_Eyes_(Ability)">Bulbapedia - Compound Eyes</see>
/// </summary>
[Script(ScriptCategory.Ability, "compound_eyes")]
public class CompoundEyes : Script
{
/// <inheritdoc />
public override void ChangeAccuracy(IExecutingMove move, IPokemon target, byte hit, ref int modifiedAccuracy)
{
move.Battle.EventHook.Invoke(new AbilityTriggerEvent(move.User));
modifiedAccuracy = (int)(modifiedAccuracy * 1.3f);
}
}