Deukhoofd 1feb27e826
All checks were successful
Build / Build (push) Successful in 50s
More work on refactor to interfaces
2025-06-29 12:03:51 +02:00

21 lines
839 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Analytic is an ability that increases the power of the user's move by 30% if the user moves after all other Pokémon in the same turn.
/// This bonus applies only if the Pokémon with Analytic acts last in the turn.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Analytic_(Ability)">Bulbapedia - Analytic</see>
/// </summary>
[Script(ScriptCategory.Ability, "analytic")]
public class Analytic : Script, IScriptChangeDamageModifier
{
/// <inheritdoc />
public void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
{
if (move.Battle.ChoiceQueue?.HasNext() == false)
{
move.Battle.EventHook.Invoke(new AbilityTriggerEvent(move.User));
modifier *= 1.3f;
}
}
}