18 lines
522 B
C#
18 lines
522 B
C#
using PkmnLib.Plugin.Gen7.Scripts.Side;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "wide_guard")]
|
|
public class WideGuard : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
|
{
|
|
if (move.Battle.ChoiceQueue?.HasNext() != true)
|
|
{
|
|
move.GetHitData(target, hit).Fail();
|
|
return;
|
|
}
|
|
move.User.BattleData?.BattleSide.VolatileScripts.Add(new WideGuardEffect());
|
|
}
|
|
} |