Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Battle/IonDelugeEffect.cs
Deukhoofd d2a82b5fe3
All checks were successful
Build / Build (push) Successful in 3m12s
Many more tests and fixes
2026-08-27 17:11:12 +02:00

20 lines
617 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Battle;
[Script(ScriptCategory.Move, "ion_deluge")]
public class IonDelugeEffect : Script, IScriptChangeMoveType, IScriptOnEndTurn
{
/// <inheritdoc />
public void ChangeMoveType(IExecutingMove move, IPokemon target, byte hit, ref TypeIdentifier? moveType)
{
if (moveType?.Name == "normal" &&
target.Library.StaticLibrary.Types.TryGetTypeIdentifier("electric", out var electricType))
{
moveType = electricType;
}
}
public void OnEndTurn(IScriptSource owner, IBattle battle)
{
RemoveSelf();
}
}