Implements several more moves
This commit is contained in:
32
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/BeakBlast.cs
Normal file
32
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/BeakBlast.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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>());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user