32 lines
1020 B
C#
32 lines
1020 B
C#
using System.Collections.Generic;
|
|
using PkmnLib.Dynamic.Events;
|
|
using PkmnLib.Dynamic.Models;
|
|
using PkmnLib.Dynamic.Models.Choices;
|
|
using PkmnLib.Dynamic.ScriptHandling;
|
|
using PkmnLib.Dynamic.ScriptHandling.Registry;
|
|
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "beak_blast")]
|
|
public class BeakBlast : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void OnBeforeTurnStart(ITurnChoice choice)
|
|
{
|
|
var battleData = choice.User.BattleData;
|
|
if (battleData == null)
|
|
return;
|
|
choice.User.Volatile.Add(new BeakBlastEffect());
|
|
battleData.Battle.EventHook.Invoke(new DialogEvent("beak_blast_charge", new Dictionary<string, object>()
|
|
{
|
|
{ "user", choice.User }
|
|
}));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
|
{
|
|
move.User.Volatile.Remove(ScriptUtils.ResolveName<BeakBlastEffect>());
|
|
}
|
|
} |