PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Belch.cs

19 lines
496 B
C#
Raw Normal View History

2025-01-10 12:45:29 +00:00
using System.Linq;
using PkmnLib.Static;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
2025-02-01 14:26:57 +00:00
[Script(ScriptCategory.Move, "belch")]
2025-01-10 12:45:29 +00:00
public class Belch : Script
{
/// <inheritdoc />
public override void PreventMoveSelection(IMoveChoice choice, ref bool prevent)
{
var battleData = choice.User.BattleData;
if (battleData == null)
return;
if (battleData.ConsumedItems.All(x => x.Category != ItemCategory.Berry))
prevent = true;
}
}