18 lines
457 B
C#
18 lines
457 B
C#
|
using System.Linq;
|
||
|
using PkmnLib.Static;
|
||
|
|
||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
}
|