2025-04-19 13:04:10 +02:00

18 lines
494 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "quash")]
public class Quash : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var battleData = move.User.BattleData;
if (battleData == null)
return;
if (battleData.Battle.ChoiceQueue?.MovePokemonChoiceLast(target) == false)
{
move.GetHitData(target, hit).Fail();
}
}
}