namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;

/// <summary>
/// Stakeout is an ability that doubles the damage dealt to Pokémon that have switched in this turn.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Stakeout_(Ability)">Bulbapedia - Stakeout</see>
/// </summary>
[Script(ScriptCategory.Ability, "stakeout")]
public class Stakeout : Script, IScriptChangeBasePower
{
    /// <inheritdoc />
    public void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
    {
        if (target.BattleData?.SwitchInTurn == move.Battle.CurrentTurnNumber)
            basePower = basePower.MultiplyOrMax(2);
    }
}