namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
///
/// Normalize is an ability that changes all moves used by the Pokémon to Normal type.
///
/// Bulbapedia - Normalize
///
[Script(ScriptCategory.Ability, "normalize")]
public class Normalize : Script, IScriptChangeMoveType, IScriptChangeBasePower
{
///
public void ChangeMoveType(IExecutingMove move, IPokemon target, byte hit, ref TypeIdentifier? typeIdentifier)
{
if (move.Battle.Library.StaticLibrary.Types.TryGetTypeIdentifier("normal", out var normalType))
typeIdentifier = normalType;
}
///
public void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{
if (move.GetHitData(target, hit).Type?.Name == "normal")
basePower = (ushort)(basePower * 1.2f); // Boost Normal-type moves by 30%
}
}