PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/MoveVolatile/ElectrifyEffect.cs

18 lines
584 B
C#
Raw Normal View History

2025-02-01 14:00:22 +00:00
using PkmnLib.Static;
namespace PkmnLib.Plugin.Gen7.Scripts.MoveVolatile;
[Script(ScriptCategory.MoveVolatile, "electrify")]
2025-03-02 16:19:57 +00:00
public class ElectrifyEffect : Script
{
2025-02-01 14:00:22 +00:00
/// <inheritdoc />
public override void ChangeMoveType(IExecutingMove move, IPokemon target, byte hit, ref TypeIdentifier moveType)
{
var battleData = target.BattleData;
if (battleData == null)
return;
if (!battleData.Battle.Library.StaticLibrary.Types.TryGetTypeIdentifier("electric", out var electricType))
return;
moveType = electricType;
}
}