20 lines
639 B
C#
20 lines
639 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, IBattlePokemon target, byte hit, ref TypeIdentifier? moveType)
|
|
{
|
|
if (moveType?.Name == TypeNames.Normal &&
|
|
target.Library.StaticLibrary.Types.TryGetTypeIdentifier(TypeNames.Electric, out var electricType))
|
|
{
|
|
moveType = electricType;
|
|
}
|
|
}
|
|
|
|
public void OnEndTurn(IScriptSource owner, IBattle battle)
|
|
{
|
|
RemoveSelf();
|
|
}
|
|
} |